active-fedora 6.0.0.pre3 → 6.0.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: 8cb55cd74e7233153b8d46400779006d6073b0ca
4
+ data.tar.gz: 06e3e355f9e205c19d2b553c09fdd5eab57ac25e
5
+ !binary "U0hBNTEy":
6
+ metadata.gz: aa2264732f71d40fea161856ed01103939097e6509fa467d43bef22d91269566d2705253326730341b5e811b8ddac51198ebce1795687d5e8272b89506615666
7
+ data.tar.gz: 462460b1a8e0b046d433ca73935bb58e91583591e3a64bace737dc9a1529ce74f00a14b6280990e145acd0ea340c33e00324e7f95c06b9d1dcb404648ce7fe80
@@ -105,7 +105,9 @@ module ActiveFedora
105
105
  def #{name}(opts={})
106
106
  id_array = []
107
107
  keys = datastreams.keys
108
- id_array = keys.select {|v| v =~ /#{prefix}\d*/}
108
+
109
+ id_array = keys.select {|v| v =~ /^#{prefix}\\d+$/}
110
+
109
111
  if opts[:response_format] == :id_array
110
112
  return id_array
111
113
  else
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.0.0.pre3"
2
+ VERSION = "6.0.0.pre4"
3
3
  end
@@ -1,278 +1,432 @@
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.
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema name="Hydra" version="1.5">
3
+ <!-- NOTE: various comments and unused configuration possibilities have been purged
4
+ from this file. Please refer to http://wiki.apache.org/solr/SchemaXml,
5
+ as well as the default schema file included with Solr -->
6
+
7
+ <uniqueKey>id</uniqueKey>
8
+
9
+ <fields>
10
+ <field name="id" type="string" stored="true" indexed="true" multiValued="false" required="true"/>
11
+ <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
12
+
13
+ <field name="lat" type="tdouble" stored="true" indexed="true" multiValued="false"/>
14
+ <field name="lng" type="tdouble" stored="true" indexed="true" multiValued="false"/>
15
+
16
+ <!--these fields are hard coded in places in hydra-head -->
17
+ <field name="active_fedora_model_s" type="string" stored="true" indexed="true"/>
18
+ <field name="object_profile_display" type="string" stored="true" indexed="true"/>
19
+ <field name="has_model_s" type="string" stored="true" indexed="true"/>
20
+ <field name="is_governed_by_s" type="string" stored="true" indexed="true"/>
21
+
22
+ <!--
23
+ These are hard coded in places in hydra-head, but we hope to fix that.
24
+
25
+ <field name="inheritable_discover_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
26
+ <field name="inheritable_read_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
27
+ <field name="inheritable_edit_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
28
+ <field name="inheritable_discover_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
29
+ <field name="inheritable_read_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
30
+ <field name="inheritable_edit_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
31
+ <field name="read_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
32
+ <field name="discover_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
33
+ <field name="edit_access_person_t" type="string" stored="true" indexed="true" multiValued="true"/>
34
+ <field name="read_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
35
+ <field name="edit_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
36
+ <field name="discover_access_group_t" type="string" stored="true" indexed="true" multiValued="true"/>
37
+ -->
38
+
39
+ <!-- NOTE: not all possible Solr field types are represented in the dynamic fields -->
40
+
41
+ <!-- text (_t...) -->
42
+ <dynamicField name="*_ti" type="text" stored="false" indexed="true" multiValued="false"/>
43
+ <dynamicField name="*_tim" type="text" stored="false" indexed="true" multiValued="true"/>
44
+ <dynamicField name="*_ts" type="text" stored="true" indexed="false" multiValued="false"/>
45
+ <dynamicField name="*_tsm" type="text" stored="true" indexed="false" multiValued="true"/>
46
+ <dynamicField name="*_tsi" type="text" stored="true" indexed="true" multiValued="false"/>
47
+ <dynamicField name="*_tsim" type="text" stored="true" indexed="true" multiValued="true"/>
48
+ <dynamicField name="*_tiv" type="text" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
49
+ <dynamicField name="*_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
50
+ <dynamicField name="*_tsiv" type="text" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
51
+ <dynamicField name="*_tsimv" type="text" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
52
+
53
+ <!-- English text (_te...) -->
54
+ <dynamicField name="*_tei" type="text_en" stored="false" indexed="true" multiValued="false"/>
55
+ <dynamicField name="*_teim" type="text_en" stored="false" indexed="true" multiValued="true"/>
56
+ <dynamicField name="*_tes" type="text_en" stored="true" indexed="false" multiValued="false"/>
57
+ <dynamicField name="*_tesm" type="text_en" stored="true" indexed="false" multiValued="true"/>
58
+ <dynamicField name="*_tesi" type="text_en" stored="true" indexed="true" multiValued="false"/>
59
+ <dynamicField name="*_tesim" type="text_en" stored="true" indexed="true" multiValued="true"/>
60
+ <dynamicField name="*_teiv" type="text_en" stored="false" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
61
+ <dynamicField name="*_teimv" type="text_en" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
62
+ <dynamicField name="*_tesiv" type="text_en" stored="true" indexed="true" multiValued="false" termVectors="true" termPositions="true" termOffsets="true"/>
63
+ <dynamicField name="*_tesimv" type="text_en" stored="true" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
64
+
65
+ <!-- string (_s...) -->
66
+ <dynamicField name="*_si" type="string" stored="false" indexed="true" multiValued="false"/>
67
+ <dynamicField name="*_sim" type="string" stored="false" indexed="true" multiValued="true"/>
68
+ <dynamicField name="*_ss" type="string" stored="true" indexed="false" multiValued="false"/>
69
+ <dynamicField name="*_ssm" type="string" stored="true" indexed="false" multiValued="true"/>
70
+ <dynamicField name="*_ssi" type="string" stored="true" indexed="true" multiValued="false"/>
71
+ <dynamicField name="*_ssim" type="string" stored="true" indexed="true" multiValued="true"/>
72
+ <dynamicField name="*_ssort" type="alphaSort" stored="false" indexed="true" multiValued="false"/>
73
+
74
+ <!-- integer (_i...) -->
75
+ <dynamicField name="*_ii" type="int" stored="false" indexed="true" multiValued="false"/>
76
+ <dynamicField name="*_iim" type="int" stored="false" indexed="true" multiValued="true"/>
77
+ <dynamicField name="*_is" type="int" stored="true" indexed="false" multiValued="false"/>
78
+ <dynamicField name="*_ism" type="int" stored="true" indexed="false" multiValued="true"/>
79
+ <dynamicField name="*_isi" type="int" stored="true" indexed="true" multiValued="false"/>
80
+ <dynamicField name="*_isim" type="int" stored="true" indexed="true" multiValued="true"/>
81
+
82
+ <!-- trie integer (_it...) (for faster range queries) -->
83
+ <dynamicField name="*_iti" type="tint" stored="false" indexed="true" multiValued="false"/>
84
+ <dynamicField name="*_itim" type="tint" stored="false" indexed="true" multiValued="true"/>
85
+ <dynamicField name="*_its" type="tint" stored="true" indexed="false" multiValued="false"/>
86
+ <dynamicField name="*_itsm" type="tint" stored="true" indexed="false" multiValued="true"/>
87
+ <dynamicField name="*_itsi" type="tint" stored="true" indexed="true" multiValued="false"/>
88
+ <dynamicField name="*_itsim" type="tint" stored="true" indexed="true" multiValued="true"/>
89
+
90
+ <!-- date (_dt...) -->
91
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
92
+ Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z -->
93
+ <dynamicField name="*_dti" type="date" stored="false" indexed="true" multiValued="false"/>
94
+ <dynamicField name="*_dtim" type="date" stored="false" indexed="true" multiValued="true"/>
95
+ <dynamicField name="*_dts" type="date" stored="true" indexed="false" multiValued="false"/>
96
+ <dynamicField name="*_dtsm" type="date" stored="true" indexed="false" multiValued="true"/>
97
+ <dynamicField name="*_dtsi" type="date" stored="true" indexed="true" multiValued="false"/>
98
+ <dynamicField name="*_dtsim" type="date" stored="true" indexed="true" multiValued="true"/>
99
+
100
+ <!-- trie date (_dtt...) (for faster range queries) -->
101
+ <dynamicField name="*_dtti" type="tdate" stored="false" indexed="true" multiValued="false"/>
102
+ <dynamicField name="*_dttim" type="tdate" stored="false" indexed="true" multiValued="true"/>
103
+ <dynamicField name="*_dtts" type="tdate" stored="true" indexed="false" multiValued="false"/>
104
+ <dynamicField name="*_dttsm" type="tdate" stored="true" indexed="false" multiValued="true"/>
105
+ <dynamicField name="*_dttsi" type="tdate" stored="true" indexed="true" multiValued="false"/>
106
+ <dynamicField name="*_dttsim" type="tdate" stored="true" indexed="true" multiValued="true"/>
107
+
108
+ <!-- long (_l...) -->
109
+ <dynamicField name="*_li" type="long" stored="false" indexed="true" multiValued="false"/>
110
+ <dynamicField name="*_lim" type="long" stored="false" indexed="true" multiValued="true"/>
111
+ <dynamicField name="*_ls" type="long" stored="true" indexed="false" multiValued="false"/>
112
+ <dynamicField name="*_lsm" type="long" stored="true" indexed="false" multiValued="true"/>
113
+ <dynamicField name="*_lsi" type="long" stored="true" indexed="true" multiValued="false"/>
114
+ <dynamicField name="*_lsim" type="long" stored="true" indexed="true" multiValued="true"/>
115
+
116
+ <!-- trie long (_lt...) (for faster range queries) -->
117
+ <dynamicField name="*_lti" type="tlong" stored="false" indexed="true" multiValued="false"/>
118
+ <dynamicField name="*_ltim" type="tlong" stored="false" indexed="true" multiValued="true"/>
119
+ <dynamicField name="*_lts" type="tlong" stored="true" indexed="false" multiValued="false"/>
120
+ <dynamicField name="*_ltsm" type="tlong" stored="true" indexed="false" multiValued="true"/>
121
+ <dynamicField name="*_ltsi" type="tlong" stored="true" indexed="true" multiValued="false"/>
122
+ <dynamicField name="*_ltsim" type="tlong" stored="true" indexed="true" multiValued="true"/>
123
+
124
+ <!-- double (_db...) -->
125
+ <dynamicField name="*_dbi" type="double" stored="false" indexed="true" multiValued="false"/>
126
+ <dynamicField name="*_dbim" type="double" stored="false" indexed="true" multiValued="true"/>
127
+ <dynamicField name="*_dbs" type="double" stored="true" indexed="false" multiValued="false"/>
128
+ <dynamicField name="*_dbsm" type="double" stored="true" indexed="false" multiValued="true"/>
129
+ <dynamicField name="*_dbsi" type="double" stored="true" indexed="true" multiValued="false"/>
130
+ <dynamicField name="*_dbsim" type="double" stored="true" indexed="true" multiValued="true"/>
131
+
132
+ <!-- trie double (_dbt...) (for faster range queries) -->
133
+ <dynamicField name="*_dbti" type="tdouble" stored="false" indexed="true" multiValued="false"/>
134
+ <dynamicField name="*_dbtim" type="tdouble" stored="false" indexed="true" multiValued="true"/>
135
+ <dynamicField name="*_dbts" type="tdouble" stored="true" indexed="false" multiValued="false"/>
136
+ <dynamicField name="*_dbtsm" type="tdouble" stored="true" indexed="false" multiValued="true"/>
137
+ <dynamicField name="*_dbtsi" type="tdouble" stored="true" indexed="true" multiValued="false"/>
138
+ <dynamicField name="*_dbtsim" type="tdouble" stored="true" indexed="true" multiValued="true"/>
139
+
140
+ <!-- float (_f...) -->
141
+ <dynamicField name="*_fi" type="float" stored="false" indexed="true" multiValued="false"/>
142
+ <dynamicField name="*_fim" type="float" stored="false" indexed="true" multiValued="true"/>
143
+ <dynamicField name="*_fs" type="float" stored="true" indexed="false" multiValued="false"/>
144
+ <dynamicField name="*_fsm" type="float" stored="true" indexed="false" multiValued="true"/>
145
+ <dynamicField name="*_fsi" type="float" stored="true" indexed="true" multiValued="false"/>
146
+ <dynamicField name="*_fsim" type="float" stored="true" indexed="true" multiValued="true"/>
147
+
148
+ <!-- trie float (_ft...) (for faster range queries) -->
149
+ <dynamicField name="*_fti" type="tfloat" stored="false" indexed="true" multiValued="false"/>
150
+ <dynamicField name="*_ftim" type="tfloat" stored="false" indexed="true" multiValued="true"/>
151
+ <dynamicField name="*_fts" type="tfloat" stored="true" indexed="false" multiValued="false"/>
152
+ <dynamicField name="*_ftsm" type="tfloat" stored="true" indexed="false" multiValued="true"/>
153
+ <dynamicField name="*_ftsi" type="tfloat" stored="true" indexed="true" multiValued="false"/>
154
+ <dynamicField name="*_ftsim" type="tfloat" stored="true" indexed="true" multiValued="true"/>
155
+
156
+ <!-- boolean (_b...) -->
157
+ <dynamicField name="*_bi" type="boolean" stored="false" indexed="true" multiValued="false"/>
158
+ <dynamicField name="*_bs" type="boolean" stored="true" indexed="false" multiValued="false"/>
159
+ <dynamicField name="*_bsi" type="boolean" stored="true" indexed="true" multiValued="false"/>
160
+
161
+ <!-- Type used to index the lat and lon components for the "location" FieldType -->
162
+ <dynamicField name="*_coordinate" type="tdouble" indexed="true" stored="false" />
163
+
164
+ <!-- location (_ll...) -->
165
+ <dynamicField name="*_lli" type="location" stored="false" indexed="true" multiValued="false"/>
166
+ <dynamicField name="*_llim" type="location" stored="false" indexed="true" multiValued="true"/>
167
+ <dynamicField name="*_lls" type="location" stored="true" indexed="false" multiValued="false"/>
168
+ <dynamicField name="*_llsm" type="location" stored="true" indexed="false" multiValued="true"/>
169
+ <dynamicField name="*_llsi" type="location" stored="true" indexed="true" multiValued="false"/>
170
+ <dynamicField name="*_llsim" type="location" stored="true" indexed="true" multiValued="true"/>
171
+
172
+ <!-- you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
173
+ <field name="all_text_timv" type="text" stored="false" indexed="true" multiValued="true" termVectors="true" termPositions="true" termOffsets="true"/>
174
+
175
+ <!-- deprecated fields from pre-Solr 4.0 pre-hydra 5.0 -->
176
+ <!--
177
+ <field name="marc_display" type="string" indexed="false" stored="true" multiValued="false"/>
178
+ <field name="title_display" type="string" indexed="false" stored="true" multiValued="false"/>
179
+ <field name="title_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
180
+ <field name="subtitle_display" type="string" indexed="false" stored="true" multiValued="false"/>
181
+ <field name="subtitle_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
182
+ <field name="author_display" type="string" indexed="false" stored="true" multiValued="false"/>
183
+ <field name="author_vern_display" type="string" indexed="false" stored="true" multiValued="false"/>
17
184
  -->
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
185
+ <!-- these fields are also used for display, so they must be stored -->
186
+ <!--
187
+ <field name="isbn_t" type="text" indexed="true" stored="true" multiValued="true"/>
188
+ <field name="language_facet" type="string" indexed="true" stored="true" multiValued="true" />
189
+ <field name="subject_topic_facet" type="string" indexed="true" stored="true" multiValued="true" />
190
+ <field name="subject_era_facet" type="string" indexed="true" stored="true" multiValued="true" />
191
+ <field name="subject_geo_facet" type="string" indexed="true" stored="true" multiValued="true" />
30
192
  -->
193
+ <!-- pub_date is used for facet and display so it must be indexed and stored -->
194
+ <!--
195
+ <field name="pub_date" type="string" indexed="true" stored="true" multiValued="true"/>
196
+ -->
197
+ <!-- pub_date sort uses new trie-based int fields, which are recommended for any int and are displayable, sortable, and range-quer
198
+ we use 'tint' for faster range-queries. -->
199
+ <!--
200
+ <field name="pub_date_sort" type="tint" indexed="true" stored="true" multiValued="false"/>
201
+ -->
202
+ <!-- format is used for facet, display, and choosing which partial to use for the show view, so it must be stored and indexed -->
203
+ <!--
204
+ <field name="format" type="string" indexed="true" stored="true"/>
205
+
206
+ <dynamicField name="*_i" type="int" indexed="true" stored="true"/>
207
+ <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
208
+ <dynamicField name="*_l" type="long" indexed="true" stored="true"/>
209
+ <dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
210
+ <dynamicField name="*_txt" type="text_general" indexed="true" stored="true" multiValued="true"/>
211
+ <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
212
+ <dynamicField name="*_f" type="float" indexed="true" stored="true"/>
213
+ <dynamicField name="*_d" type="double" indexed="true" stored="true"/>
214
+
215
+ <dynamicField name="ignored_*" type="ignored" multiValued="true"/>
216
+ <dynamicField name="attr_*" type="text_general" indexed="true" stored="true" multiValued="true"/>
217
+
218
+ <dynamicField name="random_*" type="random" />
219
+
220
+ <dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
221
+ <dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true" />
222
+ <dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="false" />
223
+ <dynamicField name="*_unstem_search" type="text_general" indexed="true" stored="false" multiValued="true" />
224
+ <dynamicField name="*spell" type="textSpell" indexed="true" stored="false" multiValued="true" />
225
+ -->
226
+ <!-- uncomment the following to ignore any fields that don't already match an existing
227
+ field name or dynamic field, rather than reporting them as an error.
228
+ alternately, change the type="ignored" to some other type e.g. "text" if you want
229
+ unknown fields indexed and/or stored by default -->
230
+ <!--dynamicField name="*" type="ignored" multiValued="true" /-->
31
231
 
32
- <schema name="salt" version="1.1">
33
- <!-- attribute "name" is the name of this schema and is only used for display purposes.
34
- Applications should change this to reflect the nature of the search collection.
35
- version="1.1" is Solr's version number for the schema syntax and semantics. It should
36
- not normally be changed by applications.
37
- 1.0: multiValued attribute did not exist, all fields are multiValued by nature
38
- 1.1: multiValued attribute introduced, false by default -->
39
-
40
- <types>
41
- <!-- field type definitions. The "name" attribute is
42
- just a label to be used by field definitions. The "class"
43
- attribute and any other attributes determine the real
44
- behavior of the fieldType.
45
- Class names starting with "solr" refer to java classes in the
46
- org.apache.solr.analysis package.
47
- -->
48
-
49
- <!-- The StrField type is not analyzed, but indexed/stored verbatim.
50
- - StrField and TextField support an optional compressThreshold which
51
- limits compression (if enabled in the derived fields) to values which
52
- exceed a certain size (in characters).
53
- -->
54
- <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
232
+ <!-- END hydra deprecated items -->
55
233
 
56
- <!-- boolean type: "true" or "false" -->
57
- <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
234
+ </fields>
58
235
 
59
- <!-- The optional sortMissingLast and sortMissingFirst attributes are
60
- currently supported on types that are sorted internally as strings.
61
- - If sortMissingLast="true", then a sort on this field will cause documents
62
- without the field to come after documents with the field,
63
- regardless of the requested sort order (asc or desc).
64
- - If sortMissingFirst="true", then a sort on this field will cause documents
65
- without the field to come before documents with the field,
66
- regardless of the requested sort order.
67
- - If sortMissingLast="false" and sortMissingFirst="false" (the default),
68
- then default lucene sorting will be used which places docs without the
69
- field first in an ascending sort and last in a descending sort.
70
- -->
236
+ <!-- START hydra deprecated items -->
237
+ <!--
238
+ <defaultSearchField>text</defaultSearchField>
239
+ -->
240
+ <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
241
+ <!--
242
+ <solrQueryParser defaultOperator="AND"/>
243
+
244
+ <copyField source="title_t" dest="title_unstem_search"/>
245
+ <copyField source="subtitle_t" dest="subtitle_unstem_search"/>
246
+ <copyField source="title_addl_t" dest="title_addl_unstem_search"/>
247
+ <copyField source="title_added_entry_t" dest="title_added_entry_unstem_search"/>
248
+ <copyField source="title_series_t" dest="title_series_unstem_search"/>
249
+ <copyField source="author_t" dest="author_unstem_search"/>
250
+ <copyField source="author_addl_t" dest="author_addl_unstem_search"/>
251
+ <copyField source="subject_t" dest="subject_unstem_search"/>
252
+ <copyField source="subject_addl_t" dest="subject_addl_unstem_search"/>
253
+ <copyField source="subject_topic_facet" dest="subject_topic_unstem_search"/>
254
+ -->
255
+ <!-- sort fields -->
256
+ <!--
257
+ <copyField source="pub_date" dest="pub_date_sort"/>
258
+ -->
71
259
 
260
+ <!-- spellcheck fields -->
261
+ <!-- default spell check; should match fields for default request handler -->
262
+ <!-- it won't work with a copy of a copy field -->
263
+ <!--
264
+ <copyField source="*_t" dest="spell"/>
265
+ <copyField source="*_facet" dest="spell"/>
266
+ -->
267
+ <!-- title spell check; should match fields for title request handler -->
268
+ <!--
269
+ <copyField source="title_t" dest="title_spell"/>
270
+ <copyField source="subtitle_t" dest="title_spell"/>
271
+ <copyField source="addl_titles_t" dest="title_spell"/>
272
+ <copyField source="title_added_entry_t" dest="title_spell"/>
273
+ <copyField source="title_series_t" dest="title_spell"/>
274
+ -->
275
+ <!-- author spell check; should match fields for author request handler -->
276
+ <!--
277
+ <copyField source="author_t" dest="author_spell"/>
278
+ <copyField source="author_addl_t" dest="author_spell"/>
279
+ -->
280
+ <!-- subject spell check; should match fields for subject request handler -->
281
+ <!--
282
+ <copyField source="subject_topic_facet" dest="subject_spell"/>
283
+ <copyField source="subject_t" dest="subject_spell"/>
284
+ <copyField source="subject_addl_t" dest="subject_spell"/>
285
+ -->
286
+
287
+ <!-- OpenSearch query field should match request handler search fields -->
288
+ <!--
289
+ <copyField source="title_t" dest="opensearch_display"/>
290
+ <copyField source="subtitle_t" dest="opensearch_display"/>
291
+ <copyField source="addl_titles_t" dest="opensearch_display"/>
292
+ <copyField source="title_added_entry_t" dest="opensearch_display"/>
293
+ <copyField source="title_series_t" dest="opensearch_display"/>
294
+ <copyField source="author_t" dest="opensearch_display"/>
295
+ <copyField source="author_addl_t" dest="opensearch_display"/>
296
+ <copyField source="subject_topic_facet" dest="opensearch_display"/>
297
+ <copyField source="subject_t" dest="opensearch_display"/>
298
+ <copyField source="subject_addl_t" dest="opensearch_display"/>
299
+ -->
72
300
 
73
- <!-- numeric field types that store and index the text
74
- value verbatim (and hence don't support range queries, since the
75
- lexicographic ordering isn't equal to the numeric ordering) -->
76
- <fieldType name="integer" class="solr.IntField" omitNorms="true"/>
77
- <fieldType name="long" class="solr.LongField" omitNorms="true"/>
78
- <fieldType name="float" class="solr.FloatField" omitNorms="true"/>
79
- <fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
301
+ <!-- Above, multiple source fields are copied to the [text] field.
302
+ Another way to map multiple source fields to the same
303
+ destination field is to use the dynamic field syntax.
304
+ copyField also supports a maxChars to copy setting. -->
80
305
 
306
+ <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
307
+ <!--
308
+ <copyField source="*_s" dest="text"/>
309
+ <copyField source="*_t" dest="text"/>
310
+ <copyField source="*_facet" dest="text"/>
311
+ -->
312
+ <!-- copy name to alphaNameSort, a field designed for sorting by name -->
313
+ <!-- <copyField source="name" dest="alphaNameSort"/> -->
81
314
 
82
- <!-- Numeric field types that manipulate the value into
83
- a string value that isn't human-readable in its internal form,
84
- but with a lexicographic ordering the same as the numeric ordering,
85
- so that range queries work correctly. -->
86
- <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
87
- <fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
88
- <fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
89
- <fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
315
+ <!-- END hydra deprecated items -->
90
316
 
317
+ <!-- copy fields; note that you must define copyField source and dest fields explicity or schemaBrowser doesn't work -->
318
+ <!--
319
+ <copyField source="some_field" dest="all_text_timv" />
320
+ -->
91
321
 
92
- <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
93
- is a more restricted form of the canonical representation of dateTime
94
- http://www.w3.org/TR/xmlschema-2/#dateTime
95
- The trailing "Z" designates UTC time and is mandatory.
322
+ <types>
323
+ <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
324
+ <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
325
+ <fieldType name="rand" class="solr.RandomSortField" omitNorms="true"/>
326
+
327
+ <!-- Default numeric field types. -->
328
+ <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
329
+ <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
330
+ <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
331
+ <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
332
+
333
+ <!-- trie numeric field types for faster range queries -->
334
+ <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
335
+ <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
336
+ <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
337
+ <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
338
+
339
+ <!-- The format for this date field is of the form 1995-12-31T23:59:59Z
96
340
  Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
97
- All other components are mandatory.
98
-
99
- Expressions can also be used to denote calculations that should be
100
- performed relative to "NOW" to determine the value, ie...
101
-
102
- NOW/HOUR
103
- ... Round to the start of the current hour
104
- NOW-1DAY
105
- ... Exactly 1 day prior to now
106
- NOW/DAY+6MONTHS+3DAYS
107
- ... 6 months and 3 days in the future from the start of
108
- the current day
109
-
110
- Consult the DateField javadocs for more information.
111
341
  -->
112
- <fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
113
-
114
-
115
- <!-- The "RandomSortField" is not used to store or search any
116
- data. You can declare fields of this type it in your schema
117
- to generate psuedo-random orderings of your docs for sorting
118
- purposes. The ordering is generated based on the field name
119
- and the version of the index, As long as the index version
120
- remains unchanged, and the same field name is reused,
121
- the ordering of the docs will be consistent.
122
- If you want differend psuedo-random orderings of documents,
123
- for the same version of the index, use a dynamicField and
124
- change the name
125
- -->
126
- <fieldType name="random" class="solr.RandomSortField" indexed="true" />
127
-
128
- <!-- solr.TextField allows the specification of custom text analyzers
129
- specified as a tokenizer and a list of token filters. Different
130
- analyzers may be specified for indexing and querying.
131
-
132
- The optional positionIncrementGap puts space between multiple fields of
133
- this type on the same document, with the purpose of preventing false phrase
134
- matching across fields.
135
-
136
- For more info on customizing your analyzer chain, please see
137
- http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
342
+ <fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>
343
+ <!-- A Trie based date field for faster date range queries and date faceting. -->
344
+ <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6" positionIncrementGap="0"/>
345
+
346
+
347
+ <!-- This point type indexes the coordinates as separate fields (subFields)
348
+ If subFieldType is defined, it references a type, and a dynamic field
349
+ definition is created matching *___<typename>. Alternately, if
350
+ subFieldSuffix is defined, that is used to create the subFields.
351
+ Example: if subFieldType="double", then the coordinates would be
352
+ indexed in fields myloc_0___double,myloc_1___double.
353
+ Example: if subFieldSuffix="_d" then the coordinates would be indexed
354
+ in fields myloc_0_d,myloc_1_d
355
+ The subFields are an implementation detail of the fieldType, and end
356
+ users normally should not need to know about them.
138
357
  -->
139
-
140
- <!-- One can also specify an existing Analyzer class that has a
141
- default constructor via the class attribute on the analyzer element
142
- <fieldType name="text_greek" class="solr.TextField">
143
- <analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
144
- </fieldType>
358
+ <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
359
+
360
+ <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
361
+ <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
362
+
363
+ <!-- An alternative geospatial field type new to Solr 4. It supports multiValued and polygon shapes.
364
+ For more information about this and other Spatial fields new to Solr 4, see:
365
+ http://wiki.apache.org/solr/SolrAdaptersForLuceneSpatial4
145
366
  -->
146
-
367
+ <fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType"
368
+ geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
369
+
370
+ <fieldType name="text" class="solr.TextField" omitNorms="false">
371
+ <analyzer>
372
+ <tokenizer class="solr.ICUTokenizerFactory"/>
373
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
374
+ <filter class="solr.TrimFilterFactory"/>
375
+ </analyzer>
376
+ </fieldType>
377
+
147
378
  <!-- A text field that only splits on whitespace for exact matching of words -->
148
379
  <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
149
380
  <analyzer>
150
381
  <tokenizer class="solr.WhitespaceTokenizerFactory"/>
382
+ <filter class="solr.TrimFilterFactory"/>
151
383
  </analyzer>
152
384
  </fieldType>
153
-
154
- <!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
155
- words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
156
- so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
157
- Synonyms and stopwords are customized by external files, and stemming is enabled.
158
- Duplicate tokens at the same position (which may result from Stemmed Synonyms or
159
- WordDelim parts) are removed.
385
+
386
+ <!-- single token analyzed text, for sorting. Punctuation is significant. -->
387
+ <fieldtype name="alphaSort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
388
+ <analyzer>
389
+ <tokenizer class="solr.KeywordTokenizerFactory" />
390
+ <filter class="solr.ICUFoldingFilterFactory"/>
391
+ <filter class="solr.TrimFilterFactory" />
392
+ </analyzer>
393
+ </fieldtype>
394
+
395
+ <!-- A text field with defaults appropriate for English -->
396
+ <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
397
+ <analyzer>
398
+ <tokenizer class="solr.ICUTokenizerFactory"/>
399
+ <filter class="solr.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
400
+ <filter class="solr.EnglishPossessiveFilterFactory"/>
401
+ <!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
402
+ <filter class="solr.EnglishMinimalStemFilterFactory"/>
403
+ <!--
404
+ <filter class="solr.PorterStemFilterFactory"/>
160
405
  -->
161
- <fieldType name="text" class="solr.TextField" positionIncrementGap="100">
406
+ <filter class="solr.TrimFilterFactory"/>
407
+ </analyzer>
408
+ </fieldType>
409
+
410
+ <!-- queries for paths match documents at that path, or in descendent paths -->
411
+ <fieldType name="descendent_path" class="solr.TextField">
162
412
  <analyzer type="index">
163
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
164
- <!-- in this example, we will only use synonyms at query time
165
- <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
166
- -->
167
- <!-- Case insensitive stop word removal.
168
- enablePositionIncrements=true ensures that a 'gap' is left to
169
- allow for accurate phrase queries.
170
- -->
171
- <filter class="solr.StopFilterFactory"
172
- ignoreCase="true"
173
- words="stopwords.txt"
174
- enablePositionIncrements="true"
175
- />
176
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
177
- <filter class="solr.LowerCaseFilterFactory"/>
178
- <filter class="solr.SnowballPorterFilterFactory" language="English"/>
179
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
413
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
180
414
  </analyzer>
181
415
  <analyzer type="query">
182
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
183
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
184
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
185
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
186
- <filter class="solr.LowerCaseFilterFactory"/>
187
- <filter class="solr.SnowballPorterFilterFactory" language="English"/>
188
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
416
+ <tokenizer class="solr.KeywordTokenizerFactory" />
189
417
  </analyzer>
190
418
  </fieldType>
191
-
192
-
193
- <!-- Less flexible matching, but less false matches. Probably not ideal for product names,
194
- but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
195
- <fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
196
- <analyzer>
197
- <tokenizer class="solr.WhitespaceTokenizerFactory"/>
198
- <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
199
- <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
200
- <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
201
- <filter class="solr.LowerCaseFilterFactory"/>
202
- <filter class="solr.SnowballPorterFilterFactory" language="English"/>
203
- <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
419
+
420
+ <!-- queries for paths match documents at that path, or in ancestor paths -->
421
+ <fieldType name="ancestor_path" class="solr.TextField">
422
+ <analyzer type="index">
423
+ <tokenizer class="solr.KeywordTokenizerFactory" />
204
424
  </analyzer>
205
- </fieldType>
206
-
207
- <!-- This is an example of using the KeywordTokenizer along
208
- With various TokenFilterFactories to produce a sortable field
209
- that does not include some properties of the source text
210
- -->
211
- <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
212
- <analyzer>
213
- <!-- KeywordTokenizer does no actual tokenizing, so the entire
214
- input string is preserved as a single token
215
- -->
216
- <tokenizer class="solr.KeywordTokenizerFactory"/>
217
- <!-- The LowerCase TokenFilter does what you expect, which can be
218
- when you want your sorting to be case insensitive
219
- -->
220
- <filter class="solr.LowerCaseFilterFactory" />
221
- <!-- The TrimFilter removes any leading or trailing whitespace -->
222
- <filter class="solr.TrimFilterFactory" />
223
- <!-- The PatternReplaceFilter gives you the flexibility to use
224
- Java Regular expression to replace any sequence of characters
225
- matching a pattern with an arbitrary replacement string,
226
- which may include back refrences to portions of the orriginal
227
- string matched by the pattern.
228
-
229
- See the Java Regular Expression documentation for more
230
- infomation on pattern and replacement string syntax.
231
-
232
- http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
233
- -->
234
- <filter class="solr.PatternReplaceFilterFactory"
235
- pattern="([^a-z])" replacement="" replace="all"
236
- />
425
+ <analyzer type="query">
426
+ <tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
237
427
  </analyzer>
238
428
  </fieldType>
239
-
240
- <!-- since fields of this type are by default not stored or indexed, any data added to
241
- them will be ignored outright
242
- -->
243
- <fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />
244
-
245
- </types>
246
-
247
- <fields>
248
-
249
- <field name="id" type="string" indexed="true" stored="true" required="true" />
250
- <field name="text" type="text" indexed="true" stored="true" multiValued="true"/>
251
- <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
252
-
253
- <!-- format is used for facet, display, and choosing which partial to use for the show view, so it must be stored and indexed -->
254
- <field name="format" type="string" indexed="true" stored="true"/>
255
-
256
- <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
257
- <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
258
- <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
259
- <dynamicField name="*_t" type="text" indexed="true" stored="true" multiValued="true"/>
260
- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
261
- <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
262
- <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
263
- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
264
-
265
- <dynamicField name="random*" type="random" />
266
-
267
- <dynamicField name="*_sort" type="string" indexed="true" stored="false" multiValued="false" />
268
- <dynamicField name="*_facet" type="string" indexed="true" stored="true" multiValued="true" />
269
- <dynamicField name="*_display" type="string" indexed="false" stored="true" multiValued="true" />
270
-
271
- </fields>
272
-
273
- <uniqueKey>id</uniqueKey>
274
- <defaultSearchField>text</defaultSearchField>
275
- <solrQueryParser defaultOperator="AND" />
276
- <copyField source="*_facet" dest="text" />
277
-
429
+
430
+ </types>
431
+
278
432
  </schema>