krikri 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/krikri/activity.rb +34 -8
  3. data/lib/generators/krikri/templates/schema.xml +1 -0
  4. data/lib/generators/krikri/templates/solrconfig.xml +1 -0
  5. data/lib/krikri/async_uri_getter.rb +27 -0
  6. data/lib/krikri/engine.rb +19 -4
  7. data/lib/krikri/enricher.rb +3 -6
  8. data/lib/krikri/entity_behavior.rb +57 -11
  9. data/lib/krikri/entity_behaviors/aggregation_entity_behavior.rb +1 -1
  10. data/lib/krikri/entity_behaviors/original_record_entity_behavior.rb +1 -1
  11. data/lib/krikri/entity_consumer.rb +40 -17
  12. data/lib/krikri/indexer.rb +7 -7
  13. data/lib/krikri/mapper.rb +23 -14
  14. data/lib/krikri/search_index.rb +4 -0
  15. data/lib/krikri/software_agent.rb +8 -4
  16. data/lib/krikri/version.rb +1 -1
  17. data/spec/internal/Gemfile +3 -3
  18. data/spec/internal/Gemfile.lock +28 -28
  19. data/spec/internal/app/assets/javascripts/application.js +1 -1
  20. data/spec/internal/config/initializers/blacklight_initializer.rb +1 -1
  21. data/spec/internal/config/initializers/devise.rb +2 -2
  22. data/spec/internal/config/secrets.yml +2 -2
  23. data/spec/internal/db/development.sqlite3 +0 -0
  24. data/spec/internal/db/migrate/{20160304151204_devise_create_users.rb → 20160226160200_devise_create_users.rb} +0 -0
  25. data/spec/internal/db/migrate/{20160304151247_create_searches.blacklight.rb → 20160226160226_create_searches.blacklight.rb} +0 -0
  26. data/spec/internal/db/migrate/{20160304151248_create_bookmarks.blacklight.rb → 20160226160227_create_bookmarks.blacklight.rb} +0 -0
  27. data/spec/internal/db/migrate/{20160304151249_add_polymorphic_type_to_bookmarks.blacklight.rb → 20160226160228_add_polymorphic_type_to_bookmarks.blacklight.rb} +0 -0
  28. data/spec/internal/db/schema.rb +1 -1
  29. data/spec/internal/db/test.sqlite3 +0 -0
  30. data/spec/internal/log/development.log +92 -92
  31. data/spec/lib/krikri/async_uri_getter_spec.rb +31 -7
  32. data/spec/lib/krikri/entity_consumer_spec.rb +37 -7
  33. data/spec/lib/krikri/harvester_spec.rb +7 -3
  34. data/spec/lib/krikri/indexer_spec.rb +7 -4
  35. data/spec/lib/krikri/mapper_agent_spec.rb +10 -9
  36. data/spec/lib/krikri/search_index_spec.rb +3 -6
  37. data/spec/models/activity_spec.rb +32 -0
  38. data/spec/models/dpla/map/aggregation_spec.rb +40 -21
  39. data/spec/models/provider_spec.rb +2 -9
  40. data/spec/spec_helper.rb +1 -2
  41. data/spec/support/shared_contexts/indexed_item.rb +1 -3
  42. data/spec/support/shared_examples/software_agent.rb +1 -1
  43. metadata +11 -14
  44. data/lib/generators/krikri/templates/schema.xml +0 -767
  45. data/lib/generators/krikri/templates/solrconfig.xml +0 -160
  46. data/spec/internal/log/test.log +0 -8537
