sunspot_solr 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sunspot/solr/installer/config_installer.rb +7 -0
- data/lib/sunspot/solr/java.rb +5 -2
- data/lib/sunspot_solr.rb +1 -1
- data/solr/contexts/solr.xml +8 -0
- data/solr/etc/jetty.xml +96 -148
- data/solr/etc/webdefault.xml +308 -160
- data/solr/lib/jetty-continuation-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-deploy-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-http-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-io-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-jmx-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-security-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-server-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-servlet-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-util-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-webapp-8.1.8.v20121106.jar +0 -0
- data/solr/lib/jetty-xml-8.1.8.v20121106.jar +0 -0
- data/solr/lib/servlet-api-3.0.jar +0 -0
- data/solr/solr/conf/schema.xml +4 -0
- data/solr/solr/conf/solrconfig.xml +588 -855
- data/solr/solr/{README.txt → default/README.txt} +0 -0
- data/solr/solr/solr.xml +8 -0
- data/solr/start.jar +0 -0
- data/solr/webapps/solr.war +0 -0
- data/spec/server_spec.rb +2 -2
- metadata +26 -14
- data/solr/lib/jetty-6.1.26-patched-JETTY-1340.jar +0 -0
- data/solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar +0 -0
- data/solr/lib/servlet-api-2.5-20081211.jar +0 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/solr/solr/conf/schema.xml
CHANGED
@@ -236,7 +236,11 @@
|
|
236
236
|
<dynamicField name="*_llm" stored="false" type="location" multiValued="true" indexed="true"/>
|
237
237
|
<dynamicField name="*_lls" stored="true" type="location" multiValued="false" indexed="true"/>
|
238
238
|
<dynamicField name="*_llms" stored="true" type="location" multiValued="true" indexed="true"/>
|
239
|
+
|
240
|
+
<!-- required by Solr 4 -->
|
241
|
+
<field name="_version_" type="string" indexed="true" stored="true" multiValued="false" />
|
239
242
|
</fields>
|
243
|
+
|
240
244
|
<!-- Field to use to determine and enforce document uniqueness.
|
241
245
|
Unless this field is marked with required="false", it will be a required field
|
242
246
|
-->
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2
2
|
<!--
|
3
3
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
4
|
contributor license agreements. See the NOTICE file distributed with
|
@@ -15,920 +15,653 @@
|
|
15
15
|
See the License for the specific language governing permissions and
|
16
16
|
limitations under the License.
|
17
17
|
-->
|
18
|
-
<!--
|
19
|
-
For more details about configurations options that may appear in this
|
20
|
-
file, see http://wiki.apache.org/solr/SolrConfigXml.
|
21
18
|
|
22
|
-
|
23
|
-
|
19
|
+
<!--
|
20
|
+
For more details about configurations options that may appear in
|
21
|
+
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
24
22
|
-->
|
25
23
|
<config>
|
26
|
-
<!--
|
27
|
-
|
28
|
-
|
24
|
+
<!-- In all configuration below, a prefix of "solr." for class names
|
25
|
+
is an alias that causes solr to search appropriate packages,
|
26
|
+
including org.apache.solr.(search|update|request|core|analysis)
|
29
27
|
|
30
|
-
You may also
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<!--
|
35
|
-
|
36
|
-
|
28
|
+
You may also specify a fully qualified Java classname if you
|
29
|
+
have your own custom plugins.
|
30
|
+
-->
|
31
|
+
|
32
|
+
<!-- Controls what version of Lucene various components of Solr
|
33
|
+
adhere to. Generally, you want to use the latest version to
|
34
|
+
get all bug fixes and improvements. It is highly recommended
|
35
|
+
that you fully re-index after changing this setting as it can
|
36
|
+
affect both how text is indexed and queried.
|
37
|
+
-->
|
38
|
+
<luceneMatchVersion>LUCENE_41</luceneMatchVersion>
|
39
|
+
|
40
|
+
<!-- <lib/> directives can be used to instruct Solr to load an Jars
|
41
|
+
identified and use them to resolve any "plugins" specified in
|
42
|
+
your solrconfig.xml or schema.xml (ie: Analyzers, Request
|
43
|
+
Handlers, etc...).
|
44
|
+
|
45
|
+
All directories and paths are resolved relative to the
|
46
|
+
instanceDir.
|
37
47
|
|
38
|
-
|
48
|
+
Please note that <lib/> directives are processed in the order
|
49
|
+
that they appear in your solrconfig.xml file, and are "stacked"
|
50
|
+
on top of each other when building a ClassLoader - so if you have
|
51
|
+
plugin jars with dependencies on other jars, the "lower level"
|
52
|
+
dependency jars should be loaded first.
|
39
53
|
|
40
|
-
If a "./lib" directory exists in your instanceDir, all files
|
41
|
-
are included as if you had used the following
|
54
|
+
If a "./lib" directory exists in your instanceDir, all files
|
55
|
+
found in it are included as if you had used the following
|
56
|
+
syntax...
|
42
57
|
|
43
58
|
<lib dir="./lib" />
|
44
59
|
-->
|
45
|
-
|
46
|
-
classpath, this is useful for including all jars in a directory.
|
47
|
-
-->
|
48
|
-
<lib dir="../../contrib/extraction/lib"/>
|
49
|
-
<!-- When a regex is specified in addition to a directory, only the files in that
|
50
|
-
directory which completely match the regex (anchored on both ends)
|
51
|
-
will be included.
|
52
|
-
-->
|
53
|
-
<lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar"/>
|
54
|
-
<lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar"/>
|
55
|
-
<!-- If a dir option (with or without a regex) is used and nothing is found
|
56
|
-
that matches, it will be ignored
|
57
|
-
-->
|
58
|
-
<lib dir="../../contrib/clustering/lib/downloads/"/>
|
59
|
-
<lib dir="../../contrib/clustering/lib/"/>
|
60
|
-
<lib dir="/total/crap/dir/ignored"/>
|
61
|
-
<!-- an exact path can be used to specify a specific file. This will cause
|
62
|
-
a serious error to be logged if it can't be loaded.
|
63
|
-
<lib path="../a-jar-that-does-not-exist.jar" />
|
64
|
-
-->
|
65
|
-
<!-- Used to specify an alternate directory to hold all index data
|
66
|
-
other than the default ./data under the Solr home.
|
67
|
-
If replication is in use, this should match the replication configuration. -->
|
68
|
-
<dataDir>${solr.data.dir:./solr/data}</dataDir>
|
69
|
-
<!-- WARNING: this <indexDefaults> section only provides defaults for index writers
|
70
|
-
in general. See also the <mainIndex> section after that when changing parameters
|
71
|
-
for Solr's main Lucene index. -->
|
72
|
-
<indexDefaults>
|
73
|
-
<!-- Values here affect all index writers and act as a default unless overridden. -->
|
74
|
-
<useCompoundFile>false</useCompoundFile>
|
75
|
-
<mergeFactor>10</mergeFactor>
|
76
|
-
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush
|
77
|
-
based on whichever limit is hit first. -->
|
78
|
-
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
79
|
-
<!-- Sets the amount of RAM that may be used by Lucene indexing
|
80
|
-
for buffering added documents and deletions before they are
|
81
|
-
flushed to the Directory. -->
|
82
|
-
<ramBufferSizeMB>32</ramBufferSizeMB>
|
83
|
-
<!-- <maxMergeDocs>2147483647</maxMergeDocs> -->
|
84
|
-
<maxFieldLength>10000</maxFieldLength>
|
85
|
-
<writeLockTimeout>1000</writeLockTimeout>
|
86
|
-
<commitLockTimeout>10000</commitLockTimeout>
|
87
|
-
<!--
|
88
|
-
Expert: Turn on Lucene's auto commit capability. This causes intermediate
|
89
|
-
segment flushes to write a new lucene index descriptor, enabling it to be
|
90
|
-
opened by an external IndexReader. This can greatly slow down indexing
|
91
|
-
speed. NOTE: Despite the name, this value does not have any relation to
|
92
|
-
Solr's autoCommit functionality
|
93
|
-
-->
|
94
|
-
<!--<luceneAutoCommit>false</luceneAutoCommit>-->
|
95
|
-
<!--
|
96
|
-
Expert: The Merge Policy in Lucene controls how merging is handled by
|
97
|
-
Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
|
98
|
-
versions used LogDocMergePolicy.
|
60
|
+
<dataDir>${solr.data.dir:}</dataDir>
|
99
61
|
|
100
|
-
LogByteSizeMergePolicy chooses segments to merge based on their size. The
|
101
|
-
Lucene 2.2 default, LogDocMergePolicy chose when to merge based on number
|
102
|
-
of documents
|
103
62
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
background using separate threads. The SerialMergeScheduler (Lucene 2.2
|
112
|
-
default) does not.
|
113
|
-
-->
|
114
|
-
<!--<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-->
|
115
|
-
<!--
|
116
|
-
This option specifies which Lucene LockFactory implementation to use.
|
117
|
-
|
118
|
-
single = SingleInstanceLockFactory - suggested for a read-only index
|
119
|
-
or when there is no possibility of another process trying
|
120
|
-
to modify the index.
|
121
|
-
native = NativeFSLockFactory - uses OS native file locking
|
122
|
-
simple = SimpleFSLockFactory - uses a plain file for locking
|
123
|
-
|
124
|
-
(For backwards compatibility with Solr 1.2, 'simple' is the default
|
125
|
-
if not specified.)
|
126
|
-
-->
|
127
|
-
<lockType>native</lockType>
|
128
|
-
<!--
|
129
|
-
Expert:
|
130
|
-
Controls how often Lucene loads terms into memory -->
|
131
|
-
<!--<termIndexInterval>256</termIndexInterval>-->
|
132
|
-
</indexDefaults>
|
133
|
-
<mainIndex>
|
134
|
-
<!-- options specific to the main on-disk lucene index -->
|
135
|
-
<useCompoundFile>false</useCompoundFile>
|
136
|
-
<ramBufferSizeMB>32</ramBufferSizeMB>
|
137
|
-
<mergeFactor>10</mergeFactor>
|
138
|
-
<!-- Deprecated -->
|
139
|
-
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
140
|
-
<!--<maxMergeDocs>2147483647</maxMergeDocs>-->
|
141
|
-
<!-- inherit from indexDefaults <maxFieldLength>10000</maxFieldLength> -->
|
142
|
-
<!-- If true, unlock any held write or commit locks on startup.
|
143
|
-
This defeats the locking mechanism that allows multiple
|
144
|
-
processes to safely access a lucene index, and should be
|
145
|
-
used with care.
|
146
|
-
This is not needed if lock type is 'none' or 'single'
|
147
|
-
-->
|
148
|
-
<unlockOnStartup>false</unlockOnStartup>
|
149
|
-
<!-- If true, IndexReaders will be reopened (often more efficient) instead
|
150
|
-
of closed and then opened. -->
|
151
|
-
<reopenReaders>true</reopenReaders>
|
152
|
-
<!--
|
153
|
-
Expert:
|
154
|
-
Controls how often Lucene loads terms into memory. Default is 128 and is likely good for most everyone. -->
|
155
|
-
<!--<termIndexInterval>256</termIndexInterval>-->
|
156
|
-
<!--
|
157
|
-
Custom deletion policies can specified here. The class must
|
158
|
-
implement org.apache.lucene.index.IndexDeletionPolicy.
|
63
|
+
<!-- The DirectoryFactory to use for indexes.
|
64
|
+
|
65
|
+
solr.StandardDirectoryFactory is filesystem
|
66
|
+
based and tries to pick the best implementation for the current
|
67
|
+
JVM and platform. solr.NRTCachingDirectoryFactory, the default,
|
68
|
+
wraps solr.StandardDirectoryFactory and caches small files in memory
|
69
|
+
for better NRT performance.
|
159
70
|
|
160
|
-
|
71
|
+
One can force a particular implementation via solr.MMapDirectoryFactory,
|
72
|
+
solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
|
161
73
|
|
162
|
-
|
163
|
-
|
164
|
-
|
74
|
+
solr.RAMDirectoryFactory is memory based, not
|
75
|
+
persistent, and doesn't work with replication.
|
76
|
+
-->
|
77
|
+
<directoryFactory name="DirectoryFactory"
|
78
|
+
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
|
165
79
|
|
166
|
-
|
167
|
-
|
80
|
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
81
|
+
Index Config - These settings control low-level behavior of indexing
|
82
|
+
Most example settings here show the default value, but are commented
|
83
|
+
out, to more easily see where customizations have been made.
|
84
|
+
|
85
|
+
Note: This replaces <indexDefaults> and <mainIndex> from older versions
|
86
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
87
|
+
<indexConfig>
|
88
|
+
<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
|
89
|
+
LimitTokenCountFilterFactory in your fieldType definition. E.g.
|
90
|
+
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
|
168
91
|
-->
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
92
|
+
<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
|
93
|
+
<!-- <writeLockTimeout>1000</writeLockTimeout> -->
|
94
|
+
|
95
|
+
<!-- The maximum number of simultaneous threads that may be
|
96
|
+
indexing documents at once in IndexWriter; if more than this
|
97
|
+
many threads arrive they will wait for others to finish.
|
98
|
+
Default in Solr/Lucene is 8. -->
|
99
|
+
<maxIndexingThreads>2</maxIndexingThreads>
|
100
|
+
|
101
|
+
<useCompoundFile>true</useCompoundFile>
|
102
|
+
|
103
|
+
<!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
|
104
|
+
indexing for buffering added documents and deletions before they are
|
105
|
+
flushed to the Directory.
|
106
|
+
maxBufferedDocs sets a limit on the number of documents buffered
|
107
|
+
before flushing.
|
108
|
+
If both ramBufferSizeMB and maxBufferedDocs is set, then
|
109
|
+
Lucene will flush based on whichever limit is hit first. -->
|
110
|
+
<ramBufferSizeMB>20</ramBufferSizeMB> -->
|
111
|
+
<maxBufferedDocs>10000</maxBufferedDocs>
|
112
|
+
|
113
|
+
<!-- Expert: Merge Policy
|
114
|
+
The Merge Policy in Lucene controls how merging of segments is done.
|
115
|
+
The default since Solr/Lucene 3.3 is TieredMergePolicy.
|
116
|
+
The default since Lucene 2.3 was the LogByteSizeMergePolicy,
|
117
|
+
Even older versions of Lucene used LogDocMergePolicy.
|
180
118
|
-->
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
If you want to connect to a particular server, specify the agentId
|
192
|
-
e.g. <jmx agentId="myAgent" />
|
193
|
-
|
194
|
-
If you want to start a new MBeanServer, specify the serviceUrl
|
195
|
-
e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
|
196
|
-
|
197
|
-
For more details see http://wiki.apache.org/solr/SolrJmx
|
198
|
-
-->
|
199
|
-
<jmx/>
|
200
|
-
<!-- the default high-performance update handler -->
|
119
|
+
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
|
120
|
+
<int name="maxMergeAtOnce">4</int>
|
121
|
+
<int name="segmentsPerTier">4</int>
|
122
|
+
</mergePolicy>
|
123
|
+
|
124
|
+
<unlockOnStartup>true</unlockOnStartup>
|
125
|
+
|
126
|
+
</indexConfig>
|
127
|
+
|
201
128
|
<updateHandler class="solr.DirectUpdateHandler2">
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
args - the arguments to pass to the program. default=nothing
|
222
|
-
env - environment variables to set. default=nothing
|
223
|
-
-->
|
224
|
-
<!-- A postCommit event is fired after every commit or optimize command
|
225
|
-
<listener event="postCommit" class="solr.RunExecutableListener">
|
226
|
-
<str name="exe">solr/bin/snapshooter</str>
|
227
|
-
<str name="dir">.</str>
|
228
|
-
<bool name="wait">true</bool>
|
229
|
-
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
230
|
-
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
231
|
-
</listener>
|
232
|
-
-->
|
233
|
-
<!-- A postOptimize event is fired only after every optimize command
|
234
|
-
<listener event="postOptimize" class="solr.RunExecutableListener">
|
235
|
-
<str name="exe">snapshooter</str>
|
236
|
-
<str name="dir">solr/bin</str>
|
237
|
-
<bool name="wait">true</bool>
|
238
|
-
</listener>
|
239
|
-
-->
|
129
|
+
|
130
|
+
<!-- Enables a transaction log, used for real-time get, durability, and
|
131
|
+
and solr cloud replica recovery. The log can grow as big as
|
132
|
+
uncommitted changes to the index, so use of a hard autoCommit
|
133
|
+
is recommended (see below).
|
134
|
+
"dir" - the target directory for transaction logs, defaults to the
|
135
|
+
solr data directory. -->
|
136
|
+
<updateLog>
|
137
|
+
<str name="dir">${solr.ulog.dir:}</str>
|
138
|
+
</updateLog>
|
139
|
+
|
140
|
+
<autoCommit>
|
141
|
+
<maxTime>15000</maxTime>
|
142
|
+
<openSearcher>false</openSearcher>
|
143
|
+
</autoCommit>
|
144
|
+
|
145
|
+
<autoSoftCommit>
|
146
|
+
<maxTime>5000</maxTime>
|
147
|
+
</autoSoftCommit>
|
240
148
|
</updateHandler>
|
241
|
-
|
242
|
-
IndexReader implementations.
|
243
|
-
|
244
|
-
** Experimental Feature **
|
245
|
-
Please note - Using a custom IndexReaderFactory may prevent certain other features
|
246
|
-
from working. The API to IndexReaderFactory may change without warning or may even
|
247
|
-
be removed from future releases if the problems cannot be resolved.
|
248
|
-
|
249
|
-
** Features that may not work with custom IndexReaderFactory **
|
250
|
-
The ReplicationHandler assumes a disk-resident index. Using a custom
|
251
|
-
IndexReader implementation may cause incompatibility with ReplicationHandler and
|
252
|
-
may cause replication to not work correctly. See SOLR-1366 for details.
|
253
|
-
|
254
|
-
<indexReaderFactory name="IndexReaderFactory" class="package.class">
|
255
|
-
Parameters as required by the implementation
|
256
|
-
</indexReaderFactory >
|
257
|
-
-->
|
258
|
-
<!-- To set the termInfosIndexDivisor, do this: -->
|
259
|
-
<!--<indexReaderFactory name="IndexReaderFactory" class="org.apache.solr.core.StandardIndexReaderFactory">
|
260
|
-
<int name="termInfosIndexDivisor">12</int>
|
261
|
-
</indexReaderFactory >-->
|
149
|
+
|
262
150
|
<query>
|
263
|
-
<!-- Maximum number of clauses in a boolean query... in the past, this affected
|
264
|
-
range or prefix queries that expanded to big boolean queries - built in Solr
|
265
|
-
query parsers no longer create queries with this limitation.
|
266
|
-
An exception is thrown if exceeded. -->
|
267
151
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
268
|
-
|
152
|
+
|
153
|
+
|
154
|
+
<!-- Solr Internal Query Caches
|
155
|
+
|
156
|
+
There are two implementations of cache available for Solr,
|
269
157
|
LRUCache, based on a synchronized LinkedHashMap, and
|
270
|
-
FastLRUCache, based on a ConcurrentHashMap.
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
When a new searcher is opened, its caches may be prepopulated
|
277
|
-
or "autowarmed" using data from caches in the old searcher.
|
278
|
-
autowarmCount is the number of items to prepopulate. For LRUCache,
|
279
|
-
the autowarmed items will be the most recently accessed items.
|
280
|
-
Parameters:
|
281
|
-
class - the SolrCache implementation LRUCache or FastLRUCache
|
282
|
-
size - the maximum number of entries in the cache
|
283
|
-
initialSize - the initial capacity (number of entries) of
|
284
|
-
the cache. (seel java.util.HashMap)
|
285
|
-
autowarmCount - the number of entries to prepopulate from
|
286
|
-
and old cache.
|
287
|
-
-->
|
288
|
-
<filterCache class="solr.FastLRUCache" size="512" initialSize="512" autowarmCount="0"/>
|
289
|
-
<!-- Cache used to hold field values that are quickly accessible
|
290
|
-
by document id. The fieldValueCache is created by default
|
291
|
-
even if not configured here.
|
292
|
-
<fieldValueCache
|
293
|
-
class="solr.FastLRUCache"
|
294
|
-
size="512"
|
295
|
-
autowarmCount="128"
|
296
|
-
showItems="32"
|
297
|
-
/>
|
158
|
+
FastLRUCache, based on a ConcurrentHashMap.
|
159
|
+
|
160
|
+
FastLRUCache has faster gets and slower puts in single
|
161
|
+
threaded operation and thus is generally faster than LRUCache
|
162
|
+
when the hit ratio of the cache is high (> 75%), and may be
|
163
|
+
faster under other scenarios on multi-cpu systems.
|
298
164
|
-->
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
165
|
+
|
166
|
+
<!-- Filter Cache
|
167
|
+
|
168
|
+
Cache used by SolrIndexSearcher for filters (DocSets),
|
169
|
+
unordered sets of *all* documents that match a query. When a
|
170
|
+
new searcher is opened, its caches may be prepopulated or
|
171
|
+
"autowarmed" using data from caches in the old searcher.
|
172
|
+
autowarmCount is the number of items to prepopulate. For
|
173
|
+
LRUCache, the autowarmed items will be the most recently
|
174
|
+
accessed items.
|
175
|
+
|
176
|
+
Parameters:
|
177
|
+
class - the SolrCache implementation LRUCache or
|
178
|
+
(LRUCache or FastLRUCache)
|
179
|
+
size - the maximum number of entries in the cache
|
180
|
+
initialSize - the initial capacity (number of entries) of
|
181
|
+
the cache. (see java.util.HashMap)
|
182
|
+
autowarmCount - the number of entries to prepopulate from
|
183
|
+
and old cache.
|
184
|
+
-->
|
185
|
+
<filterCache class="solr.FastLRUCache"
|
186
|
+
size="512"
|
187
|
+
initialSize="512"
|
188
|
+
autowarmCount="0"/>
|
189
|
+
|
190
|
+
<!-- Query Result Cache
|
191
|
+
|
192
|
+
Caches results of searches - ordered lists of document ids
|
193
|
+
(DocList) based on a query, a sort, and the range of documents requested.
|
194
|
+
-->
|
195
|
+
<queryResultCache class="solr.LRUCache"
|
196
|
+
size="512"
|
197
|
+
initialSize="512"
|
198
|
+
autowarmCount="0"/>
|
199
|
+
|
200
|
+
<!-- Document Cache
|
201
|
+
|
202
|
+
Caches Lucene Document objects (the stored fields for each
|
203
|
+
document). Since Lucene internal document ids are transient,
|
204
|
+
this cache will not be autowarmed.
|
205
|
+
-->
|
206
|
+
<documentCache class="solr.LRUCache"
|
207
|
+
size="512"
|
208
|
+
initialSize="512"
|
209
|
+
autowarmCount="0"/>
|
210
|
+
|
211
|
+
<!-- Lazy Field Loading
|
212
|
+
|
213
|
+
If true, stored fields that are not requested will be loaded
|
214
|
+
lazily. This can result in a significant speed improvement
|
215
|
+
if the usual case is to not load all stored fields,
|
216
|
+
especially if the skipped fields are large compressed text
|
217
|
+
fields.
|
310
218
|
-->
|
311
219
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
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
|
-
<str name="q">static firstSearcher warming query from solrconfig.xml</str>
|
371
|
-
</lst>
|
372
|
-
</arr>
|
373
|
-
</listener>
|
374
|
-
<!-- If a search request comes in and there is no current registered searcher,
|
375
|
-
then immediately register the still warming searcher and use it. If
|
376
|
-
"false" then all requests will block until the first searcher is done
|
377
|
-
warming. -->
|
220
|
+
|
221
|
+
<!-- Use Filter For Sorted Query
|
222
|
+
|
223
|
+
A possible optimization that attempts to use a filter to
|
224
|
+
satisfy a search. If the requested sort does not include
|
225
|
+
score, then the filterCache will be checked for a filter
|
226
|
+
matching the query. If found, the filter will be used as the
|
227
|
+
source of document ids, and then the sort will be applied to
|
228
|
+
that.
|
229
|
+
|
230
|
+
For most situations, this will not be useful unless you
|
231
|
+
frequently get the same search repeatedly with different sort
|
232
|
+
options, and none of them ever use "score"
|
233
|
+
-->
|
234
|
+
<!--
|
235
|
+
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
236
|
+
-->
|
237
|
+
|
238
|
+
<!-- Result Window Size
|
239
|
+
|
240
|
+
An optimization for use with the queryResultCache. When a search
|
241
|
+
is requested, a superset of the requested number of document ids
|
242
|
+
are collected. For example, if a search for a particular query
|
243
|
+
requests matching documents 10 through 19, and queryWindowSize is 50,
|
244
|
+
then documents 0 through 49 will be collected and cached. Any further
|
245
|
+
requests in that range can be satisfied via the cache.
|
246
|
+
-->
|
247
|
+
<queryResultWindowSize>20</queryResultWindowSize>
|
248
|
+
|
249
|
+
<!-- Maximum number of documents to cache for any entry in the
|
250
|
+
queryResultCache.
|
251
|
+
-->
|
252
|
+
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
253
|
+
|
254
|
+
<!-- Query Related Event Listeners
|
255
|
+
|
256
|
+
Various IndexSearcher related events can trigger Listeners to
|
257
|
+
take actions.
|
258
|
+
|
259
|
+
newSearcher - fired whenever a new searcher is being prepared
|
260
|
+
and there is a current searcher handling requests (aka
|
261
|
+
registered). It can be used to prime certain caches to
|
262
|
+
prevent long request times for certain requests.
|
263
|
+
|
264
|
+
firstSearcher - fired whenever a new searcher is being
|
265
|
+
prepared but there is no current registered searcher to handle
|
266
|
+
requests or to gain autowarming data from.
|
267
|
+
|
268
|
+
|
269
|
+
-->
|
270
|
+
|
271
|
+
<!-- Use Cold Searcher
|
272
|
+
|
273
|
+
If a search request comes in and there is no current
|
274
|
+
registered searcher, then immediately register the still
|
275
|
+
warming searcher and use it. If "false" then all requests
|
276
|
+
will block until the first searcher is done warming.
|
277
|
+
-->
|
378
278
|
<useColdSearcher>false</useColdSearcher>
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
279
|
+
|
280
|
+
<!-- Max Warming Searchers
|
281
|
+
|
282
|
+
Maximum number of searchers that may be warming in the
|
283
|
+
background concurrently. An error is returned if this limit
|
284
|
+
is exceeded.
|
285
|
+
|
286
|
+
Recommend values of 1-2 for read-only slaves, higher for
|
287
|
+
masters w/o cache warming.
|
288
|
+
-->
|
289
|
+
<maxWarmingSearchers>5</maxWarmingSearchers>
|
290
|
+
|
383
291
|
</query>
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
value to exactly corrispond to when the physical index was last
|
405
|
-
modified.
|
406
|
-
|
407
|
-
etagSeed="..." is an option you can change to force the ETag
|
408
|
-
header (and validation against If-None-Match requests) to be
|
409
|
-
differnet even if the index has not changed (ie: when making
|
410
|
-
significant changes to your config file)
|
411
|
-
|
412
|
-
lastModifiedFrom and etagSeed are both ignored if you use the
|
413
|
-
never304="true" option.
|
414
|
-
-->
|
415
|
-
<!-- If you include a <cacheControl> directive, it will be used to
|
416
|
-
generate a Cache-Control header, as well as an Expires header
|
417
|
-
if the value contains "max-age="
|
418
|
-
|
419
|
-
By default, no Cache-Control header is generated.
|
420
|
-
|
421
|
-
You can use the <cacheControl> option even if you have set
|
422
|
-
never304="true"
|
423
|
-
-->
|
424
|
-
<!-- <cacheControl>max-age=30, public</cacheControl> -->
|
425
|
-
</httpCaching>
|
426
|
-
</requestDispatcher>
|
427
|
-
<!-- requestHandler plugins... incoming queries will be dispatched to the
|
428
|
-
correct handler based on the path or the qt (query type) param.
|
429
|
-
Names starting with a '/' are accessed with the a path equal to the
|
430
|
-
registered name. Names without a leading '/' are accessed with:
|
431
|
-
http://host/app/select?qt=name
|
432
|
-
If no qt is defined, the requestHandler that declares default="true"
|
433
|
-
will be used.
|
434
|
-
-->
|
435
|
-
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
436
|
-
<!-- default values for query parameters -->
|
437
|
-
<lst name="defaults">
|
438
|
-
<str name="echoParams">explicit</str>
|
439
|
-
<!--
|
440
|
-
<int name="rows">10</int>
|
441
|
-
<str name="fl">*</str>
|
442
|
-
<str name="version">2.1</str>
|
443
|
-
-->
|
444
|
-
</lst>
|
445
|
-
</requestHandler>
|
446
|
-
<!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
|
447
|
-
<!-- remove the <lst name="master"> section if this is just a slave -->
|
448
|
-
<!-- remove the <lst name="slave"> section if this is just a master -->
|
449
|
-
<!--
|
450
|
-
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
451
|
-
<lst name="master">
|
452
|
-
<str name="replicateAfter">commit</str>
|
453
|
-
<str name="replicateAfter">startup</str>
|
454
|
-
<str name="confFiles">schema.xml,stopwords.txt</str>
|
455
|
-
</lst>
|
456
|
-
<lst name="slave">
|
457
|
-
<str name="masterUrl">http://localhost:8983/solr/replication</str>
|
458
|
-
<str name="pollInterval">00:00:60</str>
|
459
|
-
</lst>
|
460
|
-
</requestHandler>-->
|
461
|
-
<!-- DisMaxRequestHandler allows easy searching across multiple fields
|
462
|
-
for simple user-entered phrases. It's implementation is now
|
463
|
-
just the standard SearchHandler with a default query type
|
464
|
-
of "dismax".
|
465
|
-
see http://wiki.apache.org/solr/DisMaxRequestHandler
|
466
|
-
-->
|
467
|
-
<requestHandler name="dismax" class="solr.SearchHandler">
|
468
|
-
<lst name="defaults">
|
469
|
-
<str name="defType">dismax</str>
|
470
|
-
<str name="echoParams">explicit</str>
|
471
|
-
<float name="tie">0.01</float>
|
472
|
-
<str name="qf">
|
473
|
-
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
474
|
-
</str>
|
475
|
-
<str name="pf">
|
476
|
-
text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
|
477
|
-
</str>
|
478
|
-
<str name="bf">
|
479
|
-
popularity^0.5 recip(price,1,1000,1000)^0.3
|
480
|
-
</str>
|
481
|
-
<str name="fl">
|
482
|
-
id,name,price,score
|
483
|
-
</str>
|
484
|
-
<str name="mm">
|
485
|
-
2<-1 5<-2 6<90%
|
486
|
-
</str>
|
487
|
-
<int name="ps">100</int>
|
488
|
-
<str name="q.alt">*:*</str>
|
489
|
-
<!-- example highlighter config, enable per-query with hl=true -->
|
490
|
-
<str name="hl.fl">text features name</str>
|
491
|
-
<!-- for this field, we want no fragmenting, just highlighting -->
|
492
|
-
<str name="f.name.hl.fragsize">0</str>
|
493
|
-
<!-- instructs Solr to return the field itself if no query terms are
|
494
|
-
found -->
|
495
|
-
<str name="f.name.hl.alternateField">name</str>
|
496
|
-
<str name="f.text.hl.fragmenter">regex</str>
|
497
|
-
<!-- defined below -->
|
498
|
-
</lst>
|
499
|
-
</requestHandler>
|
500
|
-
<!-- Note how you can register the same handler multiple times with
|
501
|
-
different names (and different init parameters)
|
292
|
+
|
293
|
+
|
294
|
+
<!-- Request Dispatcher
|
295
|
+
|
296
|
+
This section contains instructions for how the SolrDispatchFilter
|
297
|
+
should behave when processing requests for this SolrCore.
|
298
|
+
|
299
|
+
handleSelect is a legacy option that affects the behavior of requests
|
300
|
+
such as /select?qt=XXX
|
301
|
+
|
302
|
+
handleSelect="true" will cause the SolrDispatchFilter to process
|
303
|
+
the request and dispatch the query to a handler specified by the
|
304
|
+
"qt" param, assuming "/select" isn't already registered.
|
305
|
+
|
306
|
+
handleSelect="false" will cause the SolrDispatchFilter to
|
307
|
+
ignore "/select" requests, resulting in a 404 unless a handler
|
308
|
+
is explicitly registered with the name "/select"
|
309
|
+
|
310
|
+
handleSelect="true" is not recommended for new users, but is the default
|
311
|
+
for backwards compatibility
|
502
312
|
-->
|
503
|
-
<
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
"
|
525
|
-
|
313
|
+
<requestDispatcher handleSelect="false" >
|
314
|
+
<!-- Request Parsing
|
315
|
+
|
316
|
+
These settings indicate how Solr Requests may be parsed, and
|
317
|
+
what restrictions may be placed on the ContentStreams from
|
318
|
+
those requests
|
319
|
+
|
320
|
+
enableRemoteStreaming - enables use of the stream.file
|
321
|
+
and stream.url parameters for specifying remote streams.
|
322
|
+
|
323
|
+
multipartUploadLimitInKB - specifies the max size (in KiB) of
|
324
|
+
Multipart File Uploads that Solr will allow in a Request.
|
325
|
+
|
326
|
+
formdataUploadLimitInKB - specifies the max size (in KiB) of
|
327
|
+
form data (application/x-www-form-urlencoded) sent via
|
328
|
+
POST. You can use POST to pass request parameters not
|
329
|
+
fitting into the URL.
|
330
|
+
|
331
|
+
*** WARNING ***
|
332
|
+
The settings below authorize Solr to fetch remote files, You
|
333
|
+
should make sure your system has some authentication before
|
334
|
+
using enableRemoteStreaming="true"
|
335
|
+
|
336
|
+
-->
|
337
|
+
|
338
|
+
<!-- HTTP Caching
|
339
|
+
|
340
|
+
Set HTTP caching related parameters (for proxy caches and clients).
|
341
|
+
|
342
|
+
The options below instruct Solr not to output any HTTP Caching
|
343
|
+
related headers
|
526
344
|
-->
|
527
|
-
<
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
limiting the facets clients can use. Faceting is not turned on by
|
537
|
-
default - but if the client does specify facet=true in the request,
|
538
|
-
these are the only facets they will be able to see counts for;
|
539
|
-
regardless of what other facet.field or facet.query params they
|
540
|
-
may specify.
|
541
|
-
|
542
|
-
NOTE: there is *absolutely* nothing a client can do to prevent these
|
543
|
-
"invariants" values from being used, so don't use this mechanism
|
544
|
-
unless you are sure you always want it.
|
345
|
+
<httpCaching never304="true" />
|
346
|
+
<!-- If you include a <cacheControl> directive, it will be used to
|
347
|
+
generate a Cache-Control header (as well as an Expires header
|
348
|
+
if the value contains "max-age=")
|
349
|
+
|
350
|
+
By default, no Cache-Control header is generated.
|
351
|
+
|
352
|
+
You can use the <cacheControl> option even if you have set
|
353
|
+
never304="true"
|
545
354
|
-->
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
355
|
+
<!--
|
356
|
+
<httpCaching never304="true" >
|
357
|
+
<cacheControl>max-age=30, public</cacheControl>
|
358
|
+
</httpCaching>
|
359
|
+
-->
|
360
|
+
<!-- To enable Solr to respond with automatically generated HTTP
|
361
|
+
Caching headers, and to response to Cache Validation requests
|
362
|
+
correctly, set the value of never304="false"
|
363
|
+
|
364
|
+
This will cause Solr to generate Last-Modified and ETag
|
365
|
+
headers based on the properties of the Index.
|
366
|
+
|
367
|
+
The following options can also be specified to affect the
|
368
|
+
values of these headers...
|
369
|
+
|
370
|
+
lastModFrom - the default value is "openTime" which means the
|
371
|
+
Last-Modified value (and validation against If-Modified-Since
|
372
|
+
requests) will all be relative to when the current Searcher
|
373
|
+
was opened. You can change it to lastModFrom="dirLastMod" if
|
374
|
+
you want the value to exactly correspond to when the physical
|
375
|
+
index was last modified.
|
376
|
+
|
377
|
+
etagSeed="..." is an option you can change to force the ETag
|
378
|
+
header (and validation against If-None-Match requests) to be
|
379
|
+
different even if the index has not changed (ie: when making
|
380
|
+
significant changes to your config file)
|
381
|
+
|
382
|
+
(lastModifiedFrom and etagSeed are both ignored if you use
|
383
|
+
the never304="true" option)
|
384
|
+
-->
|
385
|
+
<!--
|
386
|
+
<httpCaching lastModifiedFrom="openTime"
|
387
|
+
etagSeed="Solr">
|
388
|
+
<cacheControl>max-age=30, public</cacheControl>
|
389
|
+
</httpCaching>
|
390
|
+
-->
|
391
|
+
</requestDispatcher>
|
392
|
+
|
393
|
+
<!-- Request Handlers
|
394
|
+
|
395
|
+
http://wiki.apache.org/solr/SolrRequestHandler
|
396
|
+
|
397
|
+
Incoming queries will be dispatched to a specific handler by name
|
398
|
+
based on the path specified in the request.
|
399
|
+
|
400
|
+
Legacy behavior: If the request path uses "/select" but no Request
|
401
|
+
Handler has that name, and if handleSelect="true" has been specified in
|
402
|
+
the requestDispatcher, then the Request Handler is dispatched based on
|
403
|
+
the qt parameter. Handlers without a leading '/' are accessed this way
|
404
|
+
like so: http://host/app/[core/]select?qt=name If no qt is
|
405
|
+
given, then the requestHandler that declares default="true" will be
|
406
|
+
used or the one named "standard".
|
407
|
+
|
408
|
+
If a Request Handler is declared with startup="lazy", then it will
|
409
|
+
not be initialized until the first request that uses it.
|
574
410
|
|
575
|
-
If you register a searchComponent to one of the standard names, that will be used instead.
|
576
|
-
To insert components before or after the 'standard' components, use:
|
577
|
-
|
578
|
-
<arr name="first-components">
|
579
|
-
<str>myFirstComponentName</str>
|
580
|
-
</arr>
|
581
|
-
|
582
|
-
<arr name="last-components">
|
583
|
-
<str>myLastComponentName</str>
|
584
|
-
</arr>
|
585
|
-
-->
|
586
|
-
<!-- The spell check component can return a list of alternative spelling
|
587
|
-
suggestions. -->
|
588
|
-
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
589
|
-
<str name="queryAnalyzerFieldType">textSpell</str>
|
590
|
-
<lst name="spellchecker">
|
591
|
-
<str name="name">default</str>
|
592
|
-
<str name="field">name</str>
|
593
|
-
<str name="spellcheckIndexDir">./spellchecker</str>
|
594
|
-
</lst>
|
595
|
-
<!-- a spellchecker that uses a different distance measure
|
596
|
-
<lst name="spellchecker">
|
597
|
-
<str name="name">jarowinkler</str>
|
598
|
-
<str name="field">spell</str>
|
599
|
-
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
|
600
|
-
<str name="spellcheckIndexDir">./spellchecker2</str>
|
601
|
-
</lst>
|
602
|
-
-->
|
603
|
-
<!-- a file based spell checker
|
604
|
-
<lst name="spellchecker">
|
605
|
-
<str name="classname">solr.FileBasedSpellChecker</str>
|
606
|
-
<str name="name">file</str>
|
607
|
-
<str name="sourceLocation">spellings.txt</str>
|
608
|
-
<str name="characterEncoding">UTF-8</str>
|
609
|
-
<str name="spellcheckIndexDir">./spellcheckerFile</str>
|
610
|
-
</lst>
|
611
411
|
-->
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
#############################################################################
|
623
|
-
-->
|
624
|
-
<requestHandler name="/spell" class="solr.SearchHandler" lazy="true">
|
625
|
-
<lst name="defaults">
|
626
|
-
<!-- omp = Only More Popular -->
|
627
|
-
<str name="spellcheck.onlyMorePopular">false</str>
|
628
|
-
<!-- exr = Extended Results -->
|
629
|
-
<str name="spellcheck.extendedResults">false</str>
|
630
|
-
<!-- The number of suggestions to return -->
|
631
|
-
<str name="spellcheck.count">1</str>
|
632
|
-
</lst>
|
412
|
+
<!-- SearchHandler
|
413
|
+
|
414
|
+
http://wiki.apache.org/solr/SearchHandler
|
415
|
+
|
416
|
+
For processing Search Queries, the primary Request Handler
|
417
|
+
provided with Solr is "SearchHandler" It delegates to a sequent
|
418
|
+
of SearchComponents (see below) and supports distributed
|
419
|
+
queries across multiple shards
|
420
|
+
-->
|
421
|
+
<requestHandler name="/select" class="solr.SearchHandler">
|
633
422
|
<arr name="last-components">
|
634
423
|
<str>spellcheck</str>
|
635
424
|
</arr>
|
636
425
|
</requestHandler>
|
637
|
-
|
638
|
-
<!-- A
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
426
|
+
|
427
|
+
<!-- A request handler that returns indented JSON by default -->
|
428
|
+
<requestHandler name="/query" class="solr.SearchHandler">
|
429
|
+
<lst name="defaults">
|
430
|
+
<str name="echoParams">explicit</str>
|
431
|
+
<str name="wt">json</str>
|
432
|
+
<str name="indent">true</str>
|
433
|
+
<str name="df">text</str>
|
434
|
+
</lst>
|
435
|
+
<arr name="last-components">
|
436
|
+
<str>spellcheck</str>
|
437
|
+
</arr>
|
647
438
|
</requestHandler>
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
Class name of Carrot2 clustering algorithm. Currently available algorithms are:
|
663
|
-
|
664
|
-
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
665
|
-
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
666
|
-
|
667
|
-
See http://project.carrot2.org/algorithms.html for the algorithm's characteristics.
|
668
|
-
-->
|
669
|
-
<str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
|
670
|
-
<!--
|
671
|
-
Overriding values for Carrot2 default algorithm attributes. For a description
|
672
|
-
of all available attributes, see: http://download.carrot2.org/stable/manual/#chapter.components.
|
673
|
-
Use attribute key as name attribute of str elements below. These can be further
|
674
|
-
overridden for individual requests by specifying attribute key as request
|
675
|
-
parameter name and attribute value as parameter value.
|
676
|
-
-->
|
677
|
-
<str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
|
678
|
-
</lst>
|
679
|
-
<lst name="engine">
|
680
|
-
<str name="name">stc</str>
|
681
|
-
<str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
|
682
|
-
</lst>
|
683
|
-
</searchComponent>
|
684
|
-
<requestHandler name="/clustering" enable="${solr.clustering.enabled:false}" class="solr.SearchHandler">
|
685
|
-
<lst name="defaults">
|
686
|
-
<bool name="clustering">true</bool>
|
687
|
-
<str name="clustering.engine">default</str>
|
688
|
-
<bool name="clustering.results">true</bool>
|
689
|
-
<!-- The title field -->
|
690
|
-
<str name="carrot.title">name</str>
|
691
|
-
<str name="carrot.url">id</str>
|
692
|
-
<!-- The field to cluster on -->
|
693
|
-
<str name="carrot.snippet">features</str>
|
694
|
-
<!-- produce summaries -->
|
695
|
-
<bool name="carrot.produceSummary">true</bool>
|
696
|
-
<!-- the maximum number of labels per cluster -->
|
697
|
-
<!--<int name="carrot.numDescriptions">5</int>-->
|
698
|
-
<!-- produce sub clusters -->
|
699
|
-
<bool name="carrot.outputSubClusters">false</bool>
|
700
|
-
</lst>
|
701
|
-
<arr name="last-components">
|
702
|
-
<str>clusteringComponent</str>
|
703
|
-
</arr>
|
439
|
+
|
440
|
+
|
441
|
+
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
442
|
+
any document, without the need to commit or open a new searcher. The
|
443
|
+
current implementation relies on the updateLog feature being enabled. -->
|
444
|
+
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
445
|
+
<lst name="defaults">
|
446
|
+
<str name="omitHeader">true</str>
|
447
|
+
<str name="wt">json</str>
|
448
|
+
<str name="indent">true</str>
|
449
|
+
</lst>
|
450
|
+
</requestHandler>
|
451
|
+
|
452
|
+
<requestHandler name="/update" class="solr.UpdateRequestHandler">
|
704
453
|
</requestHandler>
|
705
|
-
|
706
|
-
<requestHandler name="/update/
|
454
|
+
|
455
|
+
<requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
|
456
|
+
<lst name="defaults">
|
457
|
+
<str name="stream.contentType">application/json</str>
|
458
|
+
</lst>
|
459
|
+
</requestHandler>
|
460
|
+
|
461
|
+
<requestHandler name="/update/csv" class="solr.CSVRequestHandler">
|
462
|
+
<lst name="defaults">
|
463
|
+
<str name="stream.contentType">application/csv</str>
|
464
|
+
</lst>
|
465
|
+
</requestHandler>
|
466
|
+
|
467
|
+
<requestHandler name="/update/extract"
|
468
|
+
startup="lazy"
|
469
|
+
class="solr.extraction.ExtractingRequestHandler" >
|
707
470
|
<lst name="defaults">
|
708
|
-
<!-- All the main content goes into "text"... if you need to return
|
709
|
-
the extracted text or do highlighting, use a stored field. -->
|
710
|
-
<str name="fmap.content">text</str>
|
711
471
|
<str name="lowernames">true</str>
|
712
472
|
<str name="uprefix">ignored_</str>
|
473
|
+
|
713
474
|
<!-- capture link hrefs but ignore div attributes -->
|
714
475
|
<str name="captureAttr">true</str>
|
715
476
|
<str name="fmap.a">links</str>
|
716
477
|
<str name="fmap.div">ignored_</str>
|
717
478
|
</lst>
|
718
479
|
</requestHandler>
|
719
|
-
<!-- A component to return terms and document frequency of those terms.
|
720
|
-
This component does not yet support distributed search. -->
|
721
|
-
<searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
|
722
|
-
<requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
|
723
|
-
<lst name="defaults">
|
724
|
-
<bool name="terms">true</bool>
|
725
|
-
</lst>
|
726
|
-
<arr name="components">
|
727
|
-
<str>termsComponent</str>
|
728
|
-
</arr>
|
729
|
-
</requestHandler>
|
730
|
-
<!-- a search component that enables you to configure the top results for
|
731
|
-
a given query regardless of the normal lucene scoring.-->
|
732
|
-
<searchComponent name="elevator" class="solr.QueryElevationComponent">
|
733
|
-
<!-- pick a fieldType to analyze queries -->
|
734
|
-
<str name="queryFieldType">string</str>
|
735
|
-
<str name="config-file">elevate.xml</str>
|
736
|
-
</searchComponent>
|
737
|
-
<!-- a request handler utilizing the elevator component -->
|
738
|
-
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
739
|
-
<lst name="defaults">
|
740
|
-
<str name="echoParams">explicit</str>
|
741
|
-
</lst>
|
742
|
-
<arr name="last-components">
|
743
|
-
<str>elevator</str>
|
744
|
-
</arr>
|
745
|
-
</requestHandler>
|
746
|
-
<!-- Update request handler.
|
747
480
|
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
|
760
|
-
|
761
|
-
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
762
|
-
-->
|
763
|
-
<!--
|
764
|
-
An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
|
765
|
-
(single) content stream with the following format:
|
766
|
-
|
767
|
-
<docs>
|
768
|
-
<doc>
|
769
|
-
<field name="id">1</field>
|
770
|
-
<field name="name">The Name</field>
|
771
|
-
<field name="text">The Text Value</field>
|
772
|
-
<doc>
|
773
|
-
<doc>...</doc>
|
774
|
-
<doc>...</doc>
|
775
|
-
...
|
776
|
-
</docs>
|
777
|
-
|
778
|
-
Note: Each document must contain a field which serves as the unique key. This key is used in the returned
|
779
|
-
response to assoicate an analysis breakdown to the analyzed document.
|
780
|
-
|
781
|
-
Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
|
782
|
-
sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
|
783
|
-
supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
|
784
|
-
tokens will be marked as a "match".
|
785
|
-
-->
|
786
|
-
<requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler"/>
|
787
|
-
<!--
|
788
|
-
RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
|
789
|
-
to specify multiple field types and field names in the same request and outputs index-time and
|
790
|
-
query-time analysis for each of them.
|
791
|
-
|
792
|
-
Request parameters are:
|
793
|
-
analysis.fieldname - The field name whose analyzers are to be used
|
794
|
-
analysis.fieldtype - The field type whose analyzers are to be used
|
795
|
-
analysis.fieldvalue - The text for index-time analysis
|
796
|
-
q (or analysis.q) - The text for query time analysis
|
797
|
-
analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
|
798
|
-
tokens of the field value analysis will be marked as "matched" for every
|
799
|
-
token that is produces by the query analysis
|
800
|
-
-->
|
801
|
-
<requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler"/>
|
802
|
-
<!-- CSV update handler, loaded on demand -->
|
803
|
-
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy"/>
|
804
|
-
<!--
|
805
|
-
Admin Handlers - This will register all the standard admin RequestHandlers. Adding
|
806
|
-
this single handler is equivalent to registering:
|
807
|
-
|
808
|
-
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
809
|
-
<requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
810
|
-
<requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
811
|
-
<requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
812
|
-
<requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
813
|
-
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
814
|
-
|
815
|
-
If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
816
|
-
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
481
|
+
<requestHandler name="/analysis/field"
|
482
|
+
startup="lazy"
|
483
|
+
class="solr.FieldAnalysisRequestHandler" />
|
484
|
+
|
485
|
+
<requestHandler name="/analysis/document"
|
486
|
+
class="solr.DocumentAnalysisRequestHandler"
|
487
|
+
startup="lazy" />
|
488
|
+
|
489
|
+
<!-- ping/healthcheck -->
|
490
|
+
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
817
491
|
<lst name="invariants">
|
818
|
-
|
819
|
-
<str name="hidden">anotherfile.txt</str>
|
492
|
+
<str name="q">solrpingquery</str>
|
820
493
|
</lst>
|
821
|
-
</requestHandler>
|
822
|
-
-->
|
823
|
-
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers"/>
|
824
|
-
<!-- ping/healthcheck -->
|
825
|
-
<requestHandler name="/admin/ping" class="PingRequestHandler">
|
826
494
|
<lst name="defaults">
|
827
|
-
<str name="qt">standard</str>
|
828
|
-
<str name="q">solrpingquery</str>
|
829
495
|
<str name="echoParams">all</str>
|
830
496
|
</lst>
|
831
497
|
</requestHandler>
|
832
|
-
|
833
|
-
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler">
|
498
|
+
|
499
|
+
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
834
500
|
<lst name="defaults">
|
835
|
-
|
836
|
-
|
837
|
-
<str name="echoHandler">true</str>
|
501
|
+
<str name="echoParams">explicit</str>
|
502
|
+
<str name="echoHandler">true</str>
|
838
503
|
</lst>
|
839
504
|
</requestHandler>
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
<!--
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
</
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
<
|
883
|
-
<
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
505
|
+
|
506
|
+
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
507
|
+
</requestHandler>
|
508
|
+
|
509
|
+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
510
|
+
|
511
|
+
<str name="queryAnalyzerFieldType">textSpell</str>
|
512
|
+
|
513
|
+
<!-- Multiple "Spell Checkers" can be declared and used by this
|
514
|
+
component
|
515
|
+
-->
|
516
|
+
|
517
|
+
<!-- a spellchecker built from a field of the main index -->
|
518
|
+
<lst name="spellchecker">
|
519
|
+
<str name="name">default</str>
|
520
|
+
<str name="field">name</str>
|
521
|
+
<str name="classname">solr.DirectSolrSpellChecker</str>
|
522
|
+
<!-- the spellcheck distance measure used, the default is the internal levenshtein -->
|
523
|
+
<str name="distanceMeasure">internal</str>
|
524
|
+
<!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
|
525
|
+
<float name="accuracy">0.5</float>
|
526
|
+
<!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
|
527
|
+
<int name="maxEdits">2</int>
|
528
|
+
<!-- the minimum shared prefix when enumerating terms -->
|
529
|
+
<int name="minPrefix">1</int>
|
530
|
+
<!-- maximum number of inspections per result. -->
|
531
|
+
<int name="maxInspections">5</int>
|
532
|
+
<!-- minimum length of a query term to be considered for correction -->
|
533
|
+
<int name="minQueryLength">4</int>
|
534
|
+
<!-- maximum threshold of documents a query term can appear to be considered for correction -->
|
535
|
+
<float name="maxQueryFrequency">0.01</float>
|
536
|
+
<!-- uncomment this to require suggestions to occur in 1% of the documents
|
537
|
+
<float name="thresholdTokenFrequency">.01</float>
|
538
|
+
-->
|
539
|
+
</lst>
|
540
|
+
|
541
|
+
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
|
542
|
+
<lst name="spellchecker">
|
543
|
+
<str name="name">wordbreak</str>
|
544
|
+
<str name="classname">solr.WordBreakSolrSpellChecker</str>
|
545
|
+
<str name="field">name</str>
|
546
|
+
<str name="combineWords">true</str>
|
547
|
+
<str name="breakWords">true</str>
|
548
|
+
<int name="maxChanges">10</int>
|
549
|
+
</lst>
|
550
|
+
</searchComponent>
|
551
|
+
|
552
|
+
<searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
|
553
|
+
|
554
|
+
<searchComponent name="terms" class="solr.TermsComponent"/>
|
555
|
+
|
556
|
+
<searchComponent class="solr.HighlightComponent" name="highlight">
|
557
|
+
<highlighting>
|
558
|
+
<!-- Configure the standard fragmenter -->
|
559
|
+
<!-- This could most likely be commented out in the "default" case -->
|
560
|
+
<fragmenter name="gap"
|
561
|
+
default="true"
|
562
|
+
class="solr.highlight.GapFragmenter">
|
563
|
+
<lst name="defaults">
|
564
|
+
<int name="hl.fragsize">100</int>
|
565
|
+
</lst>
|
566
|
+
</fragmenter>
|
567
|
+
|
568
|
+
<!-- A regular-expression-based fragmenter
|
569
|
+
(for sentence extraction)
|
570
|
+
-->
|
571
|
+
<fragmenter name="regex"
|
572
|
+
class="solr.highlight.RegexFragmenter">
|
573
|
+
<lst name="defaults">
|
574
|
+
<!-- slightly smaller fragsizes work better because of slop -->
|
575
|
+
<int name="hl.fragsize">70</int>
|
576
|
+
<!-- allow 50% slop on fragment sizes -->
|
577
|
+
<float name="hl.regex.slop">0.5</float>
|
578
|
+
<!-- a basic sentence pattern -->
|
579
|
+
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
580
|
+
</lst>
|
581
|
+
</fragmenter>
|
582
|
+
|
583
|
+
<!-- Configure the standard formatter -->
|
584
|
+
<formatter name="html"
|
585
|
+
default="true"
|
586
|
+
class="solr.highlight.HtmlFormatter">
|
587
|
+
<lst name="defaults">
|
588
|
+
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
589
|
+
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
590
|
+
</lst>
|
591
|
+
</formatter>
|
592
|
+
|
593
|
+
<!-- Configure the standard encoder -->
|
594
|
+
<encoder name="html"
|
595
|
+
class="solr.highlight.HtmlEncoder" />
|
596
|
+
|
597
|
+
<!-- Configure the standard fragListBuilder -->
|
598
|
+
<fragListBuilder name="simple"
|
599
|
+
class="solr.highlight.SimpleFragListBuilder"/>
|
600
|
+
|
601
|
+
<!-- Configure the single fragListBuilder -->
|
602
|
+
<fragListBuilder name="single"
|
603
|
+
class="solr.highlight.SingleFragListBuilder"/>
|
604
|
+
|
605
|
+
<!-- Configure the weighted fragListBuilder -->
|
606
|
+
<fragListBuilder name="weighted"
|
607
|
+
default="true"
|
608
|
+
class="solr.highlight.WeightedFragListBuilder"/>
|
609
|
+
|
610
|
+
<!-- default tag FragmentsBuilder -->
|
611
|
+
<fragmentsBuilder name="default"
|
612
|
+
default="true"
|
613
|
+
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
614
|
+
<!--
|
615
|
+
<lst name="defaults">
|
616
|
+
<str name="hl.multiValuedSeparatorChar">/</str>
|
617
|
+
</lst>
|
618
|
+
-->
|
619
|
+
</fragmentsBuilder>
|
620
|
+
|
621
|
+
<!-- multi-colored tag FragmentsBuilder -->
|
622
|
+
<fragmentsBuilder name="colored"
|
623
|
+
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
624
|
+
<lst name="defaults">
|
625
|
+
<str name="hl.tag.pre"><![CDATA[
|
626
|
+
<b style="background:yellow">,<b style="background:lawgreen">,
|
627
|
+
<b style="background:aquamarine">,<b style="background:magenta">,
|
628
|
+
<b style="background:palegreen">,<b style="background:coral">,
|
629
|
+
<b style="background:wheat">,<b style="background:khaki">,
|
630
|
+
<b style="background:lime">,<b style="background:deepskyblue">]]></str>
|
631
|
+
<str name="hl.tag.post"><![CDATA[</b>]]></str>
|
632
|
+
</lst>
|
633
|
+
</fragmentsBuilder>
|
634
|
+
|
635
|
+
<boundaryScanner name="default"
|
636
|
+
default="true"
|
637
|
+
class="solr.highlight.SimpleBoundaryScanner">
|
638
|
+
<lst name="defaults">
|
639
|
+
<str name="hl.bs.maxScan">10</str>
|
640
|
+
<str name="hl.bs.chars">.,!? 	 </str>
|
641
|
+
</lst>
|
642
|
+
</boundaryScanner>
|
643
|
+
|
644
|
+
<boundaryScanner name="breakIterator"
|
645
|
+
class="solr.highlight.BreakIteratorBoundaryScanner">
|
646
|
+
<lst name="defaults">
|
647
|
+
<!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
|
648
|
+
<str name="hl.bs.type">WORD</str>
|
649
|
+
<!-- language and country are used when constructing Locale object. -->
|
650
|
+
<!-- And the Locale object will be used when getting instance of BreakIterator -->
|
651
|
+
<str name="hl.bs.language">en</str>
|
652
|
+
<str name="hl.bs.country">US</str>
|
653
|
+
</lst>
|
654
|
+
</boundaryScanner>
|
655
|
+
</highlighting>
|
656
|
+
</searchComponent>
|
657
|
+
|
928
658
|
<requestHandler class="solr.MoreLikeThisHandler" name="/mlt">
|
929
659
|
<lst name="defaults">
|
930
660
|
<str name="mlt.mintf">1</str>
|
931
661
|
<str name="mlt.mindf">2</str>
|
932
662
|
</lst>
|
933
663
|
</requestHandler>
|
664
|
+
|
665
|
+
<!-- Admin Handlers - This will register all the standard admin RequestHandlers. -->
|
666
|
+
<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />
|
934
667
|
</config>
|