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
|
For more details about configurations options that may appear in
|
21
|
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
22
|
-->
|
23
|
<config>
|
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)
|
27
|
|
28
|
You may also specify a fully qualified Java classname if you
|
29
|
have your own custom plugins.
|
30
|
-->
|
31
|
|
32
|
<!-- Set this to 'false' if you want solr to continue working after
|
33
|
it has encountered an severe configuration error. In a
|
34
|
production environment, you may want solr to keep working even
|
35
|
if one handler is mis-configured.
|
36
|
|
37
|
You may also set this to false using by setting the system
|
38
|
property:
|
39
|
|
40
|
-Dsolr.abortOnConfigurationError=false
|
41
|
-->
|
42
|
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
43
|
|
44
|
<!-- Controls what version of Lucene various components of Solr
|
45
|
adhere to. Generally, you want to use the latest version to
|
46
|
get all bug fixes and improvements. It is highly recommended
|
47
|
that you fully re-index after changing this setting as it can
|
48
|
affect both how text is indexed and queried.
|
49
|
-->
|
50
|
<luceneMatchVersion>LUCENE_34</luceneMatchVersion>
|
51
|
|
52
|
<!-- lib directives can be used to instruct Solr to load an Jars
|
53
|
identified and use them to resolve any "plugins" specified in
|
54
|
your solrconfig.xml or schema.xml (ie: Analyzers, Request
|
55
|
Handlers, etc...).
|
56
|
|
57
|
All directories and paths are resolved relative to the
|
58
|
instanceDir.
|
59
|
|
60
|
If a "./lib" directory exists in your instanceDir, all files
|
61
|
found in it are included as if you had used the following
|
62
|
syntax...
|
63
|
|
64
|
<lib dir="./lib" />
|
65
|
-->
|
66
|
<!-- A dir option by itself adds any files found in the directory to
|
67
|
the classpath, this is useful for including all jars in a
|
68
|
directory.
|
69
|
-->
|
70
|
<lib dir="../../contrib/extraction/lib" />
|
71
|
<!-- When a regex is specified in addition to a directory, only the
|
72
|
files in that directory which completely match the regex
|
73
|
(anchored on both ends) will be included.
|
74
|
-->
|
75
|
<lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" />
|
76
|
<lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
|
77
|
<lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
|
78
|
|
79
|
<!-- If a dir option (with or without a regex) is used and nothing
|
80
|
is found that matches, it will be ignored
|
81
|
-->
|
82
|
<lib dir="../../contrib/clustering/lib/" />
|
83
|
<lib dir="/total/crap/dir/ignored" />
|
84
|
<!-- an exact path can be used to specify a specific file. This
|
85
|
will cause a serious error to be logged if it can't be loaded.
|
86
|
-->
|
87
|
<!--
|
88
|
<lib path="../a-jar-that-does-not-exist.jar" />
|
89
|
-->
|
90
|
|
91
|
<!-- Data Directory
|
92
|
|
93
|
Used to specify an alternate directory to hold all index data
|
94
|
other than the default ./data under the Solr home. If
|
95
|
replication is in use, this should match the replication
|
96
|
configuration.
|
97
|
-->
|
98
|
<dataDir>${solr.data.dir:}</dataDir>
|
99
|
|
100
|
|
101
|
<!-- The DirectoryFactory to use for indexes.
|
102
|
|
103
|
solr.StandardDirectoryFactory, the default, is filesystem
|
104
|
based and tries to pick the best implementation for the current
|
105
|
JVM and platform. One can force a particular implementation
|
106
|
via solr.MMapDirectoryFactory, solr.NIOFSDirectoryFactory, or
|
107
|
solr.SimpleFSDirectoryFactory.
|
108
|
|
109
|
solr.RAMDirectoryFactory is memory based, not
|
110
|
persistent, and doesn't work with replication.
|
111
|
-->
|
112
|
<directoryFactory name="DirectoryFactory"
|
113
|
class="${solr.directoryFactory:solr.StandardDirectoryFactory}"/>
|
114
|
|
115
|
|
116
|
<!-- Index Defaults
|
117
|
|
118
|
Values here affect all index writers and act as a default
|
119
|
unless overridden.
|
120
|
|
121
|
WARNING: See also the <mainIndex> section below for parameters
|
122
|
that overfor Solr's main Lucene index.
|
123
|
-->
|
124
|
<indexDefaults>
|
125
|
|
126
|
<useCompoundFile>false</useCompoundFile>
|
127
|
|
128
|
<mergeFactor>10</mergeFactor>
|
129
|
<!-- Sets the amount of RAM that may be used by Lucene indexing
|
130
|
for buffering added documents and deletions before they are
|
131
|
flushed to the Directory. -->
|
132
|
<ramBufferSizeMB>32</ramBufferSizeMB>
|
133
|
<!-- If both ramBufferSizeMB and maxBufferedDocs is set, then
|
134
|
Lucene will flush based on whichever limit is hit first.
|
135
|
-->
|
136
|
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
|
137
|
|
138
|
<maxFieldLength>10000</maxFieldLength>
|
139
|
<writeLockTimeout>1000</writeLockTimeout>
|
140
|
<commitLockTimeout>10000</commitLockTimeout>
|
141
|
|
142
|
<!-- Expert: Merge Policy
|
143
|
|
144
|
The Merge Policy in Lucene controls how merging is handled by
|
145
|
Lucene. The default in Solr 3.3 is TieredMergePolicy.
|
146
|
|
147
|
The default in 2.3 was the LogByteSizeMergePolicy,
|
148
|
previous versions used LogDocMergePolicy.
|
149
|
|
150
|
LogByteSizeMergePolicy chooses segments to merge based on
|
151
|
their size. The Lucene 2.2 default, LogDocMergePolicy chose
|
152
|
when to merge based on number of documents
|
153
|
|
154
|
Other implementations of MergePolicy must have a no-argument
|
155
|
constructor
|
156
|
-->
|
157
|
<!--
|
158
|
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy"/>
|
159
|
-->
|
160
|
|
161
|
<!-- Expert: Merge Scheduler
|
162
|
|
163
|
The Merge Scheduler in Lucene controls how merges are
|
164
|
performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
165
|
can perform merges in the background using separate threads.
|
166
|
The SerialMergeScheduler (Lucene 2.2 default) does not.
|
167
|
-->
|
168
|
<!--
|
169
|
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
170
|
-->
|
171
|
|
172
|
<!-- LockFactory
|
173
|
|
174
|
This option specifies which Lucene LockFactory implementation
|
175
|
to use.
|
176
|
|
177
|
single = SingleInstanceLockFactory - suggested for a
|
178
|
read-only index or when there is no possibility of
|
179
|
another process trying to modify the index.
|
180
|
native = NativeFSLockFactory - uses OS native file locking.
|
181
|
Do not use when multiple solr webapps in the same
|
182
|
JVM are attempting to share a single index.
|
183
|
simple = SimpleFSLockFactory - uses a plain file for locking
|
184
|
|
185
|
(For backwards compatibility with Solr 1.2, 'simple' is the
|
186
|
default if not specified.)
|
187
|
|
188
|
More details on the nuances of each LockFactory...
|
189
|
http://wiki.apache.org/lucene-java/AvailableLockFactories
|
190
|
-->
|
191
|
<lockType>native</lockType>
|
192
|
|
193
|
<!-- Expert: Controls how often Lucene loads terms into memory
|
194
|
Default is 128 and is likely good for most everyone.
|
195
|
-->
|
196
|
<!-- <termIndexInterval>256</termIndexInterval> -->
|
197
|
</indexDefaults>
|
198
|
|
199
|
<!-- Main Index
|
200
|
|
201
|
Values here override the values in the <indexDefaults> section
|
202
|
for the main on disk index.
|
203
|
-->
|
204
|
<mainIndex>
|
205
|
|
206
|
<useCompoundFile>false</useCompoundFile>
|
207
|
<ramBufferSizeMB>32</ramBufferSizeMB>
|
208
|
<mergeFactor>10</mergeFactor>
|
209
|
|
210
|
<!-- Unlock On Startup
|
211
|
|
212
|
If true, unlock any held write or commit locks on startup.
|
213
|
This defeats the locking mechanism that allows multiple
|
214
|
processes to safely access a lucene index, and should be used
|
215
|
with care.
|
216
|
|
217
|
This is not needed if lock type is 'none' or 'single'
|
218
|
-->
|
219
|
<unlockOnStartup>false</unlockOnStartup>
|
220
|
|
221
|
<!-- If true, IndexReaders will be reopened (often more efficient)
|
222
|
instead of closed and then opened.
|
223
|
-->
|
224
|
<reopenReaders>true</reopenReaders>
|
225
|
|
226
|
<!-- Commit Deletion Policy
|
227
|
|
228
|
Custom deletion policies can specified here. The class must
|
229
|
implement org.apache.lucene.index.IndexDeletionPolicy.
|
230
|
|
231
|
http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/index/IndexDeletionPolicy.html
|
232
|
|
233
|
The standard Solr IndexDeletionPolicy implementation supports
|
234
|
deleting index commit points on number of commits, age of
|
235
|
commit point and optimized status.
|
236
|
|
237
|
The latest commit point should always be preserved regardless
|
238
|
of the criteria.
|
239
|
-->
|
240
|
<deletionPolicy class="solr.SolrDeletionPolicy">
|
241
|
<!-- The number of commit points to be kept -->
|
242
|
<str name="maxCommitsToKeep">1</str>
|
243
|
<!-- The number of optimized commit points to be kept -->
|
244
|
<str name="maxOptimizedCommitsToKeep">0</str>
|
245
|
<!--
|
246
|
Delete all commit points once they have reached the given age.
|
247
|
Supports DateMathParser syntax e.g.
|
248
|
-->
|
249
|
<!--
|
250
|
<str name="maxCommitAge">30MINUTES</str>
|
251
|
<str name="maxCommitAge">1DAY</str>
|
252
|
-->
|
253
|
</deletionPolicy>
|
254
|
|
255
|
<!-- Lucene Infostream
|
256
|
|
257
|
To aid in advanced debugging, Lucene provides an "InfoStream"
|
258
|
of detailed information when indexing.
|
259
|
|
260
|
Setting The value to true will instruct the underlying Lucene
|
261
|
IndexWriter to write its debugging info the specified file
|
262
|
-->
|
263
|
<infoStream file="INFOSTREAM.txt">false</infoStream>
|
264
|
|
265
|
</mainIndex>
|
266
|
|
267
|
<!-- JMX
|
268
|
|
269
|
This example enables JMX if and only if an existing MBeanServer
|
270
|
is found, use this if you want to configure JMX through JVM
|
271
|
parameters. Remove this to disable exposing Solr configuration
|
272
|
and statistics to JMX.
|
273
|
|
274
|
For more details see http://wiki.apache.org/solr/SolrJmx
|
275
|
-->
|
276
|
<jmx />
|
277
|
<!-- If you want to connect to a particular server, specify the
|
278
|
agentId
|
279
|
-->
|
280
|
<!-- <jmx agentId="myAgent" /> -->
|
281
|
<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
|
282
|
<!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
|
283
|
-->
|
284
|
|
285
|
<!-- The default high-performance update handler -->
|
286
|
<updateHandler class="solr.DirectUpdateHandler2">
|
287
|
|
288
|
<!-- AutoCommit
|
289
|
|
290
|
Perform a <commit/> automatically under certain conditions.
|
291
|
Instead of enabling autoCommit, consider using "commitWithin"
|
292
|
when adding documents.
|
293
|
|
294
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
295
|
|
296
|
maxDocs - Maximum number of documents to add since the last
|
297
|
commit before automatically triggering a new commit.
|
298
|
|
299
|
maxTime - Maximum amount of time that is allowed to pass
|
300
|
since a document was added before automaticly
|
301
|
triggering a new commit.
|
302
|
-->
|
303
|
<!--
|
304
|
<autoCommit>
|
305
|
<maxDocs>10000</maxDocs>
|
306
|
<maxTime>1000</maxTime>
|
307
|
</autoCommit>
|
308
|
-->
|
309
|
|
310
|
<!-- Update Related Event Listeners
|
311
|
|
312
|
Various IndexWriter related events can trigger Listeners to
|
313
|
take actions.
|
314
|
|
315
|
postCommit - fired after every commit or optimize command
|
316
|
postOptimize - fired after every optimize command
|
317
|
-->
|
318
|
<!-- The RunExecutableListener executes an external command from a
|
319
|
hook such as postCommit or postOptimize.
|
320
|
|
321
|
exe - the name of the executable to run
|
322
|
dir - dir to use as the current working directory. (default=".")
|
323
|
wait - the calling thread waits until the executable returns.
|
324
|
(default="true")
|
325
|
args - the arguments to pass to the program. (default is none)
|
326
|
env - environment variables to set. (default is none)
|
327
|
-->
|
328
|
<!-- This example shows how RunExecutableListener could be used
|
329
|
with the script based replication...
|
330
|
http://wiki.apache.org/solr/CollectionDistribution
|
331
|
-->
|
332
|
<!--
|
333
|
<listener event="postCommit" class="solr.RunExecutableListener">
|
334
|
<str name="exe">solr/bin/snapshooter</str>
|
335
|
<str name="dir">.</str>
|
336
|
<bool name="wait">true</bool>
|
337
|
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
338
|
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
339
|
</listener>
|
340
|
-->
|
341
|
</updateHandler>
|
342
|
|
343
|
<!-- IndexReaderFactory
|
344
|
|
345
|
Use the following format to specify a custom IndexReaderFactory,
|
346
|
which allows for alternate IndexReader implementations.
|
347
|
|
348
|
** Experimental Feature **
|
349
|
|
350
|
Please note - Using a custom IndexReaderFactory may prevent
|
351
|
certain other features from working. The API to
|
352
|
IndexReaderFactory may change without warning or may even be
|
353
|
removed from future releases if the problems cannot be
|
354
|
resolved.
|
355
|
|
356
|
|
357
|
** Features that may not work with custom IndexReaderFactory **
|
358
|
|
359
|
The ReplicationHandler assumes a disk-resident index. Using a
|
360
|
custom IndexReader implementation may cause incompatibility
|
361
|
with ReplicationHandler and may cause replication to not work
|
362
|
correctly. See SOLR-1366 for details.
|
363
|
|
364
|
-->
|
365
|
<!--
|
366
|
<indexReaderFactory name="IndexReaderFactory" class="package.class">
|
367
|
<str name="someArg">Some Value</str>
|
368
|
</indexReaderFactory >
|
369
|
-->
|
370
|
<!-- By explicitly declaring the Factory, the termIndexDivisor can
|
371
|
be specified.
|
372
|
-->
|
373
|
<!--
|
374
|
<indexReaderFactory name="IndexReaderFactory"
|
375
|
class="solr.StandardIndexReaderFactory">
|
376
|
<int name="setTermIndexDivisor">12</int>
|
377
|
</indexReaderFactory >
|
378
|
-->
|
379
|
|
380
|
|
381
|
<query>
|
382
|
<!-- Max Boolean Clauses
|
383
|
|
384
|
Maximum number of clauses in each BooleanQuery, an exception
|
385
|
is thrown if exceeded.
|
386
|
|
387
|
** WARNING **
|
388
|
|
389
|
This option actually modifies a global Lucene property that
|
390
|
will affect all SolrCores. If multiple solrconfig.xml files
|
391
|
disagree on this property, the value at any given moment will
|
392
|
be based on the last SolrCore to be initialized.
|
393
|
|
394
|
-->
|
395
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
396
|
|
397
|
|
398
|
<!-- Solr Internal Query Caches
|
399
|
|
400
|
There are two implementations of cache available for Solr,
|
401
|
LRUCache, based on a synchronized LinkedHashMap, and
|
402
|
FastLRUCache, based on a ConcurrentHashMap.
|
403
|
|
404
|
FastLRUCache has faster gets and slower puts in single
|
405
|
threaded operation and thus is generally faster than LRUCache
|
406
|
when the hit ratio of the cache is high (> 75%), and may be
|
407
|
faster under other scenarios on multi-cpu systems.
|
408
|
-->
|
409
|
|
410
|
<!-- Filter Cache
|
411
|
|
412
|
Cache used by SolrIndexSearcher for filters (DocSets),
|
413
|
unordered sets of *all* documents that match a query. When a
|
414
|
new searcher is opened, its caches may be prepopulated or
|
415
|
"autowarmed" using data from caches in the old searcher.
|
416
|
autowarmCount is the number of items to prepopulate. For
|
417
|
LRUCache, the autowarmed items will be the most recently
|
418
|
accessed items.
|
419
|
|
420
|
Parameters:
|
421
|
class - the SolrCache implementation LRUCache or
|
422
|
(LRUCache or FastLRUCache)
|
423
|
size - the maximum number of entries in the cache
|
424
|
initialSize - the initial capacity (number of entries) of
|
425
|
the cache. (see java.util.HashMap)
|
426
|
autowarmCount - the number of entries to prepopulate from
|
427
|
and old cache.
|
428
|
-->
|
429
|
<filterCache class="solr.FastLRUCache"
|
430
|
size="512"
|
431
|
initialSize="512"
|
432
|
autowarmCount="0"/>
|
433
|
|
434
|
<!-- Query Result Cache
|
435
|
|
436
|
Caches results of searches - ordered lists of document ids
|
437
|
(DocList) based on a query, a sort, and the range of documents requested.
|
438
|
-->
|
439
|
<queryResultCache class="solr.LRUCache"
|
440
|
size="512"
|
441
|
initialSize="512"
|
442
|
autowarmCount="0"/>
|
443
|
|
444
|
<!-- Document Cache
|
445
|
|
446
|
Caches Lucene Document objects (the stored fields for each
|
447
|
document). Since Lucene internal document ids are transient,
|
448
|
this cache will not be autowarmed.
|
449
|
-->
|
450
|
<documentCache class="solr.LRUCache"
|
451
|
size="512"
|
452
|
initialSize="512"
|
453
|
autowarmCount="0"/>
|
454
|
|
455
|
<!-- Field Value Cache
|
456
|
|
457
|
Cache used to hold field values that are quickly accessible
|
458
|
by document id. The fieldValueCache is created by default
|
459
|
even if not configured here.
|
460
|
-->
|
461
|
<!--
|
462
|
<fieldValueCache class="solr.FastLRUCache"
|
463
|
size="512"
|
464
|
autowarmCount="128"
|
465
|
showItems="32" />
|
466
|
-->
|
467
|
|
468
|
<!-- Custom Cache
|
469
|
|
470
|
Example of a generic cache. These caches may be accessed by
|
471
|
name through SolrIndexSearcher.getCache(),cacheLookup(), and
|
472
|
cacheInsert(). The purpose is to enable easy caching of
|
473
|
user/application level data. The regenerator argument should
|
474
|
be specified as an implementation of solr.CacheRegenerator
|
475
|
if autowarming is desired.
|
476
|
-->
|
477
|
<!--
|
478
|
<cache name="myUserCache"
|
479
|
class="solr.LRUCache"
|
480
|
size="4096"
|
481
|
initialSize="1024"
|
482
|
autowarmCount="1024"
|
483
|
regenerator="com.mycompany.MyRegenerator"
|
484
|
/>
|
485
|
-->
|
486
|
|
487
|
|
488
|
<!-- Lazy Field Loading
|
489
|
|
490
|
If true, stored fields that are not requested will be loaded
|
491
|
lazily. This can result in a significant speed improvement
|
492
|
if the usual case is to not load all stored fields,
|
493
|
especially if the skipped fields are large compressed text
|
494
|
fields.
|
495
|
-->
|
496
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
497
|
|
498
|
<!-- Use Filter For Sorted Query
|
499
|
|
500
|
A possible optimization that attempts to use a filter to
|
501
|
satisfy a search. If the requested sort does not include
|
502
|
score, then the filterCache will be checked for a filter
|
503
|
matching the query. If found, the filter will be used as the
|
504
|
source of document ids, and then the sort will be applied to
|
505
|
that.
|
506
|
|
507
|
For most situations, this will not be useful unless you
|
508
|
frequently get the same search repeatedly with different sort
|
509
|
options, and none of them ever use "score"
|
510
|
-->
|
511
|
<!--
|
512
|
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
513
|
-->
|
514
|
|
515
|
<!-- Result Window Size
|
516
|
|
517
|
An optimization for use with the queryResultCache. When a search
|
518
|
is requested, a superset of the requested number of document ids
|
519
|
are collected. For example, if a search for a particular query
|
520
|
requests matching documents 10 through 19, and queryWindowSize is 50,
|
521
|
then documents 0 through 49 will be collected and cached. Any further
|
522
|
requests in that range can be satisfied via the cache.
|
523
|
-->
|
524
|
<queryResultWindowSize>20</queryResultWindowSize>
|
525
|
|
526
|
<!-- Maximum number of documents to cache for any entry in the
|
527
|
queryResultCache.
|
528
|
-->
|
529
|
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
530
|
|
531
|
<!-- Query Related Event Listeners
|
532
|
|
533
|
Various IndexSearcher related events can trigger Listeners to
|
534
|
take actions.
|
535
|
|
536
|
newSearcher - fired whenever a new searcher is being prepared
|
537
|
and there is a current searcher handling requests (aka
|
538
|
registered). It can be used to prime certain caches to
|
539
|
prevent long request times for certain requests.
|
540
|
|
541
|
firstSearcher - fired whenever a new searcher is being
|
542
|
prepared but there is no current registered searcher to handle
|
543
|
requests or to gain autowarming data from.
|
544
|
|
545
|
|
546
|
-->
|
547
|
<!-- QuerySenderListener takes an array of NamedList and executes a
|
548
|
local query request for each NamedList in sequence.
|
549
|
-->
|
550
|
<listener event="newSearcher" class="solr.QuerySenderListener">
|
551
|
<arr name="queries">
|
552
|
<!--
|
553
|
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
|
554
|
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
|
555
|
-->
|
556
|
</arr>
|
557
|
</listener>
|
558
|
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
559
|
<arr name="queries">
|
560
|
<lst>
|
561
|
<str name="q">static firstSearcher warming in solrconfig.xml</str>
|
562
|
</lst>
|
563
|
</arr>
|
564
|
</listener>
|
565
|
|
566
|
<!-- Use Cold Searcher
|
567
|
|
568
|
If a search request comes in and there is no current
|
569
|
registered searcher, then immediately register the still
|
570
|
warming searcher and use it. If "false" then all requests
|
571
|
will block until the first searcher is done warming.
|
572
|
-->
|
573
|
<useColdSearcher>false</useColdSearcher>
|
574
|
|
575
|
<!-- Max Warming Searchers
|
576
|
|
577
|
Maximum number of searchers that may be warming in the
|
578
|
background concurrently. An error is returned if this limit
|
579
|
is exceeded.
|
580
|
|
581
|
Recommend values of 1-2 for read-only slaves, higher for
|
582
|
masters w/o cache warming.
|
583
|
-->
|
584
|
<maxWarmingSearchers>2</maxWarmingSearchers>
|
585
|
|
586
|
</query>
|
587
|
|
588
|
|
589
|
<!-- Request Dispatcher
|
590
|
|
591
|
This section contains instructions for how the SolrDispatchFilter
|
592
|
should behave when processing requests for this SolrCore.
|
593
|
|
594
|
handleSelect affects the behavior of requests such as /select?qt=XXX
|
595
|
|
596
|
handleSelect="true" will cause the SolrDispatchFilter to process
|
597
|
the request and will result in consistent error handling and
|
598
|
formatting for all types of requests.
|
599
|
|
600
|
handleSelect="false" will cause the SolrDispatchFilter to
|
601
|
ignore "/select" requests and fallback to using the legacy
|
602
|
SolrServlet and it's Solr 1.1 style error formatting
|
603
|
-->
|
604
|
<requestDispatcher handleSelect="true" >
|
605
|
<!-- Request Parsing
|
606
|
|
607
|
These settings indicate how Solr Requests may be parsed, and
|
608
|
what restrictions may be placed on the ContentStreams from
|
609
|
those requests
|
610
|
|
611
|
enableRemoteStreaming - enables use of the stream.file
|
612
|
and stream.url parameters for specifying remote streams.
|
613
|
|
614
|
multipartUploadLimitInKB - specifies the max size of
|
615
|
Multipart File Uploads that Solr will allow in a Request.
|
616
|
|
617
|
*** WARNING ***
|
618
|
The settings below authorize Solr to fetch remote files, You
|
619
|
should make sure your system has some authentication before
|
620
|
using enableRemoteStreaming="true"
|
621
|
|
622
|
-->
|
623
|
<requestParsers enableRemoteStreaming="true"
|
624
|
multipartUploadLimitInKB="2048000" />
|
625
|
|
626
|
<!-- HTTP Caching
|
627
|
|
628
|
Set HTTP caching related parameters (for proxy caches and clients).
|
629
|
|
630
|
The options below instruct Solr not to output any HTTP Caching
|
631
|
related headers
|
632
|
-->
|
633
|
<httpCaching never304="true" />
|
634
|
<!-- If you include a <cacheControl> directive, it will be used to
|
635
|
generate a Cache-Control header (as well as an Expires header
|
636
|
if the value contains "max-age=")
|
637
|
|
638
|
By default, no Cache-Control header is generated.
|
639
|
|
640
|
You can use the <cacheControl> option even if you have set
|
641
|
never304="true"
|
642
|
-->
|
643
|
<!--
|
644
|
<httpCaching never304="true" >
|
645
|
<cacheControl>max-age=30, public</cacheControl>
|
646
|
</httpCaching>
|
647
|
-->
|
648
|
<!-- To enable Solr to respond with automatically generated HTTP
|
649
|
Caching headers, and to response to Cache Validation requests
|
650
|
correctly, set the value of never304="false"
|
651
|
|
652
|
This will cause Solr to generate Last-Modified and ETag
|
653
|
headers based on the properties of the Index.
|
654
|
|
655
|
The following options can also be specified to affect the
|
656
|
values of these headers...
|
657
|
|
658
|
lastModFrom - the default value is "openTime" which means the
|
659
|
Last-Modified value (and validation against If-Modified-Since
|
660
|
requests) will all be relative to when the current Searcher
|
661
|
was opened. You can change it to lastModFrom="dirLastMod" if
|
662
|
you want the value to exactly correspond to when the physical
|
663
|
index was last modified.
|
664
|
|
665
|
etagSeed="..." is an option you can change to force the ETag
|
666
|
header (and validation against If-None-Match requests) to be
|
667
|
different even if the index has not changed (ie: when making
|
668
|
significant changes to your config file)
|
669
|
|
670
|
(lastModifiedFrom and etagSeed are both ignored if you use
|
671
|
the never304="true" option)
|
672
|
-->
|
673
|
<!--
|
674
|
<httpCaching lastModifiedFrom="openTime"
|
675
|
etagSeed="Solr">
|
676
|
<cacheControl>max-age=30, public</cacheControl>
|
677
|
</httpCaching>
|
678
|
-->
|
679
|
</requestDispatcher>
|
680
|
|
681
|
<!-- Request Handlers
|
682
|
|
683
|
http://wiki.apache.org/solr/SolrRequestHandler
|
684
|
|
685
|
incoming queries will be dispatched to the correct handler
|
686
|
based on the path or the qt (query type) param.
|
687
|
|
688
|
Names starting with a '/' are accessed with the a path equal to
|
689
|
the registered name. Names without a leading '/' are accessed
|
690
|
with: http://host/app/[core/]select?qt=name
|
691
|
|
692
|
If a /select request is processed with out a qt param
|
693
|
specified, the requestHandler that declares default="true" will
|
694
|
be used.
|
695
|
|
696
|
If a Request Handler is declared with startup="lazy", then it will
|
697
|
not be initialized until the first request that uses it.
|
698
|
|
699
|
-->
|
700
|
<!-- SearchHandler
|
701
|
|
702
|
http://wiki.apache.org/solr/SearchHandler
|
703
|
|
704
|
For processing Search Queries, the primary Request Handler
|
705
|
provided with Solr is "SearchHandler" It delegates to a sequent
|
706
|
of SearchComponents (see below) and supports distributed
|
707
|
queries across multiple shards
|
708
|
-->
|
709
|
<requestHandler name="search" class="solr.SearchHandler" default="true">
|
710
|
<!-- default values for query parameters can be specified, these
|
711
|
will be overridden by parameters in the request
|
712
|
-->
|
713
|
<lst name="defaults">
|
714
|
<str name="echoParams">explicit</str>
|
715
|
<int name="rows">10</int>
|
716
|
</lst>
|
717
|
<!-- In addition to defaults, "appends" params can be specified
|
718
|
to identify values which should be appended to the list of
|
719
|
multi-val params from the query (or the existing "defaults").
|
720
|
-->
|
721
|
<!-- In this example, the param "fq=instock:true" would be appended to
|
722
|
any query time fq params the user may specify, as a mechanism for
|
723
|
partitioning the index, independent of any user selected filtering
|
724
|
that may also be desired (perhaps as a result of faceted searching).
|
725
|
|
726
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
727
|
"appends" values from being used, so don't use this mechanism
|
728
|
unless you are sure you always want it.
|
729
|
-->
|
730
|
<!--
|
731
|
<lst name="appends">
|
732
|
<str name="fq">inStock:true</str>
|
733
|
</lst>
|
734
|
-->
|
735
|
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
736
|
the options available to Solr clients. Any params values
|
737
|
specified here are used regardless of what values may be specified
|
738
|
in either the query, the "defaults", or the "appends" params.
|
739
|
|
740
|
In this example, the facet.field and facet.query params would
|
741
|
be fixed, limiting the facets clients can use. Faceting is
|
742
|
not turned on by default - but if the client does specify
|
743
|
facet=true in the request, these are the only facets they
|
744
|
will be able to see counts for; regardless of what other
|
745
|
facet.field or facet.query params they may specify.
|
746
|
|
747
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
748
|
"invariants" values from being used, so don't use this mechanism
|
749
|
unless you are sure you always want it.
|
750
|
-->
|
751
|
<!--
|
752
|
<lst name="invariants">
|
753
|
<str name="facet.field">cat</str>
|
754
|
<str name="facet.field">manu_exact</str>
|
755
|
<str name="facet.query">price:[* TO 500]</str>
|
756
|
<str name="facet.query">price:[500 TO *]</str>
|
757
|
</lst>
|
758
|
-->
|
759
|
<!-- If the default list of SearchComponents is not desired, that
|
760
|
list can either be overridden completely, or components can be
|
761
|
prepended or appended to the default list. (see below)
|
762
|
-->
|
763
|
<!--
|
764
|
<arr name="components">
|
765
|
<str>nameOfCustomComponent1</str>
|
766
|
<str>nameOfCustomComponent2</str>
|
767
|
</arr>
|
768
|
-->
|
769
|
</requestHandler>
|
770
|
|
771
|
<!-- A Robust Example
|
772
|
|
773
|
This example SearchHandler declaration shows off usage of the
|
774
|
SearchHandler with many defaults declared
|
775
|
|
776
|
Note that multiple instances of the same Request Handler
|
777
|
(SearchHandler) can be registered multiple times with different
|
778
|
names (and different init parameters)
|
779
|
-->
|
780
|
<requestHandler name="/browse" class="solr.SearchHandler">
|
781
|
<lst name="defaults">
|
782
|
<str name="echoParams">explicit</str>
|
783
|
|
784
|
<!-- VelocityResponseWriter settings -->
|
785
|
<str name="wt">velocity</str>
|
786
|
|
787
|
<str name="v.template">browse</str>
|
788
|
<str name="v.layout">layout</str>
|
789
|
<str name="title">Solritas</str>
|
790
|
|
791
|
<str name="defType">edismax</str>
|
792
|
<str name="q.alt">*:*</str>
|
793
|
<str name="rows">10</str>
|
794
|
<str name="fl">*,score</str>
|
795
|
<str name="mlt.qf">
|
796
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
797
|
</str>
|
798
|
<str name="mlt.fl">text,features,name,sku,id,manu,cat</str>
|
799
|
<int name="mlt.count">3</int>
|
800
|
|
801
|
<str name="qf">
|
802
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
803
|
</str>
|
804
|
|
805
|
<str name="facet">on</str>
|
806
|
<str name="facet.field">cat</str>
|
807
|
<str name="facet.field">manu_exact</str>
|
808
|
<str name="facet.query">ipod</str>
|
809
|
<str name="facet.query">GB</str>
|
810
|
<str name="facet.mincount">1</str>
|
811
|
<str name="facet.pivot">cat,inStock</str>
|
812
|
<str name="facet.range.other">after</str>
|
813
|
<str name="facet.range">price</str>
|
814
|
<int name="f.price.facet.range.start">0</int>
|
815
|
<int name="f.price.facet.range.end">600</int>
|
816
|
<int name="f.price.facet.range.gap">50</int>
|
817
|
<str name="facet.range">popularity</str>
|
818
|
<int name="f.popularity.facet.range.start">0</int>
|
819
|
<int name="f.popularity.facet.range.end">10</int>
|
820
|
<int name="f.popularity.facet.range.gap">3</int>
|
821
|
<str name="facet.range">manufacturedate_dt</str>
|
822
|
<str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
|
823
|
<str name="f.manufacturedate_dt.facet.range.end">NOW</str>
|
824
|
<str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
|
825
|
<str name="f.manufacturedate_dt.facet.range.other">before</str>
|
826
|
<str name="f.manufacturedate_dt.facet.range.other">after</str>
|
827
|
|
828
|
|
829
|
<!-- Highlighting defaults -->
|
830
|
<str name="hl">on</str>
|
831
|
<str name="hl.fl">text features name</str>
|
832
|
<str name="f.name.hl.fragsize">0</str>
|
833
|
<str name="f.name.hl.alternateField">name</str>
|
834
|
</lst>
|
835
|
<arr name="last-components">
|
836
|
<str>spellcheck</str>
|
837
|
</arr>
|
838
|
<!--
|
839
|
<str name="url-scheme">httpx</str>
|
840
|
-->
|
841
|
</requestHandler>
|
842
|
|
843
|
<!-- XML Update Request Handler.
|
844
|
|
845
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
846
|
|
847
|
The canonical Request Handler for Modifying the Index through
|
848
|
commands specified using XML.
|
849
|
|
850
|
Note: Since solr1.1 requestHandlers requires a valid content
|
851
|
type header if posted in the body. For example, curl now
|
852
|
requires: -H 'Content-type:text/xml; charset=utf-8'
|
853
|
-->
|
854
|
<requestHandler name="/update"
|
855
|
class="solr.XmlUpdateRequestHandler">
|
856
|
<!-- See below for information on defining
|
857
|
updateRequestProcessorChains that can be used by name
|
858
|
on each Update Request
|
859
|
-->
|
860
|
<!--
|
861
|
<lst name="defaults">
|
862
|
<str name="update.chain">dedupe</str>
|
863
|
</lst>
|
864
|
-->
|
865
|
</requestHandler>
|
866
|
<!-- Binary Update Request Handler
|
867
|
http://wiki.apache.org/solr/javabin
|
868
|
-->
|
869
|
<requestHandler name="/update/javabin"
|
870
|
class="solr.BinaryUpdateRequestHandler" />
|
871
|
|
872
|
<!-- CSV Update Request Handler
|
873
|
http://wiki.apache.org/solr/UpdateCSV
|
874
|
-->
|
875
|
<requestHandler name="/update/csv"
|
876
|
class="solr.CSVRequestHandler"
|
877
|
startup="lazy" />
|
878
|
|
879
|
<!-- JSON Update Request Handler
|
880
|
http://wiki.apache.org/solr/UpdateJSON
|
881
|
-->
|
882
|
<requestHandler name="/update/json"
|
883
|
class="solr.JsonUpdateRequestHandler"
|
884
|
startup="lazy" />
|
885
|
|
886
|
<!-- Solr Cell Update Request Handler
|
887
|
|
888
|
http://wiki.apache.org/solr/ExtractingRequestHandler
|
889
|
|
890
|
-->
|
891
|
<requestHandler name="/update/extract"
|
892
|
startup="lazy"
|
893
|
class="solr.extraction.ExtractingRequestHandler" >
|
894
|
<lst name="defaults">
|
895
|
<!-- All the main content goes into "text"... if you need to return
|
896
|
the extracted text or do highlighting, use a stored field. -->
|
897
|
<str name="fmap.content">text</str>
|
898
|
<str name="lowernames">true</str>
|
899
|
<str name="uprefix">ignored_</str>
|
900
|
|
901
|
<!-- capture link hrefs but ignore div attributes -->
|
902
|
<str name="captureAttr">true</str>
|
903
|
<str name="fmap.a">links</str>
|
904
|
<str name="fmap.div">ignored_</str>
|
905
|
</lst>
|
906
|
</requestHandler>
|
907
|
|
908
|
<!-- XSLT Update Request Handler
|
909
|
Transforms incoming XML with stylesheet identified by tr=
|
910
|
-->
|
911
|
<requestHandler name="/update/xslt"
|
912
|
startup="lazy"
|
913
|
class="solr.XsltUpdateRequestHandler"/>
|
914
|
|
915
|
<!-- Field Analysis Request Handler
|
916
|
|
917
|
RequestHandler that provides much the same functionality as
|
918
|
analysis.jsp. Provides the ability to specify multiple field
|
919
|
types and field names in the same request and outputs
|
920
|
index-time and query-time analysis for each of them.
|
921
|
|
922
|
Request parameters are:
|
923
|
analysis.fieldname - field name whose analyzers are to be used
|
924
|
|
925
|
analysis.fieldtype - field type whose analyzers are to be used
|
926
|
analysis.fieldvalue - text for index-time analysis
|
927
|
q (or analysis.q) - text for query time analysis
|
928
|
analysis.showmatch (true|false) - When set to true and when
|
929
|
query analysis is performed, the produced tokens of the
|
930
|
field value analysis will be marked as "matched" for every
|
931
|
token that is produces by the query analysis
|
932
|
-->
|
933
|
<requestHandler name="/analysis/field"
|
934
|
startup="lazy"
|
935
|
class="solr.FieldAnalysisRequestHandler" />
|
936
|
|
937
|
|
938
|
<!-- Document Analysis Handler
|
939
|
|
940
|
http://wiki.apache.org/solr/AnalysisRequestHandler
|
941
|
|
942
|
An analysis handler that provides a breakdown of the analysis
|
943
|
process of provided docuemnts. This handler expects a (single)
|
944
|
content stream with the following format:
|
945
|
|
946
|
<docs>
|
947
|
<doc>
|
948
|
<field name="id">1</field>
|
949
|
<field name="name">The Name</field>
|
950
|
<field name="text">The Text Value</field>
|
951
|
</doc>
|
952
|
<doc>...</doc>
|
953
|
<doc>...</doc>
|
954
|
...
|
955
|
</docs>
|
956
|
|
957
|
Note: Each document must contain a field which serves as the
|
958
|
unique key. This key is used in the returned response to associate
|
959
|
an analysis breakdown to the analyzed document.
|
960
|
|
961
|
Like the FieldAnalysisRequestHandler, this handler also supports
|
962
|
query analysis by sending either an "analysis.query" or "q"
|
963
|
request parameter that holds the query text to be analyzed. It
|
964
|
also supports the "analysis.showmatch" parameter which when set to
|
965
|
true, all field tokens that match the query tokens will be marked
|
966
|
as a "match".
|
967
|
-->
|
968
|
<requestHandler name="/analysis/document"
|
969
|
class="solr.DocumentAnalysisRequestHandler"
|
970
|
startup="lazy" />
|
971
|
|
972
|
<!-- Admin Handlers
|
973
|
|
974
|
Admin Handlers - This will register all the standard admin
|
975
|
RequestHandlers.
|
976
|
-->
|
977
|
<requestHandler name="/admin/"
|
978
|
class="solr.admin.AdminHandlers" />
|
979
|
<!-- This single handler is equivalent to the following... -->
|
980
|
<!--
|
981
|
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
|
982
|
<requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
|
983
|
<requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
|
984
|
<requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
|
985
|
<requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
|
986
|
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
987
|
-->
|
988
|
<!-- If you wish to hide files under ${solr.home}/conf, explicitly
|
989
|
register the ShowFileRequestHandler using:
|
990
|
-->
|
991
|
<!--
|
992
|
<requestHandler name="/admin/file"
|
993
|
class="solr.admin.ShowFileRequestHandler" >
|
994
|
<lst name="invariants">
|
995
|
<str name="hidden">synonyms.txt</str>
|
996
|
<str name="hidden">anotherfile.txt</str>
|
997
|
</lst>
|
998
|
</requestHandler>
|
999
|
-->
|
1000
|
|
1001
|
<!-- ping/healthcheck -->
|
1002
|
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
1003
|
<lst name="invariants">
|
1004
|
<str name="qt">search</str>
|
1005
|
<str name="q">solrpingquery</str>
|
1006
|
</lst>
|
1007
|
<lst name="defaults">
|
1008
|
<str name="echoParams">all</str>
|
1009
|
</lst>
|
1010
|
</requestHandler>
|
1011
|
|
1012
|
<!-- Echo the request contents back to the client -->
|
1013
|
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
1014
|
<lst name="defaults">
|
1015
|
<str name="echoParams">explicit</str>
|
1016
|
<str name="echoHandler">true</str>
|
1017
|
</lst>
|
1018
|
</requestHandler>
|
1019
|
|
1020
|
<!-- Solr Replication
|
1021
|
|
1022
|
The SolrReplicationHandler supports replicating indexes from a
|
1023
|
"master" used for indexing and "salves" used for queries.
|
1024
|
|
1025
|
http://wiki.apache.org/solr/SolrReplication
|
1026
|
|
1027
|
In the example below, remove the <lst name="master"> section if
|
1028
|
this is just a slave and remove the <lst name="slave"> section
|
1029
|
if this is just a master.
|
1030
|
-->
|
1031
|
<!--
|
1032
|
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
1033
|
<lst name="master">
|
1034
|
<str name="replicateAfter">commit</str>
|
1035
|
<str name="replicateAfter">startup</str>
|
1036
|
<str name="confFiles">schema.xml,stopwords.txt</str>
|
1037
|
</lst>
|
1038
|
<lst name="slave">
|
1039
|
<str name="masterUrl">http://localhost:8983/solr/replication</str>
|
1040
|
<str name="pollInterval">00:00:60</str>
|
1041
|
</lst>
|
1042
|
</requestHandler>
|
1043
|
-->
|
1044
|
|
1045
|
<!-- Search Components
|
1046
|
|
1047
|
Search components are registered to SolrCore and used by
|
1048
|
instances of SearchHandler (which can access them by name)
|
1049
|
|
1050
|
By default, the following components are available:
|
1051
|
|
1052
|
<searchComponent name="query" class="solr.QueryComponent" />
|
1053
|
<searchComponent name="facet" class="solr.FacetComponent" />
|
1054
|
<searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
|
1055
|
<searchComponent name="highlight" class="solr.HighlightComponent" />
|
1056
|
<searchComponent name="stats" class="solr.StatsComponent" />
|
1057
|
<searchComponent name="debug" class="solr.DebugComponent" />
|
1058
|
|
1059
|
Default configuration in a requestHandler would look like:
|
1060
|
|
1061
|
<arr name="components">
|
1062
|
<str>query</str>
|
1063
|
<str>facet</str>
|
1064
|
<str>mlt</str>
|
1065
|
<str>highlight</str>
|
1066
|
<str>stats</str>
|
1067
|
<str>debug</str>
|
1068
|
</arr>
|
1069
|
|
1070
|
If you register a searchComponent to one of the standard names,
|
1071
|
that will be used instead of the default.
|
1072
|
|
1073
|
To insert components before or after the 'standard' components, use:
|
1074
|
|
1075
|
<arr name="first-components">
|
1076
|
<str>myFirstComponentName</str>
|
1077
|
</arr>
|
1078
|
|
1079
|
<arr name="last-components">
|
1080
|
<str>myLastComponentName</str>
|
1081
|
</arr>
|
1082
|
|
1083
|
NOTE: The component registered with the name "debug" will
|
1084
|
always be executed after the "last-components"
|
1085
|
|
1086
|
-->
|
1087
|
|
1088
|
<!-- Spell Check
|
1089
|
|
1090
|
The spell check component can return a list of alternative spelling
|
1091
|
suggestions.
|
1092
|
|
1093
|
http://wiki.apache.org/solr/SpellCheckComponent
|
1094
|
-->
|
1095
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
1096
|
|
1097
|
<str name="queryAnalyzerFieldType">textSpell</str>
|
1098
|
|
1099
|
<!-- Multiple "Spell Checkers" can be declared and used by this
|
1100
|
component
|
1101
|
-->
|
1102
|
|
1103
|
<!-- a spellchecker built from a field of the main index, and
|
1104
|
written to disk
|
1105
|
-->
|
1106
|
<lst name="spellchecker">
|
1107
|
<str name="name">default</str>
|
1108
|
<str name="field">name</str>
|
1109
|
<str name="spellcheckIndexDir">spellchecker</str>
|
1110
|
<!-- uncomment this to require terms to occur in 1% of the documents in order to be included in the dictionary
|
1111
|
<float name="thresholdTokenFrequency">.01</float>
|
1112
|
-->
|
1113
|
</lst>
|
1114
|
|
1115
|
<!-- a spellchecker that uses a different distance measure -->
|
1116
|
<!--
|
1117
|
<lst name="spellchecker">
|
1118
|
<str name="name">jarowinkler</str>
|
1119
|
<str name="field">spell</str>
|
1120
|
<str name="distanceMeasure">
|
1121
|
org.apache.lucene.search.spell.JaroWinklerDistance
|
1122
|
</str>
|
1123
|
<str name="spellcheckIndexDir">spellcheckerJaro</str>
|
1124
|
</lst>
|
1125
|
-->
|
1126
|
|
1127
|
<!-- a spellchecker that use an alternate comparator
|
1128
|
|
1129
|
comparatorClass be one of:
|
1130
|
1. score (default)
|
1131
|
2. freq (Frequency first, then score)
|
1132
|
3. A fully qualified class name
|
1133
|
-->
|
1134
|
<!--
|
1135
|
<lst name="spellchecker">
|
1136
|
<str name="name">freq</str>
|
1137
|
<str name="field">lowerfilt</str>
|
1138
|
<str name="spellcheckIndexDir">spellcheckerFreq</str>
|
1139
|
<str name="comparatorClass">freq</str>
|
1140
|
<str name="buildOnCommit">true</str>
|
1141
|
-->
|
1142
|
|
1143
|
<!-- A spellchecker that reads the list of words from a file -->
|
1144
|
<!--
|
1145
|
<lst name="spellchecker">
|
1146
|
<str name="classname">solr.FileBasedSpellChecker</str>
|
1147
|
<str name="name">file</str>
|
1148
|
<str name="sourceLocation">spellings.txt</str>
|
1149
|
<str name="characterEncoding">UTF-8</str>
|
1150
|
<str name="spellcheckIndexDir">spellcheckerFile</str>
|
1151
|
</lst>
|
1152
|
-->
|
1153
|
</searchComponent>
|
1154
|
|
1155
|
<!-- A request handler for demonstrating the spellcheck component.
|
1156
|
|
1157
|
NOTE: This is purely as an example. The whole purpose of the
|
1158
|
SpellCheckComponent is to hook it into the request handler that
|
1159
|
handles your normal user queries so that a separate request is
|
1160
|
not needed to get suggestions.
|
1161
|
|
1162
|
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
|
1163
|
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
1164
|
|
1165
|
See http://wiki.apache.org/solr/SpellCheckComponent for details
|
1166
|
on the request parameters.
|
1167
|
-->
|
1168
|
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
|
1169
|
<lst name="defaults">
|
1170
|
<str name="spellcheck.onlyMorePopular">false</str>
|
1171
|
<str name="spellcheck.extendedResults">false</str>
|
1172
|
<str name="spellcheck.count">1</str>
|
1173
|
</lst>
|
1174
|
<arr name="last-components">
|
1175
|
<str>spellcheck</str>
|
1176
|
</arr>
|
1177
|
</requestHandler>
|
1178
|
|
1179
|
<!-- Term Vector Component
|
1180
|
|
1181
|
http://wiki.apache.org/solr/TermVectorComponent
|
1182
|
-->
|
1183
|
<searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
|
1184
|
|
1185
|
<!-- A request handler for demonstrating the term vector component
|
1186
|
|
1187
|
This is purely as an example.
|
1188
|
|
1189
|
In reality you will likely want to add the component to your
|
1190
|
already specified request handlers.
|
1191
|
-->
|
1192
|
<requestHandler name="tvrh" class="solr.SearchHandler" startup="lazy">
|
1193
|
<lst name="defaults">
|
1194
|
<bool name="tv">true</bool>
|
1195
|
</lst>
|
1196
|
<arr name="last-components">
|
1197
|
<str>tvComponent</str>
|
1198
|
</arr>
|
1199
|
</requestHandler>
|
1200
|
|
1201
|
<!-- Clustering Component
|
1202
|
|
1203
|
http://wiki.apache.org/solr/ClusteringComponent
|
1204
|
|
1205
|
This relies on third party jars which are notincluded in the
|
1206
|
release. To use this component (and the "/clustering" handler)
|
1207
|
Those jars will need to be downloaded, and you'll need to set
|
1208
|
the solr.cluster.enabled system property when running solr...
|
1209
|
|
1210
|
java -Dsolr.clustering.enabled=true -jar start.jar
|
1211
|
-->
|
1212
|
<searchComponent name="clustering"
|
1213
|
enable="${solr.clustering.enabled:false}"
|
1214
|
class="solr.clustering.ClusteringComponent" >
|
1215
|
<!-- Declare an engine -->
|
1216
|
<lst name="engine">
|
1217
|
<!-- The name, only one can be named "default" -->
|
1218
|
<str name="name">default</str>
|
1219
|
|
1220
|
<!-- Class name of Carrot2 clustering algorithm.
|
1221
|
|
1222
|
Currently available algorithms are:
|
1223
|
|
1224
|
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
1225
|
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
1226
|
* org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
1227
|
|
1228
|
See http://project.carrot2.org/algorithms.html for the
|
1229
|
algorithm's characteristics.
|
1230
|
-->
|
1231
|
<str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
|
1232
|
|
1233
|
<!-- Overriding values for Carrot2 default algorithm attributes.
|
1234
|
|
1235
|
For a description of all available attributes, see:
|
1236
|
http://download.carrot2.org/stable/manual/#chapter.components.
|
1237
|
Use attribute key as name attribute of str elements
|
1238
|
below. These can be further overridden for individual
|
1239
|
requests by specifying attribute key as request parameter
|
1240
|
name and attribute value as parameter value.
|
1241
|
-->
|
1242
|
<str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
|
1243
|
|
1244
|
<!-- Location of Carrot2 lexical resources.
|
1245
|
|
1246
|
A directory from which to load Carrot2-specific stop words
|
1247
|
and stop labels. Absolute or relative to Solr config directory.
|
1248
|
If a specific resource (e.g. stopwords.en) is present in the
|
1249
|
specified dir, it will completely override the corresponding
|
1250
|
default one that ships with Carrot2.
|
1251
|
|
1252
|
For an overview of Carrot2 lexical resources, see:
|
1253
|
http://download.carrot2.org/head/manual/#chapter.lexical-resources
|
1254
|
-->
|
1255
|
<str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
|
1256
|
|
1257
|
<!-- The language to assume for the documents.
|
1258
|
|
1259
|
For a list of allowed values, see:
|
1260
|
http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
|
1261
|
-->
|
1262
|
<str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
|
1263
|
</lst>
|
1264
|
<lst name="engine">
|
1265
|
<str name="name">stc</str>
|
1266
|
<str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
|
1267
|
</lst>
|
1268
|
</searchComponent>
|
1269
|
|
1270
|
<!-- A request handler for demonstrating the clustering component
|
1271
|
|
1272
|
This is purely as an example.
|
1273
|
|
1274
|
In reality you will likely want to add the component to your
|
1275
|
already specified request handlers.
|
1276
|
-->
|
1277
|
<requestHandler name="/clustering"
|
1278
|
startup="lazy"
|
1279
|
enable="${solr.clustering.enabled:false}"
|
1280
|
class="solr.SearchHandler">
|
1281
|
<lst name="defaults">
|
1282
|
<bool name="clustering">true</bool>
|
1283
|
<str name="clustering.engine">default</str>
|
1284
|
<bool name="clustering.results">true</bool>
|
1285
|
<!-- The title field -->
|
1286
|
<str name="carrot.title">name</str>
|
1287
|
<str name="carrot.url">id</str>
|
1288
|
<!-- The field to cluster on -->
|
1289
|
<str name="carrot.snippet">features</str>
|
1290
|
<!-- produce summaries -->
|
1291
|
<bool name="carrot.produceSummary">true</bool>
|
1292
|
<!-- the maximum number of labels per cluster -->
|
1293
|
<!--<int name="carrot.numDescriptions">5</int>-->
|
1294
|
<!-- produce sub clusters -->
|
1295
|
<bool name="carrot.outputSubClusters">false</bool>
|
1296
|
|
1297
|
<str name="defType">edismax</str>
|
1298
|
<str name="qf">
|
1299
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
1300
|
</str>
|
1301
|
<str name="q.alt">*:*</str>
|
1302
|
<str name="rows">10</str>
|
1303
|
<str name="fl">*,score</str>
|
1304
|
</lst>
|
1305
|
<arr name="last-components">
|
1306
|
<str>clustering</str>
|
1307
|
</arr>
|
1308
|
</requestHandler>
|
1309
|
|
1310
|
<!-- Terms Component
|
1311
|
|
1312
|
http://wiki.apache.org/solr/TermsComponent
|
1313
|
|
1314
|
A component to return terms and document frequency of those
|
1315
|
terms
|
1316
|
-->
|
1317
|
<searchComponent name="terms" class="solr.TermsComponent"/>
|
1318
|
|
1319
|
<!-- A request handler for demonstrating the terms component -->
|
1320
|
<requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
|
1321
|
<lst name="defaults">
|
1322
|
<bool name="terms">true</bool>
|
1323
|
</lst>
|
1324
|
<arr name="components">
|
1325
|
<str>terms</str>
|
1326
|
</arr>
|
1327
|
</requestHandler>
|
1328
|
|
1329
|
|
1330
|
<!-- Query Elevation Component
|
1331
|
|
1332
|
http://wiki.apache.org/solr/QueryElevationComponent
|
1333
|
|
1334
|
a search component that enables you to configure the top
|
1335
|
results for a given query regardless of the normal lucene
|
1336
|
scoring.
|
1337
|
-->
|
1338
|
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
1339
|
<!-- pick a fieldType to analyze queries -->
|
1340
|
<str name="queryFieldType">string</str>
|
1341
|
<str name="config-file">elevate.xml</str>
|
1342
|
</searchComponent>
|
1343
|
|
1344
|
<!-- A request handler for demonstrating the elevator component -->
|
1345
|
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
1346
|
<lst name="defaults">
|
1347
|
<str name="echoParams">explicit</str>
|
1348
|
</lst>
|
1349
|
<arr name="last-components">
|
1350
|
<str>elevator</str>
|
1351
|
</arr>
|
1352
|
</requestHandler>
|
1353
|
|
1354
|
<!-- Highlighting Component
|
1355
|
|
1356
|
http://wiki.apache.org/solr/HighlightingParameters
|
1357
|
-->
|
1358
|
<searchComponent class="solr.HighlightComponent" name="highlight">
|
1359
|
<highlighting>
|
1360
|
<!-- Configure the standard fragmenter -->
|
1361
|
<!-- This could most likely be commented out in the "default" case -->
|
1362
|
<fragmenter name="gap"
|
1363
|
default="true"
|
1364
|
class="solr.highlight.GapFragmenter">
|
1365
|
<lst name="defaults">
|
1366
|
<int name="hl.fragsize">100</int>
|
1367
|
</lst>
|
1368
|
</fragmenter>
|
1369
|
|
1370
|
<!-- A regular-expression-based fragmenter
|
1371
|
(for sentence extraction)
|
1372
|
-->
|
1373
|
<fragmenter name="regex"
|
1374
|
class="solr.highlight.RegexFragmenter">
|
1375
|
<lst name="defaults">
|
1376
|
<!-- slightly smaller fragsizes work better because of slop -->
|
1377
|
<int name="hl.fragsize">70</int>
|
1378
|
<!-- allow 50% slop on fragment sizes -->
|
1379
|
<float name="hl.regex.slop">0.5</float>
|
1380
|
<!-- a basic sentence pattern -->
|
1381
|
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
1382
|
</lst>
|
1383
|
</fragmenter>
|
1384
|
|
1385
|
<!-- Configure the standard formatter -->
|
1386
|
<formatter name="html"
|
1387
|
default="true"
|
1388
|
class="solr.highlight.HtmlFormatter">
|
1389
|
<lst name="defaults">
|
1390
|
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
1391
|
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
1392
|
</lst>
|
1393
|
</formatter>
|
1394
|
|
1395
|
<!-- Configure the standard encoder -->
|
1396
|
<encoder name="html"
|
1397
|
class="solr.highlight.HtmlEncoder" />
|
1398
|
|
1399
|
<!-- Configure the standard fragListBuilder -->
|
1400
|
<fragListBuilder name="simple"
|
1401
|
default="true"
|
1402
|
class="solr.highlight.SimpleFragListBuilder"/>
|
1403
|
|
1404
|
<!-- Configure the single fragListBuilder -->
|
1405
|
<fragListBuilder name="single"
|
1406
|
class="solr.highlight.SingleFragListBuilder"/>
|
1407
|
|
1408
|
<!-- default tag FragmentsBuilder -->
|
1409
|
<fragmentsBuilder name="default"
|
1410
|
default="true"
|
1411
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
1412
|
<!--
|
1413
|
<lst name="defaults">
|
1414
|
<str name="hl.multiValuedSeparatorChar">/</str>
|
1415
|
</lst>
|
1416
|
-->
|
1417
|
</fragmentsBuilder>
|
1418
|
|
1419
|
<!-- multi-colored tag FragmentsBuilder -->
|
1420
|
<fragmentsBuilder name="colored"
|
1421
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
1422
|
<lst name="defaults">
|
1423
|
<str name="hl.tag.pre"><![CDATA[
|
1424
|
<b style="background:yellow">,<b style="background:lawgreen">,
|
1425
|
<b style="background:aquamarine">,<b style="background:magenta">,
|
1426
|
<b style="background:palegreen">,<b style="background:coral">,
|
1427
|
<b style="background:wheat">,<b style="background:khaki">,
|
1428
|
<b style="background:lime">,<b style="background:deepskyblue">]]></str>
|
1429
|
<str name="hl.tag.post"><![CDATA[</b>]]></str>
|
1430
|
</lst>
|
1431
|
</fragmentsBuilder>
|
1432
|
</highlighting>
|
1433
|
</searchComponent>
|
1434
|
|
1435
|
<!-- Update Processors
|
1436
|
|
1437
|
Chains of Update Processor Factories for dealing with Update
|
1438
|
Requests can be declared, and then used by name in Update
|
1439
|
Request Processors
|
1440
|
|
1441
|
http://wiki.apache.org/solr/UpdateRequestProcessor
|
1442
|
|
1443
|
-->
|
1444
|
<!-- Deduplication
|
1445
|
|
1446
|
An example dedup update processor that creates the "id" field
|
1447
|
on the fly based on the hash code of some other fields. This
|
1448
|
example has overwriteDupes set to false since we are using the
|
1449
|
id field as the signatureField and Solr will maintain
|
1450
|
uniqueness based on that anyway.
|
1451
|
|
1452
|
-->
|
1453
|
<!--
|
1454
|
<updateRequestProcessorChain name="dedupe">
|
1455
|
<processor class="solr.processor.SignatureUpdateProcessorFactory">
|
1456
|
<bool name="enabled">true</bool>
|
1457
|
<str name="signatureField">id</str>
|
1458
|
<bool name="overwriteDupes">false</bool>
|
1459
|
<str name="fields">name,features,cat</str>
|
1460
|
<str name="signatureClass">solr.processor.Lookup3Signature</str>
|
1461
|
</processor>
|
1462
|
<processor class="solr.LogUpdateProcessorFactory" />
|
1463
|
<processor class="solr.RunUpdateProcessorFactory" />
|
1464
|
</updateRequestProcessorChain>
|
1465
|
-->
|
1466
|
|
1467
|
<!-- Response Writers
|
1468
|
|
1469
|
http://wiki.apache.org/solr/QueryResponseWriter
|
1470
|
|
1471
|
Request responses will be written using the writer specified by
|
1472
|
the 'wt' request parameter matching the name of a registered
|
1473
|
writer.
|
1474
|
|
1475
|
The "default" writer is the default and will be used if 'wt' is
|
1476
|
not specified in the request.
|
1477
|
-->
|
1478
|
<!-- The following response writers are implicitly configured unless
|
1479
|
overridden...
|
1480
|
-->
|
1481
|
<!--
|
1482
|
<queryResponseWriter name="xml"
|
1483
|
default="true"
|
1484
|
class="solr.XMLResponseWriter" />
|
1485
|
<queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
|
1486
|
<queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
|
1487
|
<queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
|
1488
|
<queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
|
1489
|
<queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
|
1490
|
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter"/>
|
1491
|
<queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
|
1492
|
-->
|
1493
|
<!--
|
1494
|
Custom response writers can be declared as needed...
|
1495
|
-->
|
1496
|
<!--
|
1497
|
<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
|
1498
|
-->
|
1499
|
|
1500
|
<!-- XSLT response writer transforms the XML output by any xslt file found
|
1501
|
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
1502
|
every xsltCacheLifetimeSeconds.
|
1503
|
-->
|
1504
|
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
|
1505
|
<int name="xsltCacheLifetimeSeconds">5</int>
|
1506
|
</queryResponseWriter>
|
1507
|
|
1508
|
<!-- Query Parsers
|
1509
|
|
1510
|
http://wiki.apache.org/solr/SolrQuerySyntax
|
1511
|
|
1512
|
Multiple QParserPlugins can be registered by name, and then
|
1513
|
used in either the "defType" param for the QueryComponent (used
|
1514
|
by SearchHandler) or in LocalParams
|
1515
|
-->
|
1516
|
<!-- example of registering a query parser -->
|
1517
|
<!--
|
1518
|
<queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
|
1519
|
-->
|
1520
|
|
1521
|
<!-- Function Parsers
|
1522
|
|
1523
|
http://wiki.apache.org/solr/FunctionQuery
|
1524
|
|
1525
|
Multiple ValueSourceParsers can be registered by name, and then
|
1526
|
used as function names when using the "func" QParser.
|
1527
|
-->
|
1528
|
<!-- example of registering a custom function parser -->
|
1529
|
<!--
|
1530
|
<valueSourceParser name="myfunc"
|
1531
|
class="com.mycompany.MyValueSourceParser" />
|
1532
|
-->
|
1533
|
|
1534
|
<!-- Legacy config for the admin interface -->
|
1535
|
<admin>
|
1536
|
<defaultQuery>*:*</defaultQuery>
|
1537
|
|
1538
|
<!-- configure a healthcheck file for servers behind a
|
1539
|
loadbalancer
|
1540
|
-->
|
1541
|
<!--
|
1542
|
<healthcheck type="file">server-enabled</healthcheck>
|
1543
|
-->
|
1544
|
</admin>
|
1545
|
|
1546
|
</config>
|