@@ -1,767 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" ?>
2
- <!--
3
- Licensed to the Apache Software Foundation (ASF) under one or more
4
- contributor license agreements. See the NOTICE file distributed with
5
- this work for additional information regarding copyright ownership.
6
- The ASF licenses this file to You under the Apache License, Version 2.0
7
- (the "License"); you may not use this file except in compliance with
8
- the License. You may obtain a copy of the License at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- Unless required by applicable law or agreed to in writing, software
13
- distributed under the License is distributed on an "AS IS" BASIS,
14
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- See the License for the specific language governing permissions and
16
- limitations under the License.
17
- -->
18
-
19
- <!--
20
- This is the Solr schema file. This file should be named "schema.xml" and
21
- should be in the conf directory under the solr home
22
- (i.e. ./solr/conf/schema.xml by default)
23
- or located where the classloader for the Solr webapp can find it.
24
-
25
- This example schema is the recommended starting point for users.
26
- It should be kept correct and concise, usable out-of-the-box.
27
-
28
- For more information, on how to customize this file, please see
29
- http://wiki.apache.org/solr/SchemaXml
30
-
31
- PERFORMANCE NOTE: this schema includes many optional features and should not
32
- be used for benchmarking. To improve performance one could
33
- - set stored="false" for all fields possible (esp large fields) when you
34
- only need to search on the field but don't need to return the original
35
- value.
36
- - set indexed="false" if you don't need to search on the field, but only
37
- return the field as a result of searching on other indexed fields.
38
- - remove all unneeded copyField statements
39
- - for best index size and searching performance, set "index" to false
40
- for all general text fields, use copyField to copy them to the
41
- catchall "text" field, and use that for searching.
42
- - For maximum indexing performance, use the StreamingUpdateSolrServer
43
- java client.
44
- - Remember to run the JVM in server mode, and use a higher logging level
45
- that avoids logging every request
46
- -->
47
-
48
- <schema name="DPLA MAPV4.0" version="1.5">
49
- <!-- attribute "name" is the name of this schema and is only used for display purposes.
50
- Applications should change this to reflect the nature of the search collection.
51
- version="1.5" is Solr's version number for the schema syntax and semantics. It should
52
- not normally be changed by applications.
53
- 1.0: multiValued attribute did not exist, all fields are multiValued by nature
54
- 1.1: multiValued attribute introduced, false by default
55
- 1.2: omitTermFreqAndPositions attribute introduced, true by default except for text fields.
56
- 1.3: removed optional field compress feature
57
- 1.4: default auto-phrase (QueryParser feature) to off
58
- -->
59
-
60
- <types>
61
- <!-- field type definitions. The "name" attribute is
62
- just a label to be used by field definitions. The "class"
63
- attribute and any other attributes determine the real
64
- behavior of the fieldType.
65
- Class names starting with "solr" refer to java classes in the
66
- org.apache.solr.analysis package.
67
- -->
68
-
69
- <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
70
- <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
71
-
72
- <!-- boolean type: "true" or "false" -->
73
- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
74
- <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
75
- <fieldtype name="binary" class="solr.BinaryField"/>
76
-
77
- <!-- The optional sortMissingLast and sortMissingFirst attributes are
78
- v currently supported on types that are sorted internally as strings
79
- and on numeric types.
80
- This includes "string","boolean", and, as of 3.5 (and 4.x),
81
- int, float, long, date, double, including the "Trie" variants.
82
- - If sortMissingLast="true", then a sort on this field will cause documents
83
- without the field to come after documents with the field,
84
- regardless of the requested sort order (asc or desc).
85
- - If sortMissingFirst="true", then a sort on this field will cause documents
86
- without the field to come before documents with the field,
87
- regardless of the requested sort order.
88
- - If sortMissingLast="false" and sortMissingFirst="false" (the default),
89
- then default lucene sorting will be used which places docs without the
90
- field first in an ascending sort and last in a descending sort.
91
- -->
92
-
93
- <!--
94
- Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
95
- -->
96
- <fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
97
- <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
98
- <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
99
- <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
100
-
101
- <!--
102
- Numeric field types that index each value at various levels of precision
103
- to accelerate range queries when the number of values between the range
104
- endpoints is large. See the javadoc for NumericRangeQuery for internal
105
- implementation details.
106
-
107
- Smaller precisionStep values (specified in bits) will lead to more tokens
108
- indexed per value, slightly larger index size, and faster range queries.
109
- A precisionStep of 0 disables indexing at different precision levels.
110
- -->
111
- <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
112
- <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
113
- <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
114
- <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
115
-
116
- <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
117
- is a more restricted form of the canonical representation of dateTime
118
- http://www.w3.org/TR/xmlschema-2/#dateTime
119
- The trailing "Z" designates UTC time and is mandatory.
120
- Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
121
- All other components are mandatory.
122
-
123
- Expressions can also be used to denote calculations that should be
124
- performed relative to "NOW" to determine the value, ie...
125
-
126
- NOW/HOUR
127
- ... Round to the start of the current hour
128
- NOW-1DAY
129
- ... Exactly 1 day prior to now
130
- NOW/DAY+6MONTHS+3DAYS
131
- ... 6 months and 3 days in the future from the start of
132
- the current day
133
-
134
- Consult the DateField javadocs for more information.
135
-
136
- Note: For faster range queries, consider the tdate type
137
- -->
138
- <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
139
-
140
- <!-- A Trie based date field for faster date range queries and date faceting. -->
141
- <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
142
-
143
-
144
- <!--
145
- Note:
146
- These should only be used for compatibility with existing indexes (created with older Solr versions)
147
- or if "sortMissingFirst" or "sortMissingLast" functionality is needed. Use Trie based fields instead.
148
-
149
- Plain numeric field types that store and index the text
150
- value verbatim (and hence don't support range queries, since the
151
- lexicographic ordering isn't equal to the numeric ordering)
152
- -->
153
- <fieldType name="pint" class="solr.IntField" omitNorms="true"/>
154
- <fieldType name="plong" class="solr.LongField" omitNorms="true"/>
155
- <fieldType name="pfloat" class="solr.FloatField" omitNorms="true"/>
156
- <fieldType name="pdouble" class="solr.DoubleField" omitNorms="true"/>
157
- <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
158
-
159
- <!-- The "RandomSortField" is not used to store or search any
160
- data. You can declare fields of this type it in your schema
161
- to generate pseudo-random orderings of your docs for sorting
162
- purposes. The ordering is generated based on the field name
163
- and the version of the index, As long as the index version
164
- remains unchanged, and the same field name is reused,
165
- the ordering of the docs will be consistent.
166
- If you want different psuedo-random orderings of documents,
167
- for the same version of the index, use a dynamicField and
168
- change the name
169
- -->
170
- <fieldType name="random" class="solr.RandomSortField" indexed="true" />
171
-
172
- <!-- solr.TextField allows the specification of custom text analyzers
173
- specified as a tokenizer and a list of token filters. Different
174
- analyzers may be specified for indexing and querying.
175
-
176
- The optional positionIncrementGap puts space between multiple fields of
177
- this type on the same document, with the purpose of preventing false phrase
178
- matching across fields.
179
-
180
- For more info on customizing your analyzer chain, please see
181
- http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
182
- -->
183
- <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
184
- <analyzer>
185
- <tokenizer class="solr.StandardTokenizerFactory"/>
186
- <filter class="solr.ICUFoldingFilterFactory" />
187
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
188
- <filter class="solr.SnowballPorterFilterFactory" language="English" />
189
- </analyzer>
190
- </fieldType>
191
-
192
- <!-- One can also specify an existing Analyzer class that has a
193
- default constructor via the class attribute on the analyzer element
194
- <fieldType name="text_greek" class="solr.TextField">
195
- <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
196
- </fieldType>
197
- -->
198
-
199
- <!-- A text field that only splits on whitespace for exact matching of words -->
200
- <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
201
- <analyzer>
202
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
203
- </analyzer>
204
- </fieldType>
205
-
206
- <!-- A general text field that has reasonable, generic
207
- cross-language defaults: it tokenizes with StandardTokenizer,
208
- removes stop words from case-insensitive "stopwords.txt"
209
- (empty by default), and down cases. At query time only, it
210
- also applies synonyms. -->
211
- <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
212
- <analyzer type="index">
213
- <tokenizer class="solr.StandardTokenizerFactory"/>
214
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
215
- <!-- in this example, we will only use synonyms at query time
216
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
217
- -->
218
- <filter class="solr.LowerCaseFilterFactory"/>
219
- </analyzer>
220
- <analyzer type="query">
221
- <tokenizer class="solr.StandardTokenizerFactory"/>
222
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
223
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
224
- <filter class="solr.LowerCaseFilterFactory"/>
225
- </analyzer>
226
- </fieldType>
227
-
228
- <!-- A text field with defaults appropriate for English: it
229
- tokenizes with StandardTokenizer, removes English stop words
230
- (stopwords_en.txt), down cases, protects words from protwords.txt, and
231
- finally applies Porter's stemming. The query time analyzer
232
- also applies synonyms from synonyms.txt. -->
233
- <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
234
- <analyzer type="index">
235
- <tokenizer class="solr.StandardTokenizerFactory"/>
236
- <!-- in this example, we will only use synonyms at query time
237
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
238
- -->
239
- <!-- Case insensitive stop word removal.
240
- add enablePositionIncrements=true in both the index and query
241
- analyzers to leave a 'gap' for more accurate phrase queries.
242
- -->
243
- <filter class="solr.StopFilterFactory"
244
- ignoreCase="true"
245
- words="stopwords_en.txt"
246
- enablePositionIncrements="true"
247
- />
248
- <filter class="solr.LowerCaseFilterFactory"/>
249
- <filter class="solr.EnglishPossessiveFilterFactory"/>
250
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
251
- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
252
- <filter class="solr.EnglishMinimalStemFilterFactory"/>
253
- -->
254
- <filter class="solr.PorterStemFilterFactory"/>
255
- </analyzer>
256
- <analyzer type="query">
257
- <tokenizer class="solr.StandardTokenizerFactory"/>
258
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
259
- <filter class="solr.StopFilterFactory"
260
- ignoreCase="true"
261
- words="stopwords_en.txt"
262
- enablePositionIncrements="true"
263
- />
264
- <filter class="solr.LowerCaseFilterFactory"/>
265
- <filter class="solr.EnglishPossessiveFilterFactory"/>
266
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
267
- <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
268
- <filter class="solr.EnglishMinimalStemFilterFactory"/>
269
- -->
270
- <filter class="solr.PorterStemFilterFactory"/>
271
- </analyzer>
272
- </fieldType>
273
-
274
- <!-- A text field with defaults appropriate for English, plus
275
- aggressive word-splitting and autophrase features enabled.
276
- This field is just like text_en, except it adds
277
- WordDelimiterFilter to enable splitting and matching of
278
- words on case-change, alpha numeric boundaries, and
279
- non-alphanumeric chars. This means certain compound word
280
- cases will work, for example query "wi fi" will match
281
- document "WiFi" or "wi-fi". However, other cases will still
282
- not match, for example if the query is "wifi" and the
283
- document is "wi fi" or if the query is "wi-fi" and the
284
- document is "wifi".
285
- -->
286
- <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
287
- <analyzer type="index">
288
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
289
- <!-- in this example, we will only use synonyms at query time
290
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
291
- -->
292
- <!-- Case insensitive stop word removal.
293
- add enablePositionIncrements=true in both the index and query
294
- analyzers to leave a 'gap' for more accurate phrase queries.
295
- -->
296
- <filter class="solr.StopFilterFactory"
297
- ignoreCase="true"
298
- words="stopwords_en.txt"
299
- enablePositionIncrements="true"
300
- />
301
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
302
- <filter class="solr.LowerCaseFilterFactory"/>
303
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
304
- <filter class="solr.PorterStemFilterFactory"/>
305
- </analyzer>
306
- <analyzer type="query">
307
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
308
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
309
- <filter class="solr.StopFilterFactory"
310
- ignoreCase="true"
311
- words="stopwords_en.txt"
312
- enablePositionIncrements="true"
313
- />
314
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
315
- <filter class="solr.LowerCaseFilterFactory"/>
316
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
317
- <filter class="solr.PorterStemFilterFactory"/>
318
- </analyzer>
319
- </fieldType>
320
-
321
- <!-- Less flexible matching, but less false matches. Probably not ideal for product names,
322
- but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
323
- <fieldType name="text_en_splitting_tight" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
324
- <analyzer>
325
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
326
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
327
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
328
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
329
- <filter class="solr.LowerCaseFilterFactory"/>
330
- <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
331
- <filter class="solr.EnglishMinimalStemFilterFactory"/>
332
- <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
333
- possible with WordDelimiterFilter in conjuncton with stemming. -->
334
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
335
- </analyzer>
336
- </fieldType>
337
-
338
- <!-- Just like text_general except it reverses the characters of
339
- each token, to enable more efficient leading wildcard queries. -->
340
- <fieldType name="text_general_rev" class="solr.TextField" positionIncrementGap="100">
341
- <analyzer type="index">
342
- <tokenizer class="solr.StandardTokenizerFactory"/>
343
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
344
- <filter class="solr.LowerCaseFilterFactory"/>
345
- <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
346
- maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
347
- </analyzer>
348
- <analyzer type="query">
349
- <tokenizer class="solr.StandardTokenizerFactory"/>
350
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
351
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
352
- <filter class="solr.LowerCaseFilterFactory"/>
353
- </analyzer>
354
- </fieldType>
355
-
356
- <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
357
- <analyzer>
358
- <tokenizer class="solr.StandardTokenizerFactory"/>
359
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
360
- <filter class="solr.StandardFilterFactory"/>
361
- <filter class="solr.LowerCaseFilterFactory"/>
362
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
363
- </analyzer>
364
- </fieldType>
365
-
366
- <!-- charFilter + WhitespaceTokenizer -->
367
- <!--
368
- <fieldType name="text_char_norm" class="solr.TextField" positionIncrementGap="100" >
369
- <analyzer>
370
- <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
371
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
372
- </analyzer>
373
- </fieldType>
374
- -->
375
-
376
- <!-- This is an example of using the KeywordTokenizer along
377
- With various TokenFilterFactories to produce a sortable field
378
- that does not include some properties of the source text
379
- -->
380
- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
381
- <analyzer>
382
- <!-- KeywordTokenizer does no actual tokenizing, so the entire
383
- input string is preserved as a single token
384
- -->
385
- <tokenizer class="solr.KeywordTokenizerFactory"/>
386
- <!-- The LowerCase TokenFilter does what you expect, which can be
387
- when you want your sorting to be case insensitive
388
- -->
389
- <filter class="solr.LowerCaseFilterFactory" />
390
- <!-- The TrimFilter removes any leading or trailing whitespace -->
391
- <filter class="solr.TrimFilterFactory" />
392
- <!-- The PatternReplaceFilter gives you the flexibility to use
393
- Java Regular expression to replace any sequence of characters
394
- matching a pattern with an arbitrary replacement string,
395
- which may include back references to portions of the original
396
- string matched by the pattern.
397
-
398
- See the Java Regular Expression documentation for more
399
- information on pattern and replacement string syntax.
400
-
401
- http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
402
- -->
403
- <filter class="solr.PatternReplaceFilterFactory"
404
- pattern="([^a-z])" replacement="" replace="all"
405
- />
406
- </analyzer>
407
- </fieldType>
408
-
409
- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
410
- <analyzer>
411
- <tokenizer class="solr.StandardTokenizerFactory"/>
412
- <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
413
- </analyzer>
414
- </fieldtype>
415
-
416
- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
417
- <analyzer>
418
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
419
- <!--
420
- The DelimitedPayloadTokenFilter can put payloads on tokens... for example,
421
- a token of "foo|1.4" would be indexed as "foo" with a payload of 1.4f
422
- Attributes of the DelimitedPayloadTokenFilterFactory :
423
- "delimiter" - a one character delimiter. Default is | (pipe)
424
- "encoder" - how to encode the following value into a playload
425
- float -> org.apache.lucene.analysis.payloads.FloatEncoder,
426
- integer -> o.a.l.a.p.IntegerEncoder
427
- identity -> o.a.l.a.p.IdentityEncoder
428
- Fully Qualified class name implementing PayloadEncoder, Encoder must have a no arg constructor.
429
- -->
430
- <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
431
- </analyzer>
432
- </fieldtype>
433
-
434
- <!-- lowercases the entire field value, keeping it as a single token. -->
435
- <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
436
- <analyzer>
437
- <tokenizer class="solr.KeywordTokenizerFactory"/>
438
- <filter class="solr.LowerCaseFilterFactory" />
439
- </analyzer>
440
- </fieldType>
441
-
442
- <fieldType name="text_path" class="solr.TextField" positionIncrementGap="100">
443
- <analyzer>
444
- <tokenizer class="solr.PathHierarchyTokenizerFactory"/>
445
- </analyzer>
446
- </fieldType>
447
-
448
- <!-- since fields of this type are by default not stored or indexed,
449
- any data added to them will be ignored outright. -->
450
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
451
-
452
- <!-- This point type indexes the coordinates as separate fields (subFields)
453
- If subFieldType is defined, it references a type, and a dynamic field
454
- definition is created matching *___<typename>. Alternately, if
455
- subFieldSuffix is defined, that is used to create the subFields.
456
- Example: if subFieldType="double", then the coordinates would be
457
- indexed in fields myloc_0___double,myloc_1___double.
458
- Example: if subFieldSuffix="_d" then the coordinates would be indexed
459
- in fields myloc_0_d,myloc_1_d
460
- The subFields are an implementation detail of the fieldType, and end
461
- users normally should not need to know about them.
462
- -->
463
- <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
464
-
465
- <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
466
- <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
467
-
468
- <!--
469
- A Geohash is a compact representation of a latitude longitude pair in a single field.
470
- See http://wiki.apache.org/solr/SpatialSearch
471
- -->
472
- <fieldtype name="geohash" class="solr.GeoHashField"/>
473
- </types>
474
-
475
-
476
- <fields>
477
- <!-- Valid attributes for fields:
478
- name: mandatory - the name for the field
479
- type: mandatory - the name of a previously defined type from the
480
- <types> section
481
- indexed: true if this field should be indexed (searchable or sortable)
482
- stored: true if this field should be retrievable
483
- multiValued: true if this field may contain multiple values per document
484
- omitNorms: (expert) set to true to omit the norms associated with
485
- this field (this disables length normalization and index-time
486
- boosting for the field, and saves some memory). Only full-text
487
- fields or fields that need an index-time boost need norms.
488
- termVectors: [false] set to true to store the term vector for a
489
- given field.
490
- When using MoreLikeThis, fields used for similarity should be
491
- stored for best performance.
492
- termPositions: Store position information with the term vector.
493
- This will increase storage costs.
494
- termOffsets: Store offset information with the term vector. This
495
- will increase storage costs.
496
- default: a value that should be used if no value is specified
497
- when adding a document.
498
- -->
499
-
500
- <field name="id" type="string" indexed="true" stored="true" required="true" />
501
- <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false" />
502
-
503
- <!-- default, catch all search field -->
504
- <!-- set multiValued to true in order to copyfield -->
505
- <field name="text" type="text" indexed="true" stored="false" multiValued="true" />
506
-
507
- <field name="type" type="string" indexed="false" stored="false" multiValued="true" />
508
-
509
- <field name="dataProvider_id" type="string" indexed="true" stored="true" multiValued="true" />
510
- <field name="dataProvider_type" type="string" indexed="false" stored="false" multiValued="true" />
511
- <field name="dataProvider_name" type="string" indexed="true" stored="true" multiValued="true" />
512
- <field name="dataProvider_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
513
-
514
- <field name="hasView_id" type="string" indexed="true" stored="true" multiValued="true" />
515
- <field name="hasView_type" type="string" indexed="false" stored="false" multiValued="true" />
516
- <field name="hasView_format" type="string" indexed="true" stored="true" multiValued="true" />
517
- <field name="hasView_rights" type="string" indexed="true" stored="true" multiValued="true" />
518
- <field name="hasView_rightsStatement_id" type="string" indexed="true" stored="true" multiValued="true" />
519
-
520
- <field name="intermediateProvider_id" type="string" indexed="true" stored="true" multiValued="true" />
521
- <field name="intermediateProvider_type" type="string" indexed="false" stored="false" multiValued="true" />
522
- <field name="intermediateProvider_name" type="string" indexed="true" stored="true" multiValued="true" />
523
- <field name="intermediateProvider_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
524
-
525
- <field name="isShownAt_id" type="string" indexed="true" stored="true" multiValued="true" />
526
- <field name="isShownAt_type" type="string" indexed="false" stored="false" multiValued="true" />
527
- <field name="isShownAt_format" type="string" indexed="true" stored="true" multiValued="true" />
528
- <field name="isShownAt_rights" type="string" indexed="true" stored="true" multiValued="true" />
529
- <field name="isShownAt_rightsStatement_id" type="string" indexed="true" stored="true" multiValued="true" />
530
-
531
- <field name="object_id" type="string" indexed="true" stored="true" multiValued="true" />
532
- <field name="object_type" type="string" indexed="false" stored="false" multiValued="true" />
533
- <field name="object_format" type="string" indexed="true" stored="true" multiValued="true" />
534
- <field name="object_rights" type="string" indexed="true" stored="true" multiValued="true" />
535
- <field name="object_rightsStatement_id" type="string" indexed="true" stored="true" multiValued="true" />
536
-
537
- <field name="originalRecord" type="string" indexed="true" stored="true" multiValued="true" />
538
-
539
- <field name="preview_id" type="string" indexed="true" stored="true" multiValued="true" />
540
- <field name="preview_type" type="string" indexed="false" stored="false" multiValued="true" />
541
- <field name="preview_format" type="string" indexed="true" stored="true" multiValued="true" />
542
- <field name="preview_rights" type="string" indexed="true" stored="true" multiValued="true" />
543
- <field name="preview_rightsStatement_id" type="string" indexed="true" stored="true" multiValued="true" />
544
-
545
- <field name="provider_id" type="string" indexed="true" stored="true" multiValued="true" />
546
- <field name="provider_type" type="string" indexed="false" stored="false" multiValued="true" />
547
- <field name="provider_name" type="string" indexed="true" stored="true" multiValued="true" />
548
- <field name="provider_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
549
-
550
- <field name="rightsStatement_id" type="string" indexed="true" stored="true" multiValued="true" />
551
-
552
- <field name="sourceResource_id" type="string" indexed="true" stored="true" multiValued="true"/>
553
- <field name="sourceResource_type" type="string" indexed="false" stored="false" multiValued="true" />
554
- <field name="sourceResource_alternative" type="string" indexed="true" stored="true" multiValued="true" />
555
-
556
- <field name="sourceResource_collection_id" type="string" indexed="true" stored="true" multiValued="true" />
557
- <field name="sourceResource_collection_type" type="string" indexed="false" stored="false" multiValued="true" />
558
- <field name="sourceResource_collection_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
559
- <field name="sourceResource_collection_title" type="string" indexed="true" stored="true" multiValued="true" />
560
- <field name="sourceResource_collection_description" type="text" indexed="true" stored="true" multiValued="true" />
561
-
562
- <field name="sourceResource_contributor_id" type="string" indexed="true" stored="true" multiValued="true" />
563
- <field name="sourceResource_contributor_type" type="string" indexed="false" stored="false" multiValued="true" />
564
- <field name="sourceResource_contributor_name" type="string" indexed="true" stored="true" multiValued="true" />
565
- <field name="sourceResource_contributor_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
566
-
567
- <field name="sourceResource_creator_id" type="string" indexed="true" stored="true" multiValued="true" />
568
- <field name="sourceResource_creator_type" type="string" indexed="false" stored="false" multiValued="true" />
569
- <field name="sourceResource_creator_name" type="string" indexed="true" stored="true" multiValued="true" />
570
- <field name="sourceResource_creator_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
571
-
572
- <!-- TODO: Change date_begin and date_end type to "date" assuming they have been correctly formatted -->
573
- <field name="sourceResource_date_id" type="string" indexed="true" stored="true" multiValued="true" />
574
- <field name="sourceResource_date_type" type="string" indexed="false" stored="false" multiValued="true" />
575
- <field name="sourceResource_date_begin" type="string" indexed="true" stored="true" multiValued="true" />
576
- <field name="sourceResource_date_end" type="string" indexed="true" stored="true" multiValued="true" />
577
- <field name="sourceResource_date_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
578
-
579
- <field name="sourceResource_description" type="text" indexed="true" stored="true" multiValued="true" />
580
- <field name="sourceResource_extent" type="string" indexed="true" stored="true" multiValued="true" />
581
- <field name="sourceResource_format" type="string" indexed="true" stored="true" multiValued="true" />
582
- <field name="sourceResource_identifier" type="string" indexed="true" stored="true" multiValued="true" />
583
-
584
- <field name="sourceResource_language_id" type="string" indexed="true" stored="true" multiValued="true" />
585
- <field name="sourceResource_language_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
586
- <field name="sourceResource_language_type" type="string" indexed="true" stored="true" multiValued="true" />
587
-
588
- <field name="sourceResource_genre" type="string" indexed="true" stored="true" multiValued="true" />
589
- <field name="sourceResource_genre_id" type="string" indexed="true" stored="true" multiValued="true" />
590
- <field name="sourceResource_genre_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
591
- <field name="sourceResource_genre_type" type="string" indexed="true" stored="true" multiValued="true" />
592
-
593
- <field name="sourceResource_publisher_id" type="string" indexed="true" stored="true" multiValued="true" />
594
- <field name="sourceResource_publisher_type" type="string" indexed="false" stored="false" multiValued="true" />
595
- <field name="sourceResource_publisher_name" type="string" indexed="true" stored="true" multiValued="true" />
596
- <field name="sourceResource_publisher_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
597
-
598
- <field name="sourceResource_relation" type="string" indexed="true" stored="true" multiValued="true" />
599
- <field name="sourceResource_isReplacedBy" type="string" indexed="true" stored="true" multiValued="true" />
600
- <field name="sourceResource_replaces" type="string" indexed="true" stored="true" multiValued="true" />
601
- <field name="sourceResource_rights" type="string" indexed="true" stored="true" multiValued="true" />
602
- <field name="sourceResource_rightsHolder" type="string" indexed="true" stored="true" multiValued="true" />
603
-
604
- <field name="sourceResource_rightsHolder_id" type="string" indexed="true" stored="true" multiValued="true" />
605
- <field name="sourceResource_rightsHolder_type" type="string" indexed="false" stored="false" multiValued="true" />
606
- <field name="sourceResource_rightsHolder_name" type="string" indexed="true" stored="true" multiValued="true" />
607
- <field name="sourceResource_rightsHolder_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
608
-
609
- <field name="sourceResource_spatial_id" type="string" indexed="true" stored="true" multiValued="true" />
610
- <field name="sourceResource_spatial_type" type="string" indexed="false" stored="false" multiValued="true" />
611
- <field name="sourceResource_spatial_exactMatch" type="string" indexed="true" stored="true" multiValued="true" />
612
- <field name="sourceResource_spatial_countryCode" type="string" indexed="true" stored="true" multiValued="true" />
613
- <field name="sourceResource_spatial_parentFeature_id" type="string" indexed="true" stored="true" multiValued="true" />
614
- <field name="sourceResource_spatial_alt" type="string" indexed="true" stored="true" multiValued="true" />
615
- <field name="sourceResource_spatial_lat" type="string" indexed="true" stored="true" multiValued="true" />
616
- <field name="sourceResource_spatial_long" type="string" indexed="true" stored="true" multiValued="true" />
617
- <field name="sourceResource_spatial_name" type="string" indexed="true" stored="true" multiValued="true" />
618
- <field name="sourceResource_spatial_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
619
-
620
- <field name="sourceResource_specType_id" type="string" indexed="true" stored="true" multiValued="true" />
621
- <field name="sourceResource_specType_type" type="string" indexed="false" stored="false" multiValued="true" />
622
-
623
- <field name="sourceResource_subject_id" type="string" indexed="true" stored="true" multiValued="true" />
624
- <field name="sourceResource_subject_type" type="string" indexed="false" stored="false" multiValued="true" />
625
- <field name="sourceResource_subject_name" type="string" indexed="true" stored="true" multiValued="true" />
626
- <field name="sourceResource_subject_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
627
-
628
- <field name="sourceResource_temporal" type="string" indexed="true" stored="true" multiValued="true" />
629
- <field name="sourceResource_title" type="string" indexed="true" stored="true" multiValued="true" />
630
-
631
- <field name="sourceResource_type_id" type="string" indexed="true" stored="true" multiValued="true" />
632
- <field name="sourceResource_type_type" type="string" indexed="false" stored="false" multiValued="true" />
633
- <field name="sourceResource_type_providedLabel" type="string" indexed="true" stored="true" multiValued="true" />
634
- <field name="sourceResource_type_name" type="string" indexed="true" stored="true" multiValued="true" />
635
-
636
- <!-- Dynamic field definitions. If a field name is not found, dynamicFields
637
- will be used if the name matches any of the patterns.
638
- RESTRICTION: the glob-like pattern in the name attribute must have
639
- a "*" only at the start or the end.
640
- EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)
641
- Longer patterns will be matched first. if equal size patterns
642
- both match, the first appearing in the schema will be used. -->
643
- <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
644
- <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
645
- <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
646
- <dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
647
- <dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
648
- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
649
- <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
650
- <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
651
-
652
- <!-- Type used to index the lat and lon components for the "location" FieldType -->
653
- <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false"/>
654
-
655
- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
656
- <dynamicField name="*_p" type="location" indexed="true" stored="true"/>
657
-
658
- <!-- some trie-coded dynamic fields for faster range queries -->
659
- <dynamicField name="*_ti" type="tint" indexed="true" stored="true"/>
660
- <dynamicField name="*_tl" type="tlong" indexed="true" stored="true"/>
661
- <dynamicField name="*_tf" type="tfloat" indexed="true" stored="true"/>
662
- <dynamicField name="*_td" type="tdouble" indexed="true" stored="true"/>
663
- <dynamicField name="*_tdt" type="tdate" indexed="true" stored="true"/>
664
-
665
- <dynamicField name="*_pi" type="pint" indexed="true" stored="true"/>
666
-
667
- <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
668
- <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
669
-
670
- <dynamicField name="random_*" type="random" />
671
-
672
- <dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
673
- <dynamicField name="*_facet" type="string" indexed="true" stored="false" multiValued="true" />
674
- <dynamicField name="*_sort" type="alphaOnlySort" indexed="true" stored="false" multiValued="false" />
675
- <dynamicField name="*_unstem_search" type="text_general" indexed="true" stored="false" multiValued="true" />
676
- <dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
677
-
678
- <!-- uncomment the following to ignore any fields that don't already match an existing
679
- field name or dynamic field, rather than reporting them as an error.
680
- alternately, change the type="ignored" to some other type e.g. "text" if you want
681
- unknown fields indexed and/or stored by default -->
682
- <!--dynamicField name="*" type="ignored" multiValued="true" /-->
683
-
684
- </fields>
685
-
686
- <!-- Field to use to determine and enforce document uniqueness.
687
- Unless this field is marked with required="false", it will be a required field
688
- -->
689
- <uniqueKey>id</uniqueKey>
690
-
691
- <!-- field for the QueryParser to use when an explicit fieldname is absent -->
692
- <defaultSearchField>text</defaultSearchField>
693
-
694
- <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
695
- <solrQueryParser defaultOperator="AND" />
696
-
697
- <!-- copyField commands copy one field to another at the time a document
698
- is added to the index. It's used either to index the same field differently,
699
- or to add multiple fields to the same field for easier/faster searching. -->
700
- <!-- Copy Fields -->
701
- <!-- The source fields are copied into the text field to allow tokenization -->
702
- <copyField source="dataProvider_name" dest="text" />
703
- <copyField source="dataProvider_providedLabel" dest="text" />
704
- <copyField source="hasView_format" dest="text" />
705
- <copyField source="hasView_rights" dest="text" />
706
- <copyField source="intermediateProvider_name" dest="text" />
707
- <copyField source="intermediateProvider_providedLabel" dest="text" />
708
- <copyField source="isShownAt_format" dest="text" />
709
- <copyField source="isShownAt_rights" dest="text" />
710
- <copyField source="object_format" dest="text" />
711
- <copyField source="object_rights" dest="text" />
712
- <copyField source="preview_format" dest="text" />
713
- <copyField source="preview_rights" dest="text" />
714
- <copyField source="provider_name" dest="text" />
715
- <copyField source="provider_providedLabel" dest="text" />
716
- <copyField source="sourceResource_alternative" dest="text" />
717
- <copyField source="sourceResource_collection_providedLabel" dest="text" />
718
- <copyField source="sourceResource_collection_title" dest="text" />
719
- <copyField source="sourceResource_contributor_name" dest="text" />
720
- <copyField source="sourceResource_contributor_providedLabel" dest="text" />
721
- <copyField source="sourceResource_creator_name" dest="text" />
722
- <copyField source="sourceResource_creator_providedLabel" dest="text" />
723
- <copyField source="sourceResource_date_providedLabel" dest="text" />
724
- <copyField source="sourceResource_extent" dest="text" />
725
- <copyField source="sourceResource_format" dest="text" />
726
- <copyField source="sourceResource_genre" dest="text" />
727
- <copyField source="sourceResource_publisher_name" dest="text" />
728
- <copyField source="sourceResource_publisher_providedLabel" dest="text" />
729
- <copyField source="sourceResource_relation" dest="text" />
730
- <copyField source="sourceResource_isReplacedBy" dest="text" />
731
- <copyField source="sourceResource_replaces" dest="text" />
732
- <copyField source="sourceResource_rights" dest="text" />
733
- <copyField source="sourceResource_spatial_name" dest="text" />
734
- <copyField source="sourceResource_spatial_providedLabel" dest="text" />
735
- <copyField source="sourceResource_subject_name" dest="text" />
736
- <copyField source="sourceResource_subject_providedLabel" dest="text" />
737
- <copyField source="sourceResource_temporal" dest="text" />
738
- <copyField source="sourceResource_title" dest="text" />
739
- <copyField source="sourceResource_type_name" dest="text" />
740
-
741
- <!-- Above, multiple source fields are copied to the [text] field.
742
- Another way to map multiple source fields to the same
743
- destination field is to use the dynamic field syntax.
744
- copyField also supports a maxChars to copy setting. -->
745
-
746
- <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
747
-
748
- <!-- copy name to alphaNameSort, a field designed for sorting by name -->
749
- <!-- <copyField source="name" dest="alphaNameSort"/> -->
750
-
751
-
752
- <!-- Similarity is the scoring routine for each document vs. a query.
753
- A custom similarity may be specified here, but the default is fine
754
- for most applications. -->
755
- <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
756
- <!-- ... OR ...
757
- Specify a SimilarityFactory class name implementation
758
- allowing parameters to be used.
759
- -->
760
- <!--
761
- <similarity class="com.example.solr.CustomSimilarityFactory">
762
- <str name="paramkey">param value</str>
763
- </similarity>
764
- -->
765
-
766
-
767
- </schema>