-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.xml
395 lines (353 loc) · 22.3 KB
/
schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<?xml version="1.0" encoding="UTF-8" ?>
<!-- attribute "name" is the name of this schema and is only used for display purposes.
Applications should change this to reflect the nature of the search collection.
version="x.y" is Solr's version number for the schema syntax and semantics. It should
not normally be changed by applications.
1.3: removed optional field compress feature
1.4: default auto-phrase (QueryParser feature) to off
1.5: omitNorms defaults to true for primitive field types (int, float, boolean, string...)
-->
<schema name="plos" version="1.5">
<types>
<!-- omitNorms defaults to "true" for primitive field types -->
<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
<!--
Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
-->
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
<!-- A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
<!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
Synonyms and stopwords are customized by external files, and stemming is enabled.
-->
<fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="100"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" stemEnglishPossessive="1"
generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnNumerics="0" splitOnCaseChange="0"/>
<!-- Disabeling position filter. Note JO: 16743
filter class="solr.PositionFilterFactory" /-->
<filter class="solr.TrimFilterFactory"/>
<!-- EnglishPorterFilterFactory class is deprecated, replacing it with PorterStemFilterFactory -->
<filter class="solr.PorterStemFilterFactory" protected="protwords.txt"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="100"/>
<!-- Disabling synonym filter, we may want to turn this back on eventually -->
<!---filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/-->
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" stemEnglishPossessive="1"
generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnNumerics="0" splitOnCaseChange="0"/>
<!-- Disabeling position filter. Note JO: 16743
filter class="solr.PositionFilterFactory" /-->
<filter class="solr.TrimFilterFactory"/>
<!-- EnglishPorterFilterFactory class is deprecated, replacing it with PorterStemFilterFactory -->
<filter class="solr.PorterStemFilterFactory" protected="protwords.txt"/>
</analyzer>
</fieldType>
<!--
A text field that has little processing on it to use for term and spelling suggestions
-->
<fieldType name="text_noprocess" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="100"/>
<filter class="solr.WordDelimiterFilterFactory" stemEnglishPossessive="1"
generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnNumerics="1" splitOnCaseChange="0"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="100"/>
<filter class="solr.WordDelimiterFilterFactory" stemEnglishPossessive="1"
generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnNumerics="1" splitOnCaseChange="0"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<!--
Lowercasing terms for case insensitive searching
-->
<fieldType name="keyword_lowercase" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.TrimFilterFactory"/>
</analyzer>
</fieldType>
<!-- A text field specialized for exact proper name search. -->
<fieldType name="text_name" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" preserveOriginal="1" splitOnCaseChange="0"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="author_stopwords.txt"
enablePositionIncrements="true"
/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.WordDelimiterFilterFactory" preserveOriginal="1" splitOnCaseChange="0"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="author_stopwords.txt"
enablePositionIncrements="true"
/>
</analyzer>
</fieldType>
<!-- A general unstemmed text field that indexes tokens normally and also
reversed (via ReversedWildcardFilterFactory), to enable more efficient
leading wildcard queries. -->
<!-- "autoGeneratePhraseQueries" that defaults to "false" in 3.x.
In earlier versions, autoGeneratePhraseQueries was defaulted to 'True"
So, it is required to set this value explicitly in order for WhitespaceTokenizerFactory to work properly. -->
<fieldType name="text_rev" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="25"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
enablePositionIncrements="true"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"
splitOnCaseChange="0"/>
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="3" max="25"/>
<!-- Disabling synonym filter, we'll want to turn this back on -->
<!--filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/-->
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
enablePositionIncrements="true"
/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"
splitOnCaseChange="0"/>
</analyzer>
</fieldType>
<!--
Split text on the '/' character. Subjects come in with a defined hierarchy
This removes it.
-->
<fieldType name="text_splitOnSlashLowercase" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.PatternTokenizerFactory" pattern="//*"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="5000"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PatternTokenizerFactory" pattern="//*"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="5000"/>
</analyzer>
</fieldType>
<!--
Split text on the '/' character. Subjects come in with a defined hierarchy
This removes it.
-->
<fieldType name="text_splitOnSlash" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.PatternTokenizerFactory" pattern="//*"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="5000"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.PatternTokenizerFactory" pattern="//*"/>
<filter class="solr.TrimFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="5000"/>
</analyzer>
</fieldType>
<!-- since fields of this type are by default not stored or indexed,
any data added to them will be ignored outright. -->
<fieldtype name="ignored" stored="false" indexed="false" multiValued="true"
class="solr.StrField"/>
<fieldtype name="trigram" stored="false" indexed="true" multiValued="true"
class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="20"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.NGramFilterFactory" minGramSize="3" maxGramSize="20"/>
</analyzer>
</fieldtype>
<fieldtype name="text_subject_search" class="solr.TextField">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" maxGramSize="30"/>
</analyzer>
</fieldtype>
</types>
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true"/>
<field name="pmid" type="string" indexed="true" stored="true" />
<field name="pmcid" type="string" indexed="true" stored="true" />
<field name="eissn" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="pissn" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="title" type="text" indexed="true" stored="true" multiValued="false"/>
<field name="title_display" type="string" indexed="false" stored="true" multiValued="false"/>
<field name="title_ngram" type="trigram" indexed="true" stored="false" multiValued="false"/>
<field name="alternate_title" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="subject" type="text_splitOnSlashLowercase" indexed="true" stored="true" multiValued="true"/>
<field name="subject_facet" type="text_splitOnSlash" indexed="true" stored="true" multiValued="true"/>
<!-- Also store the subject to preserve the hierarchy if needed later -->
<field name="subject_hierarchy" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="subject_level_1" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="pagecount" type="int" indexed="true" stored="true"/>
<field name="volume" type="int" indexed="true" stored="true"/>
<field name="issue" type="int" indexed="true" stored="true"/>
<field name="elocation_id" type="keyword_lowercase" indexed="true" stored="true"/>
<field name="publisher" type="text_name" indexed="true" stored="true"/>
<field name="journal" type="keyword_lowercase" indexed="true" stored="true"/>
<field name="cross_published_journal_name" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="cross_published_journal_key" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="cross_published_journal_eissn" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="journal_id_pmc" type="string" indexed="true" stored="true"/>
<field name="journal_id_publisher" type="string" indexed="true" stored="true"/>
<field name="journal_id_nlm_ta" type="string" indexed="true" stored="true"/>
<field name="publication_date" type="tdate" indexed="true" stored="true"/>
<field name="received_date" type="tdate" indexed="true" stored="true"/>
<field name="accepted_date" type="tdate" indexed="true" stored="true"/>
<field name="abstract" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="abstract_ngram" type="trigram" indexed="true" stored="false" multiValued="true"/>
<field name="abstract_primary_display" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="author" type="text_name" indexed="true" stored="true" multiValued="true"/>
<field name="author_facet" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="author_display" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="editor" type="text_name" indexed="true" stored="true" multiValued="true"/>
<field name="editor_facet" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="editor_display" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="author_without_collab_display" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="author_collab_only_display" type="string" indexed="false" stored="true" multiValued="true"/>
<!--The two following fields are copyied into an affiliates field -->
<field name="author_affiliate" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="editor_affiliate" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="affiliate" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="affiliate_facet" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="author_notes" type="text" indexed="true" stored="true"/>
<field name="competing_interest" type="text" indexed="true" stored="true"/>
<field name="financial_disclosure" type="text" indexed="true" stored="true"/>
<field name="article_type" type="keyword_lowercase" indexed="true" stored="true" multiValued="false"/>
<field name="article_type_facet" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="reference" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="copyright" type="text" indexed="true" stored="true"/>
<field name="figure_table_doi" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="figure_table_caption" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="striking_image" type="string" indexed="false" stored="true" multiValued="false"/>
<!-- Should we add ngram and rev fields for all of these types as well? -->
<!-- Document parts -->
<field name="introduction" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="results_and_discussion" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="materials_and_methods" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="supporting_information" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="conclusions" type="text" indexed="true" stored="true" multiValued="true"/>
<field name="body" type="text" indexed="true" stored="true" multiValued="false" termVectors="true"/>
<!-- catchall field, containing all other searchable text fields -->
<field name="everything" type="text" indexed="true" stored="true" multiValued="false" termVectors="true"/>
<field name="everything_rev" type="text_rev" indexed="true" stored="false" multiValued="false"/>
<field name="everything_ngram" type="trigram" indexed="true" stored="false" multiValued="false"/>
<field name="everything_noprocess" type="text_noprocess" indexed="true" stored="true" multiValued="false"/>
<!-- Indexes tokens both normally and in reverse for efficient leading wildcard queries. -->
<field name="body_rev" type="text_rev" indexed="true" stored="false" multiValued="false"/>
<field name="body_ngram" type="trigram" indexed="true" stored="false" multiValued="false"/>
<!-- For tracking when the document was indexed -->
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
<!-- For tracking ALM data -->
<field name="counter_total_all" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="counter_total_month" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_scopusCiteCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_citeulikeCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_connoteaCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_mendeleyCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_twitterCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_facebookCount" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<field name="alm_pmc_usage_total_all" type="int" indexed="true" stored="true" default="0" multiValued="false"/>
<!-- Fields for partial documents -->
<field name="doc_partial_parent_id" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="doc_type" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="doc_partial_type" type="string" indexed="true" stored="false" multiValued="false"/>
<field name="doc_partial_body" type="text" indexed="true" stored="true" multiValued="true" termVectors="true"/>
<!-- Fields for academic editor document -->
<field name="ae_name" type="string" indexed="true" stored="true" multiValued="false"/>
<field name="ae_name_facet" type="text_name" indexed="true" stored="true" multiValued="false"/>
<field name="ae_last_name" type="keyword_lowercase" indexed="true" stored="true" multiValued="false"/>
<field name="ae_institute" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="ae_country" type="string" indexed="false" stored="true" multiValued="true"/>
<field name="ae_subject" type="text_subject_search" indexed="true" stored="true" multiValued="true"/>
<field name="ae_subject_facet" type="keyword_lowercase" indexed="true" stored="true" multiValued="true"/>
<field name="trial_registration" type="text" indexed="true" stored="true" multiValued="true"/>
</fields>
<!-- Field to use to determine and enforce document uniqueness.
Unless this field is marked with required="false", it will be a required field
-->
<uniqueKey>id</uniqueKey>
<!-- copyField commands copy one field to another at the time a document
is added to the index. It's used either to index the same field differently,
or to add multiple fields to the same field for easier/faster searching. -->
<copyField source="abstract" dest="abstract_ngram"/>
<copyField source="author_affiliate" dest="affiliate"/>
<copyField source="author_affiliate" dest="affiliate_facet"/>
<copyField source="editor_affiliate" dest="affiliate"/>
<copyField source="editor_affiliate" dest="affiliate_facet"/>
<copyField source="subject" dest="subject_hierarchy"/>
<copyField source="subject" dest="subject_facet"/>
<copyField source="author" dest="author_facet"/>
<copyField source="editor" dest="editor_facet"/>
<copyField source="article_type" dest="article_type_facet"/>
<copyField source="body" dest="body_rev"/>
<copyField source="body" dest="body_ngram"/>
<copyField source="title" dest="title_ngram"/>
<copyField source="everything" dest="everything_rev"/>
<copyField source="everything" dest="everything_ngram"/>
<copyField source="everything" dest="everything_noprocess"/>
<copyField source="ae_subject" dest="ae_subject_facet"/>
<copyField source="ae_name" dest="ae_name_facet"/>
</schema>