solrsrv 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +11 -0
- data/LICENSE +20 -0
- data/README.md +27 -0
- data/Rakefile +28 -0
- data/VERSION +1 -0
- data/apache-solr-1.4.0/README.txt +42 -0
- data/apache-solr-1.4.0/etc/jetty.xml +212 -0
- data/apache-solr-1.4.0/etc/webdefault.xml +379 -0
- data/apache-solr-1.4.0/example-DIH/README.txt +43 -0
- data/apache-solr-1.4.0/example-DIH/hsqldb/ex.backup +0 -0
- data/apache-solr-1.4.0/example-DIH/hsqldb/ex.data +0 -0
- data/apache-solr-1.4.0/example-DIH/hsqldb/ex.log +2 -0
- data/apache-solr-1.4.0/example-DIH/hsqldb/ex.properties +17 -0
- data/apache-solr-1.4.0/example-DIH/hsqldb/ex.script +12 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/admin-extra.html +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/db-data-config.xml +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/elevate.xml +36 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/protwords.txt +21 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/schema.xml +356 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/scripts.conf +24 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/solrconfig.xml +705 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/stopwords.txt +58 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/synonyms.txt +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example.xsl +132 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example_atom.xsl +63 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/example_rss.xsl +62 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/conf/xslt/luke.xsl +345 -0
- data/apache-solr-1.4.0/example-DIH/solr/db/lib/hsqldb-1.8.0.10.jar +0 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/data-config.xml +11 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/protwords.txt +21 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/schema.xml +370 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/solrconfig.xml +807 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/stopwords.txt +58 -0
- data/apache-solr-1.4.0/example-DIH/solr/mail/conf/synonyms.txt +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/admin-extra.html +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/elevate.xml +36 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/protwords.txt +21 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/rss-data-config.xml +26 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/schema.xml +316 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/scripts.conf +24 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/solrconfig.xml +704 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/stopwords.txt +58 -0
- data/apache-solr-1.4.0/example-DIH/solr/rss/conf/synonyms.txt +31 -0
- data/apache-solr-1.4.0/example-DIH/solr/solr.xml +8 -0
- data/apache-solr-1.4.0/exampledocs/books.csv +11 -0
- data/apache-solr-1.4.0/exampledocs/hd.xml +48 -0
- data/apache-solr-1.4.0/exampledocs/ipod_other.xml +52 -0
- data/apache-solr-1.4.0/exampledocs/ipod_video.xml +36 -0
- data/apache-solr-1.4.0/exampledocs/mem.xml +60 -0
- data/apache-solr-1.4.0/exampledocs/monitor.xml +31 -0
- data/apache-solr-1.4.0/exampledocs/monitor2.xml +30 -0
- data/apache-solr-1.4.0/exampledocs/mp500.xml +39 -0
- data/apache-solr-1.4.0/exampledocs/payload.xml +57 -0
- data/apache-solr-1.4.0/exampledocs/post.jar +0 -0
- data/apache-solr-1.4.0/exampledocs/post.sh +28 -0
- data/apache-solr-1.4.0/exampledocs/sd500.xml +34 -0
- data/apache-solr-1.4.0/exampledocs/solr.xml +38 -0
- data/apache-solr-1.4.0/exampledocs/test_utf8.sh +83 -0
- data/apache-solr-1.4.0/exampledocs/utf8-example.xml +42 -0
- data/apache-solr-1.4.0/exampledocs/vidcard.xml +54 -0
- data/apache-solr-1.4.0/lib/jetty-6.1.3.jar +0 -0
- data/apache-solr-1.4.0/lib/jetty-util-6.1.3.jar +0 -0
- data/apache-solr-1.4.0/lib/jsp-2.1/ant-1.6.5.jar +0 -0
- data/apache-solr-1.4.0/lib/jsp-2.1/core-3.1.1.jar +0 -0
- data/apache-solr-1.4.0/lib/jsp-2.1/jsp-2.1.jar +0 -0
- data/apache-solr-1.4.0/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
- data/apache-solr-1.4.0/lib/servlet-api-2.5-6.1.3.jar +0 -0
- data/apache-solr-1.4.0/logs/.gitkeep +0 -0
- data/apache-solr-1.4.0/multicore/README.txt +3 -0
- data/apache-solr-1.4.0/multicore/core0/conf/schema.xml +41 -0
- data/apache-solr-1.4.0/multicore/core0/conf/solrconfig.xml +40 -0
- data/apache-solr-1.4.0/multicore/core1/conf/schema.xml +41 -0
- data/apache-solr-1.4.0/multicore/core1/conf/solrconfig.xml +40 -0
- data/apache-solr-1.4.0/multicore/exampledocs/ipod_other.xml +34 -0
- data/apache-solr-1.4.0/multicore/exampledocs/ipod_video.xml +22 -0
- data/apache-solr-1.4.0/multicore/solr.xml +35 -0
- data/apache-solr-1.4.0/solr/README.txt +54 -0
- data/apache-solr-1.4.0/solr/conf/admin-extra.html +31 -0
- data/apache-solr-1.4.0/solr/conf/elevate.xml +36 -0
- data/apache-solr-1.4.0/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/apache-solr-1.4.0/solr/conf/protwords.txt +21 -0
- data/apache-solr-1.4.0/solr/conf/schema.xml +569 -0
- data/apache-solr-1.4.0/solr/conf/scripts.conf +24 -0
- data/apache-solr-1.4.0/solr/conf/solrconfig.xml +1033 -0
- data/apache-solr-1.4.0/solr/conf/spellings.txt +2 -0
- data/apache-solr-1.4.0/solr/conf/stopwords.txt +58 -0
- data/apache-solr-1.4.0/solr/conf/synonyms.txt +31 -0
- data/apache-solr-1.4.0/solr/conf/xslt/example.xsl +132 -0
- data/apache-solr-1.4.0/solr/conf/xslt/example_atom.xsl +67 -0
- data/apache-solr-1.4.0/solr/conf/xslt/example_rss.xsl +66 -0
- data/apache-solr-1.4.0/solr/conf/xslt/luke.xsl +337 -0
- data/apache-solr-1.4.0/start.jar +0 -0
- data/apache-solr-1.4.0/webapps/solr.war +0 -0
- data/bin/solrsrv +39 -0
- data/lib/generators/solrsrv/update_config/templates/solrsrv.yml +17 -0
- data/lib/generators/solrsrv/update_config/update_config_generator.rb +17 -0
- data/lib/solrsrv/engine.rb +6 -0
- data/lib/solrsrv.rb +5 -0
- data/lib/tasks/solrsrv.rake +49 -0
- data/solrsrv.gemspec +143 -0
- metadata +184 -0
@@ -0,0 +1,370 @@
|
|
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
|
+
NOTE: this schema includes many optional features and should not
|
32
|
+
be used for benchmarking.
|
33
|
+
-->
|
34
|
+
|
35
|
+
<schema name="example" version="1.2">
|
36
|
+
<!-- attribute "name" is the name of this schema and is only used for display purposes.
|
37
|
+
Applications should change this to reflect the nature of the search collection.
|
38
|
+
version="1.2" is Solr's version number for the schema syntax and semantics. It should
|
39
|
+
not normally be changed by applications.
|
40
|
+
1.0: multiValued attribute did not exist, all fields are multiValued by nature
|
41
|
+
1.1: multiValued attribute introduced, false by default
|
42
|
+
1.2: omitTf attribute introduced, true by default -->
|
43
|
+
|
44
|
+
<types>
|
45
|
+
<!-- field type definitions. The "name" attribute is
|
46
|
+
just a label to be used by field definitions. The "class"
|
47
|
+
attribute and any other attributes determine the real
|
48
|
+
behavior of the fieldType.
|
49
|
+
Class names starting with "solr" refer to java classes in the
|
50
|
+
org.apache.solr.analysis package.
|
51
|
+
-->
|
52
|
+
|
53
|
+
<!-- The StrField type is not analyzed, but indexed/stored verbatim.
|
54
|
+
- StrField and TextField support an optional compressThreshold which
|
55
|
+
limits compression (if enabled in the derived fields) to values which
|
56
|
+
exceed a certain size (in characters).
|
57
|
+
-->
|
58
|
+
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>
|
59
|
+
|
60
|
+
<!-- boolean type: "true" or "false" -->
|
61
|
+
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
|
62
|
+
|
63
|
+
<!-- The optional sortMissingLast and sortMissingFirst attributes are
|
64
|
+
currently supported on types that are sorted internally as strings.
|
65
|
+
- If sortMissingLast="true", then a sort on this field will cause documents
|
66
|
+
without the field to come after documents with the field,
|
67
|
+
regardless of the requested sort order (asc or desc).
|
68
|
+
- If sortMissingFirst="true", then a sort on this field will cause documents
|
69
|
+
without the field to come before documents with the field,
|
70
|
+
regardless of the requested sort order.
|
71
|
+
- If sortMissingLast="false" and sortMissingFirst="false" (the default),
|
72
|
+
then default lucene sorting will be used which places docs without the
|
73
|
+
field first in an ascending sort and last in a descending sort.
|
74
|
+
-->
|
75
|
+
|
76
|
+
|
77
|
+
<!-- numeric field types that store and index the text
|
78
|
+
value verbatim (and hence don't support range queries, since the
|
79
|
+
lexicographic ordering isn't equal to the numeric ordering) -->
|
80
|
+
<fieldType name="integer" class="solr.IntField" omitNorms="true"/>
|
81
|
+
<fieldType name="long" class="solr.LongField" omitNorms="true"/>
|
82
|
+
<fieldType name="float" class="solr.FloatField" omitNorms="true"/>
|
83
|
+
<fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
|
84
|
+
|
85
|
+
|
86
|
+
<!-- Numeric field types that manipulate the value into
|
87
|
+
a string value that isn't human-readable in its internal form,
|
88
|
+
but with a lexicographic ordering the same as the numeric ordering,
|
89
|
+
so that range queries work correctly. -->
|
90
|
+
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
|
91
|
+
<fieldType name="slong" class="solr.SortableLongField" sortMissingLast="true" omitNorms="true"/>
|
92
|
+
<fieldType name="sfloat" class="solr.SortableFloatField" sortMissingLast="true" omitNorms="true"/>
|
93
|
+
<fieldType name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true" omitNorms="true"/>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
|
97
|
+
is a more restricted form of the canonical representation of dateTime
|
98
|
+
http://www.w3.org/TR/xmlschema-2/#dateTime
|
99
|
+
The trailing "Z" designates UTC time and is mandatory.
|
100
|
+
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
|
101
|
+
All other components are mandatory.
|
102
|
+
|
103
|
+
Expressions can also be used to denote calculations that should be
|
104
|
+
performed relative to "NOW" to determine the value, ie...
|
105
|
+
|
106
|
+
NOW/HOUR
|
107
|
+
... Round to the start of the current hour
|
108
|
+
NOW-1DAY
|
109
|
+
... Exactly 1 day prior to now
|
110
|
+
NOW/DAY+6MONTHS+3DAYS
|
111
|
+
... 6 months and 3 days in the future from the start of
|
112
|
+
the current day
|
113
|
+
|
114
|
+
Consult the DateField javadocs for more information.
|
115
|
+
-->
|
116
|
+
<fieldType name="date" class="solr.DateField" sortMissingLast="true" omitNorms="true"/>
|
117
|
+
|
118
|
+
<!--
|
119
|
+
Numeric field types that manipulate the value into trie encoded strings which are not
|
120
|
+
human readable in the internal form. Range searches on such fields use the fast Trie Range Queries
|
121
|
+
which are much faster than range searches on the SortableNumberField types.
|
122
|
+
|
123
|
+
For the fast range search to work, trie fields must be indexed. Trie fields are <b>not</b> sortable
|
124
|
+
in numerical order. Also, they cannot be used in function queries. If one needs sorting as well as
|
125
|
+
fast range search, one should create a copy field specifically for sorting. Same workaround is
|
126
|
+
suggested for using trie fields in function queries as well.
|
127
|
+
|
128
|
+
For each number being added to this field, multiple terms are generated as per the algorithm described in
|
129
|
+
org.apache.lucene.search.trie package description. The possible number of terms depend on the precisionStep
|
130
|
+
attribute and increase dramatically with higher precision steps (factor 2**precisionStep). The default
|
131
|
+
value of precisionStep is 8.
|
132
|
+
|
133
|
+
Note that if you use a precisionStep of 32 for int/float and 64 for long/double, then multiple terms
|
134
|
+
will not be generated, range search will be no faster than any other number field,
|
135
|
+
but sorting will be possible.
|
136
|
+
-->
|
137
|
+
<fieldType name="tint" class="solr.TrieField" type="integer" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
138
|
+
<fieldType name="tfloat" class="solr.TrieField" type="float" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
139
|
+
<fieldType name="tlong" class="solr.TrieField" type="long" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
140
|
+
<fieldType name="tdouble" class="solr.TrieField" type="double" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
141
|
+
|
142
|
+
<fieldType name="tdouble4" class="solr.TrieField" type="double" precisionStep="4" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
143
|
+
|
144
|
+
<!--
|
145
|
+
This date field manipulates the value into a trie encoded strings for fast range searches. They follow the
|
146
|
+
same format and semantics as the normal DateField and support the date math syntax except that they are
|
147
|
+
not sortable and cannot be used in function queries.
|
148
|
+
-->
|
149
|
+
<fieldType name="tdate" class="solr.TrieField" type="date" omitNorms="true" positionIncrementGap="0" indexed="true" stored="false" />
|
150
|
+
|
151
|
+
|
152
|
+
<!-- The "RandomSortField" is not used to store or search any
|
153
|
+
data. You can declare fields of this type it in your schema
|
154
|
+
to generate psuedo-random orderings of your docs for sorting
|
155
|
+
purposes. The ordering is generated based on the field name
|
156
|
+
and the version of the index, As long as the index version
|
157
|
+
remains unchanged, and the same field name is reused,
|
158
|
+
the ordering of the docs will be consistent.
|
159
|
+
If you want differend psuedo-random orderings of documents,
|
160
|
+
for the same version of the index, use a dynamicField and
|
161
|
+
change the name
|
162
|
+
-->
|
163
|
+
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
|
164
|
+
|
165
|
+
<!-- solr.TextField allows the specification of custom text analyzers
|
166
|
+
specified as a tokenizer and a list of token filters. Different
|
167
|
+
analyzers may be specified for indexing and querying.
|
168
|
+
|
169
|
+
The optional positionIncrementGap puts space between multiple fields of
|
170
|
+
this type on the same document, with the purpose of preventing false phrase
|
171
|
+
matching across fields.
|
172
|
+
|
173
|
+
For more info on customizing your analyzer chain, please see
|
174
|
+
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
|
175
|
+
-->
|
176
|
+
|
177
|
+
<!-- One can also specify an existing Analyzer class that has a
|
178
|
+
default constructor via the class attribute on the analyzer element
|
179
|
+
<fieldType name="text_greek" class="solr.TextField">
|
180
|
+
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
|
181
|
+
</fieldType>
|
182
|
+
-->
|
183
|
+
|
184
|
+
<!-- A text field that only splits on whitespace for exact matching of words -->
|
185
|
+
<fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
|
186
|
+
<analyzer>
|
187
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
188
|
+
</analyzer>
|
189
|
+
</fieldType>
|
190
|
+
|
191
|
+
<!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
|
192
|
+
words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
|
193
|
+
so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
|
194
|
+
Synonyms and stopwords are customized by external files, and stemming is enabled.
|
195
|
+
Duplicate tokens at the same position (which may result from Stemmed Synonyms or
|
196
|
+
WordDelim parts) are removed.
|
197
|
+
-->
|
198
|
+
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
|
199
|
+
<analyzer type="index">
|
200
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
201
|
+
<!-- in this example, we will only use synonyms at query time
|
202
|
+
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
|
203
|
+
-->
|
204
|
+
<!-- Case insensitive stop word removal.
|
205
|
+
add enablePositionIncrements=true in both the index and query
|
206
|
+
analyzers to leave a 'gap' for more accurate phrase queries.
|
207
|
+
-->
|
208
|
+
<filter class="solr.StopFilterFactory"
|
209
|
+
ignoreCase="true"
|
210
|
+
words="stopwords.txt"
|
211
|
+
enablePositionIncrements="true"
|
212
|
+
/>
|
213
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
|
214
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
215
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
216
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
217
|
+
</analyzer>
|
218
|
+
<analyzer type="query">
|
219
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
220
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
|
221
|
+
<filter class="solr.StopFilterFactory"
|
222
|
+
ignoreCase="true"
|
223
|
+
words="stopwords.txt"
|
224
|
+
enablePositionIncrements="true"
|
225
|
+
/>
|
226
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
|
227
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
228
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
229
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
230
|
+
</analyzer>
|
231
|
+
</fieldType>
|
232
|
+
|
233
|
+
|
234
|
+
<!-- Less flexible matching, but less false matches. Probably not ideal for product names,
|
235
|
+
but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
|
236
|
+
<fieldType name="textTight" class="solr.TextField" positionIncrementGap="100" >
|
237
|
+
<analyzer>
|
238
|
+
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
|
239
|
+
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
|
240
|
+
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
|
241
|
+
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
|
242
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
243
|
+
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
|
244
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
245
|
+
</analyzer>
|
246
|
+
</fieldType>
|
247
|
+
|
248
|
+
<!--
|
249
|
+
Setup simple analysis for spell checking
|
250
|
+
-->
|
251
|
+
<fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100" >
|
252
|
+
<analyzer>
|
253
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
254
|
+
<filter class="solr.LowerCaseFilterFactory"/>
|
255
|
+
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
|
256
|
+
</analyzer>
|
257
|
+
</fieldType>
|
258
|
+
|
259
|
+
<!-- charFilter + "CharStream aware" WhitespaceTokenizer -->
|
260
|
+
<!--
|
261
|
+
<fieldType name="textCharNorm" class="solr.TextField" positionIncrementGap="100" >
|
262
|
+
<analyzer>
|
263
|
+
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
|
264
|
+
<tokenizer class="solr.CharStreamAwareWhitespaceTokenizerFactory"/>
|
265
|
+
</analyzer>
|
266
|
+
</fieldType>
|
267
|
+
-->
|
268
|
+
|
269
|
+
<!-- This is an example of using the KeywordTokenizer along
|
270
|
+
With various TokenFilterFactories to produce a sortable field
|
271
|
+
that does not include some properties of the source text
|
272
|
+
-->
|
273
|
+
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
|
274
|
+
<analyzer>
|
275
|
+
<!-- KeywordTokenizer does no actual tokenizing, so the entire
|
276
|
+
input string is preserved as a single token
|
277
|
+
-->
|
278
|
+
<tokenizer class="solr.KeywordTokenizerFactory"/>
|
279
|
+
<!-- The LowerCase TokenFilter does what you expect, which can be
|
280
|
+
when you want your sorting to be case insensitive
|
281
|
+
-->
|
282
|
+
<filter class="solr.LowerCaseFilterFactory" />
|
283
|
+
<!-- The TrimFilter removes any leading or trailing whitespace -->
|
284
|
+
<filter class="solr.TrimFilterFactory" />
|
285
|
+
<!-- The PatternReplaceFilter gives you the flexibility to use
|
286
|
+
Java Regular expression to replace any sequence of characters
|
287
|
+
matching a pattern with an arbitrary replacement string,
|
288
|
+
which may include back refrences to portions of the orriginal
|
289
|
+
string matched by the pattern.
|
290
|
+
|
291
|
+
See the Java Regular Expression documentation for more
|
292
|
+
infomation on pattern and replacement string syntax.
|
293
|
+
|
294
|
+
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
|
295
|
+
-->
|
296
|
+
<filter class="solr.PatternReplaceFilterFactory"
|
297
|
+
pattern="([^a-z])" replacement="" replace="all"
|
298
|
+
/>
|
299
|
+
</analyzer>
|
300
|
+
</fieldType>
|
301
|
+
|
302
|
+
<fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
|
303
|
+
<analyzer>
|
304
|
+
<tokenizer class="solr.StandardTokenizerFactory"/>
|
305
|
+
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
|
306
|
+
</analyzer>
|
307
|
+
</fieldtype>
|
308
|
+
|
309
|
+
|
310
|
+
<!-- since fields of this type are by default not stored or indexed, any data added to
|
311
|
+
them will be ignored outright
|
312
|
+
-->
|
313
|
+
<fieldtype name="ignored" stored="false" indexed="false" class="solr.StrField" />
|
314
|
+
|
315
|
+
</types>
|
316
|
+
|
317
|
+
|
318
|
+
<fields>
|
319
|
+
<!-- Valid attributes for fields:
|
320
|
+
name: mandatory - the name for the field
|
321
|
+
type: mandatory - the name of a previously defined type from the <types> section
|
322
|
+
indexed: true if this field should be indexed (searchable or sortable)
|
323
|
+
stored: true if this field should be retrievable
|
324
|
+
compressed: [false] if this field should be stored using gzip compression
|
325
|
+
(this will only apply if the field type is compressable; among
|
326
|
+
the standard field types, only TextField and StrField are)
|
327
|
+
multiValued: true if this field may contain multiple values per document
|
328
|
+
omitNorms: (expert) set to true to omit the norms associated with
|
329
|
+
this field (this disables length normalization and index-time
|
330
|
+
boosting for the field, and saves some memory). Only full-text
|
331
|
+
fields or fields that need an index-time boost need norms.
|
332
|
+
termVectors: [false] set to true to store the term vector for a given field.
|
333
|
+
When using MoreLikeThis, fields used for similarity should be stored for
|
334
|
+
best performance.
|
335
|
+
termPositions: Store position information with the term vector. This will increase storage costs.
|
336
|
+
termOffsets: Store offset information with the term vector. This will increase storage costs.
|
337
|
+
-->
|
338
|
+
|
339
|
+
<field name="messageId" type="string" indexed="true" stored="true" required="true" omitNorms="true" />
|
340
|
+
<field name="subject" type="string" indexed="true" stored="true" omitNorms="true" />
|
341
|
+
<field name="from" type="string" indexed="true" stored="true" omitNorms="true"/>
|
342
|
+
<field name="sentDate" type="date" indexed="true" stored="true"/>
|
343
|
+
<field name="xMailer" type="string" indexed="true" stored="true" omitNorms="true"/>
|
344
|
+
|
345
|
+
<field name="allTo" type="string" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
346
|
+
<field name="flags" type="string" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
347
|
+
<field name="content" type="text" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
348
|
+
<field name="attachment" type="text" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
349
|
+
<field name="attachmentNames" type="string" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
350
|
+
|
351
|
+
<field name="catchAllField" type="text" indexed="true" stored="true" omitNorms="true" multiValued="true"/>
|
352
|
+
|
353
|
+
</fields>
|
354
|
+
|
355
|
+
<copyField source="content" dest="catchAllField"/>
|
356
|
+
<copyField source="attachmentNames" dest="catchAllField"/>
|
357
|
+
<copyField source="attachment" dest="catchAllField"/>
|
358
|
+
<copyField source="subject" dest="catchAllField"/>
|
359
|
+
<copyField source="allTo" dest="catchAllField"/>
|
360
|
+
|
361
|
+
<!-- The unique key, Note that some mail servers may not send the message-id or they may send duplicate ones -->
|
362
|
+
<uniqueKey>messageId</uniqueKey>
|
363
|
+
|
364
|
+
<!-- field for the QueryParser to use when an explicit fieldname is absent -->
|
365
|
+
<defaultSearchField>catchAllField</defaultSearchField>
|
366
|
+
|
367
|
+
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
|
368
|
+
<solrQueryParser defaultOperator="OR"/>
|
369
|
+
|
370
|
+
</schema>
|