-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.xml
186 lines (159 loc) · 9.67 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
<?xml version="1.0" encoding="UTF-8"?>
<schema name="geoblacklight-schema" version="1.6">
<uniqueKey>layer_slug_s</uniqueKey>
<fields>
<field name="_version_" type="long" stored="true" indexed="true"/>
<field name="timestamp" type="date" stored="true" indexed="true" default="NOW"/>
<field name="layer_slug_s" type="string" stored="true" indexed="true" required="true"/>
<field name="geoblacklight_version" type="string" stored="true" indexed="true"/>
<field name="uuid" type="string" stored="true" indexed="true"/><!-- deprecated -->
<!-- core generated fields -->
<field name="text" type="text_en" stored="false" indexed="true" multiValued="true"
termVectors="true" termPositions="true" termOffsets="true" />
<!-- dynamic field with simple types by suffix -->
<dynamicField name="*_b" type="boolean" stored="true" indexed="true"/>
<dynamicField name="*_d" type="double" stored="true" indexed="true"/>
<dynamicField name="*_dt" type="date" stored="true" indexed="true"/>
<dynamicField name="*_f" type="float" stored="true" indexed="true"/>
<dynamicField name="*_i" type="int" stored="true" indexed="true"/>
<dynamicField name="*_im" type="int" stored="true" indexed="true" multiValued="true" />
<dynamicField name="*_l" type="long" stored="true" indexed="true"/>
<dynamicField name="*_s" type="string" stored="true" indexed="true"/>
<dynamicField name="*_ss" type="string" stored="true" indexed="false"/>
<dynamicField name="*_si" type="string" stored="false" indexed="true"/>
<dynamicField name="*_ssi" type="string" stored="true" indexed="true" omitNorms="true" />
<dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true" />
<dynamicField name="*_sm" type="string" stored="true" indexed="true" multiValued="true" />
<dynamicField name="*_url" type="string" stored="true" indexed="false"/>
<dynamicField name="*_blob" type="binary" stored="true" indexed="false"/>
<!-- dynamic Text fields by suffix without storage -->
<dynamicField name="*_t" type="text_en" stored="false" indexed="true"
termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tm" type="text_en" stored="false" indexed="true" multiValued="true"
termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_ti" type="text_en" stored="false" indexed="true"
termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_tmi" type="text_en" stored="false" indexed="true" multiValued="true"
termVectors="true" termPositions="true" termOffsets="true"/>
<dynamicField name="*_sort" type="text_sort" stored="false" indexed="true" multiValued="false"/>
<dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
<dynamicField name="*suggest" type="textSuggest" indexed="true" stored="false" multiValued="true" />
<!-- Spatial field types:
Solr3:
<field name="my_pt">83.1,-117.312</field>
as (y,x)
Solr4:
<field name="my_bbox">-117.312 83.1 -115.39 84.31</field>
as (W S E N)
<field name="my_geom">ENVELOPE(-117.312, -115.39, 84.31, 83.1)</field>
as (W E N S)
<field name="my_jts">POLYGON((1 8, 1 9, 2 9, 2 8, 1 8))</field>
as WKT for point, linestring, polygon
-->
<dynamicField name="*_pt" type="location" stored="true" indexed="true"/>
<dynamicField name="*_bbox" type="location_rpt" stored="true" indexed="true"/><!-- deprecated -->
<dynamicField name="*_geom" type="location_rpt" stored="true" indexed="true"/>
<!-- <dynamicField name="*_jts" type="location_jts" stored="true" indexed="true"/> -->
</fields>
<types>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="int" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="float" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="long" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="double" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z.
The trailing "Z" designates UTC time and is mandatory.
A Trie based date field for faster date range queries and date faceting. -->
<fieldType name="date" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
<fieldtype name="binary" class="solr.BinaryField"/>
<!-- A text field with defaults appropriate for English: it
tokenizes with StandardTokenizer, down cases, and
finally applies Porter's stemming. -->
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPossessiveFilterFactory"/>
<filter class="solr.PorterStemFilterFactory"/>
</analyzer>
</fieldType>
<!-- for alpha sorting as a single token -->
<fieldType name="text_sort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.TrimFilterFactory" />
<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z0-9 ])" replacement="" replace="all"/>
</analyzer>
</fieldType>
<!-- for spell checking -->
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_en.txt"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- for suggestions -->
<fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<filter class="solr.LengthFilterFactory" min="2" max="255"/>
</analyzer>
</fieldType>
<!-- Spatial field types -->
<fieldType name="location" class="solr.LatLonType" subFieldSuffix="_d"/>
<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
distErrPct="0.025"
maxDistErr="0.000009"
distanceUnits="degrees"
/>
</types>
<!-- for scoring formula -->
<copyField source="dct_spatial_sm" dest="dct_spatial_tmi" maxChars="10000"/>
<copyField source="dct_temporal_sm" dest="dct_temporal_tmi" maxChars="10000"/>
<copyField source="dc_creator_sm" dest="dc_creator_tmi" maxChars="1000"/>
<copyField source="dc_description_s" dest="dc_description_ti" maxChars="10000"/>
<copyField source="dc_format_s" dest="dc_format_ti" maxChars="100"/>
<copyField source="dc_identifier_s" dest="dc_identifier_ti" maxChars="100"/>
<copyField source="dc_publisher_s" dest="dc_publisher_ti" maxChars="1000"/>
<copyField source="dc_rights_s" dest="dc_rights_ti" maxChars="100"/>
<copyField source="dct_provenance_s" dest="dct_provenance_ti" maxChars="1000"/>
<copyField source="dc_subject_sm" dest="dc_subject_tmi" maxChars="10000"/>
<copyField source="dc_title_s" dest="dc_title_ti" maxChars="1000"/>
<copyField source="dct_isPartOf_sm" dest="dct_isPartOf_tmi" maxChars="1000"/>
<copyField source="layer_geom_type_s" dest="layer_geom_type_ti" maxChars="100"/>
<copyField source="layer_slug_s" dest="layer_slug_ti" maxChars="100"/>
<!-- core text search -->
<copyField source="*_ti" dest="text" />
<copyField source="*_tmi" dest="text" />
<!-- for sorting text fields -->
<copyField source="dct_provenance_s" dest="dct_provenance_sort"/>
<copyField source="dc_publisher_s" dest="dc_publisher_sort"/>
<copyField source="dc_title_s" dest="dc_title_sort"/>
<!-- for spell checking -->
<copyField source="dc_title_s" dest="spell"/>
<copyField source="dc_creator_sm" dest="spell"/>
<copyField source="dc_publisher_s" dest="spell"/>
<copyField source="dct_provenance_s" dest="spell"/>
<copyField source="dc_subject_sm" dest="spell"/>
<copyField source="dct_spatial_sm" dest="spell"/>
<!-- for suggestions -->
<copyField source="dc_title_s" dest="suggest"/>
<copyField source="dc_creator_sm" dest="suggest"/>
<copyField source="dc_publisher_s" dest="suggest"/>
<copyField source="dct_provenance_s" dest="suggest"/>
<copyField source="dc_subject_sm" dest="suggest"/>
<copyField source="dct_spatial_sm" dest="suggest"/>
</schema>