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
|
<!-- 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>$luceneMatchVersion$</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.
|
47
|
|
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.
|
53
|
|
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...
|
57
|
|
58
|
<lib dir="./lib" />
|
59
|
-->
|
60
|
|
61
|
<!-- A 'dir' option by itself adds any files found in the directory
|
62
|
to the classpath, this is useful for including all jars in a
|
63
|
directory.
|
64
|
|
65
|
When a 'regex' is specified in addition to a 'dir', only the
|
66
|
files in that directory which completely match the regex
|
67
|
(anchored on both ends) will be included.
|
68
|
|
69
|
If a 'dir' option (with or without a regex) is used and nothing
|
70
|
is found that matches, a warning will be logged.
|
71
|
|
72
|
The examples below can be used to load some solr-contribs along
|
73
|
with their external dependencies.
|
74
|
-->
|
75
|
<lib dir="$serverLibPath$" regex=".*\.jar" />
|
76
|
|
77
|
<!-- an exact 'path' can be used instead of a 'dir' to specify a
|
78
|
specific jar file. This will cause a serious error to be logged
|
79
|
if it can't be loaded.
|
80
|
-->
|
81
|
<!--
|
82
|
<lib path="../a-jar-that-does-not-exist.jar" />
|
83
|
-->
|
84
|
|
85
|
<!-- Data Directory
|
86
|
|
87
|
Used to specify an alternate directory to hold all index data
|
88
|
other than the default ./data under the Solr home. If
|
89
|
replication is in use, this should match the replication
|
90
|
configuration.
|
91
|
-->
|
92
|
<dataDir>solr/$indexDataDir$</dataDir>
|
93
|
|
94
|
|
95
|
<!-- The DirectoryFactory to use for indexes.
|
96
|
|
97
|
solr.StandardDirectoryFactory is filesystem
|
98
|
based and tries to pick the best implementation for the current
|
99
|
JVM and platform. solr.NRTCachingDirectoryFactory, the default,
|
100
|
wraps solr.StandardDirectoryFactory and caches small files in memory
|
101
|
for better NRT performance.
|
102
|
|
103
|
One can force a particular implementation via solr.MMapDirectoryFactory,
|
104
|
solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
|
105
|
|
106
|
solr.RAMDirectoryFactory is memory based, not
|
107
|
persistent, and doesn't work with replication.
|
108
|
-->
|
109
|
<directoryFactory name="DirectoryFactory"
|
110
|
class="\${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
|
111
|
|
112
|
|
113
|
<!-- These will be used if you are using the solr.HdfsDirectoryFactory,
|
114
|
otherwise they will be ignored. If you don't plan on using hdfs,
|
115
|
you can safely remove this section. -->
|
116
|
<!-- The root directory that collection data should be written to. -->
|
117
|
<str name="solr.hdfs.home">\${solr.hdfs.home:}</str>
|
118
|
<!-- The hadoop configuration files to use for the hdfs client. -->
|
119
|
<str name="solr.hdfs.confdir">\${solr.hdfs.confdir:}</str>
|
120
|
<!-- Enable/Disable the hdfs cache. -->
|
121
|
<str name="solr.hdfs.blockcache.enabled">\${solr.hdfs.blockcache.enabled:true}</str>
|
122
|
<!-- Enable/Disable using one global cache for all SolrCores.
|
123
|
The settings used will be from the first HdfsDirectoryFactory created. -->
|
124
|
<str name="solr.hdfs.blockcache.global">\${solr.hdfs.blockcache.global:true}</str>
|
125
|
|
126
|
</directoryFactory>
|
127
|
|
128
|
<!-- The CodecFactory for defining the format of the inverted index.
|
129
|
The default implementation is SchemaCodecFactory, which is the official Lucene
|
130
|
index format, but hooks into the schema to provide per-field customization of
|
131
|
the postings lists and per-document values in the fieldType element
|
132
|
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
|
133
|
are experimental, so if you choose to customize the index format, its a good
|
134
|
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
|
135
|
before upgrading to a newer version to avoid unnecessary reindexing.
|
136
|
-->
|
137
|
<codecFactory class="solr.SchemaCodecFactory"/>
|
138
|
|
139
|
<!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
|
140
|
|
141
|
<schemaFactory class="ManagedIndexSchemaFactory">
|
142
|
<bool name="mutable">true</bool>
|
143
|
<str name="managedSchemaResourceName">managed-schema</str>
|
144
|
</schemaFactory>
|
145
|
|
146
|
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
|
147
|
he resource named in 'managedSchemaResourceName', rather than from schema.xml.
|
148
|
Note that the managed schema resource CANNOT be named schema.xml. If the managed
|
149
|
schema does not exist, Solr will create it after reading schema.xml, then rename
|
150
|
'schema.xml' to 'schema.xml.bak'.
|
151
|
|
152
|
Do NOT hand edit the managed schema - external modifications will be ignored and
|
153
|
overwritten as a result of schema modification REST API calls.
|
154
|
|
155
|
When ManagedIndexSchemaFactory is specified with mutable = true, schema
|
156
|
modification REST API calls will be allowed; otherwise, error responses will be
|
157
|
sent back for these requests.
|
158
|
-->
|
159
|
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
160
|
|
161
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
162
|
Index Config - These settings control low-level behavior of indexing
|
163
|
Most example settings here show the default value, but are commented
|
164
|
out, to more easily see where customizations have been made.
|
165
|
|
166
|
Note: This replaces <indexDefaults> and <mainIndex> from older versions
|
167
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
168
|
<indexConfig>
|
169
|
<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
|
170
|
LimitTokenCountFilterFactory in your fieldType definition. E.g.
|
171
|
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
|
172
|
-->
|
173
|
<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
|
174
|
<!-- <writeLockTimeout>1000</writeLockTimeout> -->
|
175
|
|
176
|
<!-- The maximum number of simultaneous threads that may be
|
177
|
indexing documents at once in IndexWriter; if more than this
|
178
|
many threads arrive they will wait for others to finish.
|
179
|
Default in Solr/Lucene is 8. -->
|
180
|
<!-- <maxIndexingThreads>8</maxIndexingThreads> -->
|
181
|
|
182
|
<!-- Expert: Enabling compound file will use less files for the index,
|
183
|
using fewer file descriptors on the expense of performance decrease.
|
184
|
Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
|
185
|
<!-- <useCompoundFile>false</useCompoundFile> -->
|
186
|
|
187
|
<!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
|
188
|
indexing for buffering added documents and deletions before they are
|
189
|
flushed to the Directory.
|
190
|
maxBufferedDocs sets a limit on the number of documents buffered
|
191
|
before flushing.
|
192
|
If both ramBufferSizeMB and maxBufferedDocs is set, then
|
193
|
Lucene will flush based on whichever limit is hit first.
|
194
|
The default is 100 MB. -->
|
195
|
<!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
|
196
|
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
|
197
|
|
198
|
<!-- Expert: Merge Policy
|
199
|
The Merge Policy in Lucene controls how merging of segments is done.
|
200
|
The default since Solr/Lucene 3.3 is TieredMergePolicy.
|
201
|
The default since Lucene 2.3 was the LogByteSizeMergePolicy,
|
202
|
Even older versions of Lucene used LogDocMergePolicy.
|
203
|
-->
|
204
|
<!--
|
205
|
<mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
|
206
|
<int name="maxMergeAtOnce">10</int>
|
207
|
<int name="segmentsPerTier">10</int>
|
208
|
</mergePolicy>
|
209
|
-->
|
210
|
|
211
|
<!-- Merge Factor
|
212
|
The merge factor controls how many segments will get merged at a time.
|
213
|
For TieredMergePolicy, mergeFactor is a convenience parameter which
|
214
|
will set both MaxMergeAtOnce and SegmentsPerTier at once.
|
215
|
For LogByteSizeMergePolicy, mergeFactor decides how many new segments
|
216
|
will be allowed before they are merged into one.
|
217
|
Default is 10 for both merge policies.
|
218
|
-->
|
219
|
<!--
|
220
|
<mergeFactor>10</mergeFactor>
|
221
|
-->
|
222
|
|
223
|
<!-- Expert: Merge Scheduler
|
224
|
The Merge Scheduler in Lucene controls how merges are
|
225
|
performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
226
|
can perform merges in the background using separate threads.
|
227
|
The SerialMergeScheduler (Lucene 2.2 default) does not.
|
228
|
-->
|
229
|
<!--
|
230
|
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
231
|
-->
|
232
|
|
233
|
<!-- LockFactory
|
234
|
|
235
|
This option specifies which Lucene LockFactory implementation
|
236
|
to use.
|
237
|
|
238
|
single = SingleInstanceLockFactory - suggested for a
|
239
|
read-only index or when there is no possibility of
|
240
|
another process trying to modify the index.
|
241
|
native = NativeFSLockFactory - uses OS native file locking.
|
242
|
Do not use when multiple solr webapps in the same
|
243
|
JVM are attempting to share a single index.
|
244
|
simple = SimpleFSLockFactory - uses a plain file for locking
|
245
|
|
246
|
Defaults: 'native' is default for Solr3.6 and later, otherwise
|
247
|
'simple' is the default
|
248
|
|
249
|
More details on the nuances of each LockFactory...
|
250
|
http://wiki.apache.org/lucene-java/AvailableLockFactories
|
251
|
-->
|
252
|
<lockType>\${solr.lock.type:native}</lockType>
|
253
|
|
254
|
<!-- Unlock On Startup
|
255
|
|
256
|
If true, unlock any held write or commit locks on startup.
|
257
|
This defeats the locking mechanism that allows multiple
|
258
|
processes to safely access a lucene index, and should be used
|
259
|
with care. Default is "false".
|
260
|
|
261
|
This is not needed if lock type is 'single'
|
262
|
-->
|
263
|
<!--
|
264
|
<unlockOnStartup>false</unlockOnStartup>
|
265
|
-->
|
266
|
|
267
|
<!-- Expert: Controls how often Lucene loads terms into memory
|
268
|
Default is 128 and is likely good for most everyone.
|
269
|
-->
|
270
|
<!-- <termIndexInterval>128</termIndexInterval> -->
|
271
|
|
272
|
<!-- If true, IndexReaders will be opened/reopened from the IndexWriter
|
273
|
instead of from the Directory. Hosts in a master/slave setup
|
274
|
should have this set to false while those in a SolrCloud
|
275
|
cluster need to be set to true. Default: true
|
276
|
-->
|
277
|
<!--
|
278
|
<nrtMode>true</nrtMode>
|
279
|
-->
|
280
|
|
281
|
<!-- Commit Deletion Policy
|
282
|
Custom deletion policies can be specified here. The class must
|
283
|
implement org.apache.lucene.index.IndexDeletionPolicy.
|
284
|
|
285
|
The default Solr IndexDeletionPolicy implementation supports
|
286
|
deleting index commit points on number of commits, age of
|
287
|
commit point and optimized status.
|
288
|
|
289
|
The latest commit point should always be preserved regardless
|
290
|
of the criteria.
|
291
|
-->
|
292
|
<!--
|
293
|
<deletionPolicy class="solr.SolrDeletionPolicy">
|
294
|
-->
|
295
|
<!-- The number of commit points to be kept -->
|
296
|
<!-- <str name="maxCommitsToKeep">1</str> -->
|
297
|
<!-- The number of optimized commit points to be kept -->
|
298
|
<!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
|
299
|
<!--
|
300
|
Delete all commit points once they have reached the given age.
|
301
|
Supports DateMathParser syntax e.g.
|
302
|
-->
|
303
|
<!--
|
304
|
<str name="maxCommitAge">30MINUTES</str>
|
305
|
<str name="maxCommitAge">1DAY</str>
|
306
|
-->
|
307
|
<!--
|
308
|
</deletionPolicy>
|
309
|
-->
|
310
|
|
311
|
<!-- Lucene Infostream
|
312
|
|
313
|
To aid in advanced debugging, Lucene provides an "InfoStream"
|
314
|
of detailed information when indexing.
|
315
|
|
316
|
Setting the value to true will instruct the underlying Lucene
|
317
|
IndexWriter to write its info stream to solr's log. By default,
|
318
|
this is enabled here, and controlled through log4j.properties.
|
319
|
-->
|
320
|
<infoStream>true</infoStream>
|
321
|
|
322
|
<!--
|
323
|
Use true to enable this safety check, which can help
|
324
|
reduce the risk of propagating index corruption from older segments
|
325
|
into new ones, at the expense of slower merging.
|
326
|
-->
|
327
|
<checkIntegrityAtMerge>false</checkIntegrityAtMerge>
|
328
|
</indexConfig>
|
329
|
|
330
|
|
331
|
<!-- JMX
|
332
|
|
333
|
This example enables JMX if and only if an existing MBeanServer
|
334
|
is found, use this if you want to configure JMX through JVM
|
335
|
parameters. Remove this to disable exposing Solr configuration
|
336
|
and statistics to JMX.
|
337
|
|
338
|
For more details see http://wiki.apache.org/solr/SolrJmx
|
339
|
-->
|
340
|
<jmx />
|
341
|
<!-- If you want to connect to a particular server, specify the
|
342
|
agentId
|
343
|
-->
|
344
|
<!-- <jmx agentId="myAgent" /> -->
|
345
|
<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
|
346
|
<!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
|
347
|
-->
|
348
|
|
349
|
<!-- The default high-performance update handler -->
|
350
|
<updateHandler class="solr.DirectUpdateHandler2">
|
351
|
|
352
|
<!-- Enables a transaction log, used for real-time get, durability, and
|
353
|
and solr cloud replica recovery. The log can grow as big as
|
354
|
uncommitted changes to the index, so use of a hard autoCommit
|
355
|
is recommended (see below).
|
356
|
"dir" - the target directory for transaction logs, defaults to the
|
357
|
solr data directory. -->
|
358
|
<updateLog>
|
359
|
<str name="dir">\${solr.ulog.dir:}</str>
|
360
|
</updateLog>
|
361
|
|
362
|
<!-- AutoCommit
|
363
|
|
364
|
Perform a hard commit automatically under certain conditions.
|
365
|
Instead of enabling autoCommit, consider using "commitWithin"
|
366
|
when adding documents.
|
367
|
|
368
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
369
|
|
370
|
maxDocs - Maximum number of documents to add since the last
|
371
|
commit before automatically triggering a new commit.
|
372
|
|
373
|
maxTime - Maximum amount of time in ms that is allowed to pass
|
374
|
since a document was added before automatically
|
375
|
triggering a new commit.
|
376
|
openSearcher - if false, the commit causes recent index changes
|
377
|
to be flushed to stable storage, but does not cause a new
|
378
|
searcher to be opened to make those changes visible.
|
379
|
|
380
|
If the updateLog is enabled, then it's highly recommended to
|
381
|
have some sort of hard autoCommit to limit the log size.
|
382
|
-->
|
383
|
<autoCommit>
|
384
|
<maxTime>\${solr.autoCommit.maxTime:15000}</maxTime>
|
385
|
<openSearcher>false</openSearcher>
|
386
|
</autoCommit>
|
387
|
|
388
|
<!-- softAutoCommit is like autoCommit except it causes a
|
389
|
'soft' commit which only ensures that changes are visible
|
390
|
but does not ensure that data is synced to disk. This is
|
391
|
faster and more near-realtime friendly than a hard commit.
|
392
|
-->
|
393
|
|
394
|
<autoSoftCommit>
|
395
|
<maxTime>\${solr.autoSoftCommit.maxTime:-1}</maxTime>
|
396
|
</autoSoftCommit>
|
397
|
|
398
|
<!-- Update Related Event Listeners
|
399
|
|
400
|
Various IndexWriter related events can trigger Listeners to
|
401
|
take actions.
|
402
|
|
403
|
postCommit - fired after every commit or optimize command
|
404
|
postOptimize - fired after every optimize command
|
405
|
-->
|
406
|
<!-- The RunExecutableListener executes an external command from a
|
407
|
hook such as postCommit or postOptimize.
|
408
|
|
409
|
exe - the name of the executable to run
|
410
|
dir - dir to use as the current working directory. (default=".")
|
411
|
wait - the calling thread waits until the executable returns.
|
412
|
(default="true")
|
413
|
args - the arguments to pass to the program. (default is none)
|
414
|
env - environment variables to set. (default is none)
|
415
|
-->
|
416
|
<!-- This example shows how RunExecutableListener could be used
|
417
|
with the script based replication...
|
418
|
http://wiki.apache.org/solr/CollectionDistribution
|
419
|
-->
|
420
|
<!--
|
421
|
<listener event="postCommit" class="solr.RunExecutableListener">
|
422
|
<str name="exe">solr/bin/snapshooter</str>
|
423
|
<str name="dir">.</str>
|
424
|
<bool name="wait">true</bool>
|
425
|
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
426
|
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
427
|
</listener>
|
428
|
-->
|
429
|
|
430
|
</updateHandler>
|
431
|
|
432
|
<!-- IndexReaderFactory
|
433
|
|
434
|
Use the following format to specify a custom IndexReaderFactory,
|
435
|
which allows for alternate IndexReader implementations.
|
436
|
|
437
|
** Experimental Feature **
|
438
|
|
439
|
Please note - Using a custom IndexReaderFactory may prevent
|
440
|
certain other features from working. The API to
|
441
|
IndexReaderFactory may change without warning or may even be
|
442
|
removed from future releases if the problems cannot be
|
443
|
resolved.
|
444
|
|
445
|
|
446
|
** Features that may not work with custom IndexReaderFactory **
|
447
|
|
448
|
The ReplicationHandler assumes a disk-resident index. Using a
|
449
|
custom IndexReader implementation may cause incompatibility
|
450
|
with ReplicationHandler and may cause replication to not work
|
451
|
correctly. See SOLR-1366 for details.
|
452
|
|
453
|
-->
|
454
|
<!--
|
455
|
<indexReaderFactory name="IndexReaderFactory" class="package.class">
|
456
|
<str name="someArg">Some Value</str>
|
457
|
</indexReaderFactory >
|
458
|
-->
|
459
|
<!-- By explicitly declaring the Factory, the termIndexDivisor can
|
460
|
be specified.
|
461
|
-->
|
462
|
<!--
|
463
|
<indexReaderFactory name="IndexReaderFactory"
|
464
|
class="solr.StandardIndexReaderFactory">
|
465
|
<int name="setTermIndexDivisor">12</int>
|
466
|
</indexReaderFactory >
|
467
|
-->
|
468
|
|
469
|
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
470
|
Query section - these settings control query time things like caches
|
471
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
472
|
<query>
|
473
|
<!-- Max Boolean Clauses
|
474
|
|
475
|
Maximum number of clauses in each BooleanQuery, an exception
|
476
|
is thrown if exceeded.
|
477
|
|
478
|
** WARNING **
|
479
|
|
480
|
This option actually modifies a global Lucene property that
|
481
|
will affect all SolrCores. If multiple solrconfig.xml files
|
482
|
disagree on this property, the value at any given moment will
|
483
|
be based on the last SolrCore to be initialized.
|
484
|
|
485
|
-->
|
486
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
487
|
|
488
|
|
489
|
<!-- Solr Internal Query Caches
|
490
|
|
491
|
There are two implementations of cache available for Solr,
|
492
|
LRUCache, based on a synchronized LinkedHashMap, and
|
493
|
FastLRUCache, based on a ConcurrentHashMap.
|
494
|
|
495
|
FastLRUCache has faster gets and slower puts in single
|
496
|
threaded operation and thus is generally faster than LRUCache
|
497
|
when the hit ratio of the cache is high (> 75%), and may be
|
498
|
faster under other scenarios on multi-cpu systems.
|
499
|
-->
|
500
|
|
501
|
<!-- Filter Cache
|
502
|
|
503
|
Cache used by SolrIndexSearcher for filters (DocSets),
|
504
|
unordered sets of *all* documents that match a query. When a
|
505
|
new searcher is opened, its caches may be prepopulated or
|
506
|
"autowarmed" using data from caches in the old searcher.
|
507
|
autowarmCount is the number of items to prepopulate. For
|
508
|
LRUCache, the autowarmed items will be the most recently
|
509
|
accessed items.
|
510
|
|
511
|
Parameters:
|
512
|
class - the SolrCache implementation LRUCache or
|
513
|
(LRUCache or FastLRUCache)
|
514
|
size - the maximum number of entries in the cache
|
515
|
initialSize - the initial capacity (number of entries) of
|
516
|
the cache. (see java.util.HashMap)
|
517
|
autowarmCount - the number of entries to prepopulate from
|
518
|
and old cache.
|
519
|
-->
|
520
|
<filterCache class="solr.FastLRUCache"
|
521
|
size="$filterCacheSize$"
|
522
|
initialSize="$filterCacheInitialSize$"
|
523
|
autowarmCount="0"/>
|
524
|
|
525
|
<!-- Query Result Cache
|
526
|
|
527
|
Caches results of searches - ordered lists of document ids
|
528
|
(DocList) based on a query, a sort, and the range of documents requested.
|
529
|
-->
|
530
|
<queryResultCache class="solr.LRUCache"
|
531
|
size="$queryCacheSize$"
|
532
|
initialSize="$queryCacheInitialSize$"
|
533
|
autowarmCount="0"/>
|
534
|
|
535
|
<!-- Document Cache
|
536
|
|
537
|
Caches Lucene Document objects (the stored fields for each
|
538
|
document). Since Lucene internal document ids are transient,
|
539
|
this cache will not be autowarmed.
|
540
|
-->
|
541
|
<documentCache class="solr.LRUCache"
|
542
|
size="$documentCacheSize$"
|
543
|
initialSize="$documentCacheInitialSize$"
|
544
|
autowarmCount="0"/>
|
545
|
|
546
|
<!-- custom cache currently used by block join -->
|
547
|
<cache name="perSegFilter"
|
548
|
class="solr.search.LRUCache"
|
549
|
size="10"
|
550
|
initialSize="0"
|
551
|
autowarmCount="10"
|
552
|
regenerator="solr.NoOpRegenerator" />
|
553
|
|
554
|
<!-- Field Value Cache
|
555
|
|
556
|
Cache used to hold field values that are quickly accessible
|
557
|
by document id. The fieldValueCache is created by default
|
558
|
even if not configured here.
|
559
|
-->
|
560
|
<!--
|
561
|
<fieldValueCache class="solr.FastLRUCache"
|
562
|
size="512"
|
563
|
autowarmCount="128"
|
564
|
showItems="32" />
|
565
|
-->
|
566
|
|
567
|
<!-- Custom Cache
|
568
|
|
569
|
Example of a generic cache. These caches may be accessed by
|
570
|
name through SolrIndexSearcher.getCache(),cacheLookup(), and
|
571
|
cacheInsert(). The purpose is to enable easy caching of
|
572
|
user/application level data. The regenerator argument should
|
573
|
be specified as an implementation of solr.CacheRegenerator
|
574
|
if autowarming is desired.
|
575
|
-->
|
576
|
<!--
|
577
|
<cache name="myUserCache"
|
578
|
class="solr.LRUCache"
|
579
|
size="4096"
|
580
|
initialSize="1024"
|
581
|
autowarmCount="1024"
|
582
|
regenerator="com.mycompany.MyRegenerator"
|
583
|
/>
|
584
|
-->
|
585
|
|
586
|
|
587
|
<!-- Lazy Field Loading
|
588
|
|
589
|
If true, stored fields that are not requested will be loaded
|
590
|
lazily. This can result in a significant speed improvement
|
591
|
if the usual case is to not load all stored fields,
|
592
|
especially if the skipped fields are large compressed text
|
593
|
fields.
|
594
|
-->
|
595
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
596
|
|
597
|
<!-- Use Filter For Sorted Query
|
598
|
|
599
|
A possible optimization that attempts to use a filter to
|
600
|
satisfy a search. If the requested sort does not include
|
601
|
score, then the filterCache will be checked for a filter
|
602
|
matching the query. If found, the filter will be used as the
|
603
|
source of document ids, and then the sort will be applied to
|
604
|
that.
|
605
|
|
606
|
For most situations, this will not be useful unless you
|
607
|
frequently get the same search repeatedly with different sort
|
608
|
options, and none of them ever use "score"
|
609
|
-->
|
610
|
<!--
|
611
|
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
612
|
-->
|
613
|
|
614
|
<!-- Result Window Size
|
615
|
|
616
|
An optimization for use with the queryResultCache. When a search
|
617
|
is requested, a superset of the requested number of document ids
|
618
|
are collected. For example, if a search for a particular query
|
619
|
requests matching documents 10 through 19, and queryWindowSize is 50,
|
620
|
then documents 0 through 49 will be collected and cached. Any further
|
621
|
requests in that range can be satisfied via the cache.
|
622
|
-->
|
623
|
<queryResultWindowSize>$queryResultWindowSize$</queryResultWindowSize>
|
624
|
|
625
|
<!-- Maximum number of documents to cache for any entry in the
|
626
|
queryResultCache.
|
627
|
-->
|
628
|
<queryResultMaxDocsCached>$queryResultMaxDocCached$</queryResultMaxDocsCached>
|
629
|
|
630
|
<!-- Query Related Event Listeners
|
631
|
|
632
|
Various IndexSearcher related events can trigger Listeners to
|
633
|
take actions.
|
634
|
|
635
|
newSearcher - fired whenever a new searcher is being prepared
|
636
|
and there is a current searcher handling requests (aka
|
637
|
registered). It can be used to prime certain caches to
|
638
|
prevent long request times for certain requests.
|
639
|
|
640
|
firstSearcher - fired whenever a new searcher is being
|
641
|
prepared but there is no current registered searcher to handle
|
642
|
requests or to gain autowarming data from.
|
643
|
|
644
|
|
645
|
-->
|
646
|
<!-- QuerySenderListener takes an array of NamedList and executes a
|
647
|
local query request for each NamedList in sequence.
|
648
|
-->
|
649
|
<listener event="newSearcher" class="solr.QuerySenderListener">
|
650
|
<arr name="queries">
|
651
|
<!--
|
652
|
<lst><str name="q">solr</str><str name="sort">price asc</str></lst>
|
653
|
<lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
|
654
|
-->
|
655
|
</arr>
|
656
|
</listener>
|
657
|
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
658
|
<arr name="queries">
|
659
|
<lst>
|
660
|
<str name="q">static firstSearcher warming in solrconfig.xml</str>
|
661
|
</lst>
|
662
|
</arr>
|
663
|
</listener>
|
664
|
|
665
|
<!-- Use Cold Searcher
|
666
|
|
667
|
If a search request comes in and there is no current
|
668
|
registered searcher, then immediately register the still
|
669
|
warming searcher and use it. If "false" then all requests
|
670
|
will block until the first searcher is done warming.
|
671
|
-->
|
672
|
<useColdSearcher>false</useColdSearcher>
|
673
|
|
674
|
<!-- Max Warming Searchers
|
675
|
|
676
|
Maximum number of searchers that may be warming in the
|
677
|
background concurrently. An error is returned if this limit
|
678
|
is exceeded.
|
679
|
|
680
|
Recommend values of 1-2 for read-only slaves, higher for
|
681
|
masters w/o cache warming.
|
682
|
-->
|
683
|
<maxWarmingSearchers>2</maxWarmingSearchers>
|
684
|
|
685
|
</query>
|
686
|
|
687
|
|
688
|
<!-- Request Dispatcher
|
689
|
|
690
|
This section contains instructions for how the SolrDispatchFilter
|
691
|
should behave when processing requests for this SolrCore.
|
692
|
|
693
|
handleSelect is a legacy option that affects the behavior of requests
|
694
|
such as /select?qt=XXX
|
695
|
|
696
|
handleSelect="true" will cause the SolrDispatchFilter to process
|
697
|
the request and dispatch the query to a handler specified by the
|
698
|
"qt" param, assuming "/select" isn't already registered.
|
699
|
|
700
|
handleSelect="false" will cause the SolrDispatchFilter to
|
701
|
ignore "/select" requests, resulting in a 404 unless a handler
|
702
|
is explicitly registered with the name "/select"
|
703
|
|
704
|
handleSelect="true" is not recommended for new users, but is the default
|
705
|
for backwards compatibility
|
706
|
-->
|
707
|
<requestDispatcher handleSelect="false" >
|
708
|
<!-- Request Parsing
|
709
|
|
710
|
These settings indicate how Solr Requests may be parsed, and
|
711
|
what restrictions may be placed on the ContentStreams from
|
712
|
those requests
|
713
|
|
714
|
enableRemoteStreaming - enables use of the stream.file
|
715
|
and stream.url parameters for specifying remote streams.
|
716
|
|
717
|
multipartUploadLimitInKB - specifies the max size (in KiB) of
|
718
|
Multipart File Uploads that Solr will allow in a Request.
|
719
|
|
720
|
formdataUploadLimitInKB - specifies the max size (in KiB) of
|
721
|
form data (application/x-www-form-urlencoded) sent via
|
722
|
POST. You can use POST to pass request parameters not
|
723
|
fitting into the URL.
|
724
|
|
725
|
addHttpRequestToContext - if set to true, it will instruct
|
726
|
the requestParsers to include the original HttpServletRequest
|
727
|
object in the context map of the SolrQueryRequest under the
|
728
|
key "httpRequest". It will not be used by any of the existing
|
729
|
Solr components, but may be useful when developing custom
|
730
|
plugins.
|
731
|
|
732
|
*** WARNING ***
|
733
|
The settings below authorize Solr to fetch remote files, You
|
734
|
should make sure your system has some authentication before
|
735
|
using enableRemoteStreaming="true"
|
736
|
|
737
|
-->
|
738
|
<requestParsers enableRemoteStreaming="true"
|
739
|
multipartUploadLimitInKB="2048000"
|
740
|
formdataUploadLimitInKB="2048"
|
741
|
addHttpRequestToContext="false"/>
|
742
|
|
743
|
<!-- HTTP Caching
|
744
|
|
745
|
Set HTTP caching related parameters (for proxy caches and clients).
|
746
|
|
747
|
The options below instruct Solr not to output any HTTP Caching
|
748
|
related headers
|
749
|
-->
|
750
|
<httpCaching never304="true" />
|
751
|
<!-- If you include a <cacheControl> directive, it will be used to
|
752
|
generate a Cache-Control header (as well as an Expires header
|
753
|
if the value contains "max-age=")
|
754
|
|
755
|
By default, no Cache-Control header is generated.
|
756
|
|
757
|
You can use the <cacheControl> option even if you have set
|
758
|
never304="true"
|
759
|
-->
|
760
|
<!--
|
761
|
<httpCaching never304="true" >
|
762
|
<cacheControl>max-age=30, public</cacheControl>
|
763
|
</httpCaching>
|
764
|
-->
|
765
|
<!-- To enable Solr to respond with automatically generated HTTP
|
766
|
Caching headers, and to response to Cache Validation requests
|
767
|
correctly, set the value of never304="false"
|
768
|
|
769
|
This will cause Solr to generate Last-Modified and ETag
|
770
|
headers based on the properties of the Index.
|
771
|
|
772
|
The following options can also be specified to affect the
|
773
|
values of these headers...
|
774
|
|
775
|
lastModFrom - the default value is "openTime" which means the
|
776
|
Last-Modified value (and validation against If-Modified-Since
|
777
|
requests) will all be relative to when the current Searcher
|
778
|
was opened. You can change it to lastModFrom="dirLastMod" if
|
779
|
you want the value to exactly correspond to when the physical
|
780
|
index was last modified.
|
781
|
|
782
|
etagSeed="..." is an option you can change to force the ETag
|
783
|
header (and validation against If-None-Match requests) to be
|
784
|
different even if the index has not changed (ie: when making
|
785
|
significant changes to your config file)
|
786
|
|
787
|
(lastModifiedFrom and etagSeed are both ignored if you use
|
788
|
the never304="true" option)
|
789
|
-->
|
790
|
<!--
|
791
|
<httpCaching lastModifiedFrom="openTime"
|
792
|
etagSeed="Solr">
|
793
|
<cacheControl>max-age=30, public</cacheControl>
|
794
|
</httpCaching>
|
795
|
-->
|
796
|
</requestDispatcher>
|
797
|
|
798
|
<!-- Request Handlers
|
799
|
|
800
|
http://wiki.apache.org/solr/SolrRequestHandler
|
801
|
|
802
|
Incoming queries will be dispatched to a specific handler by name
|
803
|
based on the path specified in the request.
|
804
|
|
805
|
Legacy behavior: If the request path uses "/select" but no Request
|
806
|
Handler has that name, and if handleSelect="true" has been specified in
|
807
|
the requestDispatcher, then the Request Handler is dispatched based on
|
808
|
the qt parameter. Handlers without a leading '/' are accessed this way
|
809
|
like so: http://host/app/[core/]select?qt=name If no qt is
|
810
|
given, then the requestHandler that declares default="true" will be
|
811
|
used or the one named "standard".
|
812
|
|
813
|
If a Request Handler is declared with startup="lazy", then it will
|
814
|
not be initialized until the first request that uses it.
|
815
|
|
816
|
-->
|
817
|
<!-- SearchHandler
|
818
|
|
819
|
http://wiki.apache.org/solr/SearchHandler
|
820
|
|
821
|
For processing Search Queries, the primary Request Handler
|
822
|
provided with Solr is "SearchHandler" It delegates to a sequent
|
823
|
of SearchComponents (see below) and supports distributed
|
824
|
queries across multiple shards
|
825
|
-->
|
826
|
<requestHandler name="/select" class="solr.SearchHandler">
|
827
|
<!-- default values for query parameters can be specified, these
|
828
|
will be overridden by parameters in the request
|
829
|
-->
|
830
|
<lst name="defaults">
|
831
|
<str name="echoParams">explicit</str>
|
832
|
<int name="rows">10</int>
|
833
|
<str name="df">__all</str>
|
834
|
</lst>
|
835
|
<!-- In addition to defaults, "appends" params can be specified
|
836
|
to identify values which should be appended to the list of
|
837
|
multi-val params from the query (or the existing "defaults").
|
838
|
-->
|
839
|
<!-- In this example, the param "fq=instock:true" would be appended to
|
840
|
any query time fq params the user may specify, as a mechanism for
|
841
|
partitioning the index, independent of any user selected filtering
|
842
|
that may also be desired (perhaps as a result of faceted searching).
|
843
|
|
844
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
845
|
"appends" values from being used, so don't use this mechanism
|
846
|
unless you are sure you always want it.
|
847
|
-->
|
848
|
<!--
|
849
|
<lst name="appends">
|
850
|
<str name="fq">inStock:true</str>
|
851
|
</lst>
|
852
|
-->
|
853
|
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
854
|
the options available to Solr clients. Any params values
|
855
|
specified here are used regardless of what values may be specified
|
856
|
in either the query, the "defaults", or the "appends" params.
|
857
|
|
858
|
In this example, the facet.field and facet.query params would
|
859
|
be fixed, limiting the facets clients can use. Faceting is
|
860
|
not turned on by default - but if the client does specify
|
861
|
facet=true in the request, these are the only facets they
|
862
|
will be able to see counts for; regardless of what other
|
863
|
facet.field or facet.query params they may specify.
|
864
|
|
865
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
866
|
"invariants" values from being used, so don't use this mechanism
|
867
|
unless you are sure you always want it.
|
868
|
-->
|
869
|
<!--
|
870
|
<lst name="invariants">
|
871
|
<str name="facet.field">cat</str>
|
872
|
<str name="facet.field">manu_exact</str>
|
873
|
<str name="facet.query">price:[* TO 500]</str>
|
874
|
<str name="facet.query">price:[500 TO *]</str>
|
875
|
</lst>
|
876
|
-->
|
877
|
<!-- If the default list of SearchComponents is not desired, that
|
878
|
list can either be overridden completely, or components can be
|
879
|
prepended or appended to the default list. (see below)
|
880
|
-->
|
881
|
<!--
|
882
|
<arr name="components">
|
883
|
<str>nameOfCustomComponent1</str>
|
884
|
<str>nameOfCustomComponent2</str>
|
885
|
</arr>
|
886
|
-->
|
887
|
</requestHandler>
|
888
|
|
889
|
<!-- A request handler that returns indented JSON by default -->
|
890
|
<requestHandler name="/query" class="solr.SearchHandler">
|
891
|
<lst name="defaults">
|
892
|
<str name="echoParams">explicit</str>
|
893
|
<str name="wt">json</str>
|
894
|
<str name="indent">true</str>
|
895
|
<str name="df">__all</str>
|
896
|
</lst>
|
897
|
</requestHandler>
|
898
|
|
899
|
|
900
|
<!-- realtime get handler, guaranteed to return the latest stored fields of
|
901
|
any document, without the need to commit or open a new searcher. The
|
902
|
current implementation relies on the updateLog feature being enabled.
|
903
|
|
904
|
** WARNING **
|
905
|
Do NOT disable the realtime get handler at /get if you are using
|
906
|
SolrCloud otherwise any leader election will cause a full sync in ALL
|
907
|
replicas for the shard in question. Similarly, a replica recovery will
|
908
|
also always fetch the complete index from the leader because a partial
|
909
|
sync will not be possible in the absence of this handler.
|
910
|
-->
|
911
|
<requestHandler name="/get" class="solr.RealTimeGetHandler">
|
912
|
<lst name="defaults">
|
913
|
<str name="omitHeader">true</str>
|
914
|
<str name="wt">json</str>
|
915
|
<str name="indent">true</str>
|
916
|
</lst>
|
917
|
</requestHandler>
|
918
|
|
919
|
|
920
|
|
921
|
|
922
|
|
923
|
<!-- Update Request Handler.
|
924
|
|
925
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
926
|
|
927
|
The canonical Request Handler for Modifying the Index through
|
928
|
commands specified using XML, JSON, CSV, or JAVABIN
|
929
|
|
930
|
Note: Since solr1.1 requestHandlers requires a valid content
|
931
|
type header if posted in the body. For example, curl now
|
932
|
requires: -H 'Content-type:text/xml; charset=utf-8'
|
933
|
|
934
|
To override the request content type and force a specific
|
935
|
Content-type, use the request parameter:
|
936
|
?update.contentType=text/csv
|
937
|
|
938
|
This handler will pick a response format to match the input
|
939
|
if the 'wt' parameter is not explicit
|
940
|
-->
|
941
|
<requestHandler name="/update" class="solr.UpdateRequestHandler">
|
942
|
<!-- See below for information on defining
|
943
|
updateRequestProcessorChains that can be used by name
|
944
|
on each Update Request
|
945
|
-->
|
946
|
<!--
|
947
|
<lst name="defaults">
|
948
|
<str name="update.chain">dedupe</str>
|
949
|
</lst>
|
950
|
-->
|
951
|
</requestHandler>
|
952
|
|
953
|
<!-- for back compat with clients using /update/json and /update/csv -->
|
954
|
<requestHandler name="/update/json" class="solr.UpdateRequestHandler">
|
955
|
<lst name="defaults">
|
956
|
<str name="stream.contentType">application/json</str>
|
957
|
</lst>
|
958
|
</requestHandler>
|
959
|
<requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
|
960
|
<lst name="defaults">
|
961
|
<str name="stream.contentType">application/csv</str>
|
962
|
</lst>
|
963
|
</requestHandler>
|
964
|
|
965
|
<!-- Solr Cell Update Request Handler
|
966
|
|
967
|
http://wiki.apache.org/solr/ExtractingRequestHandler
|
968
|
|
969
|
-->
|
970
|
<requestHandler name="/update/extract"
|
971
|
startup="lazy"
|
972
|
class="solr.extraction.ExtractingRequestHandler" >
|
973
|
<lst name="defaults">
|
974
|
<str name="lowernames">true</str>
|
975
|
<str name="uprefix">ignored_</str>
|
976
|
|
977
|
<!-- capture link hrefs but ignore div attributes -->
|
978
|
<str name="captureAttr">true</str>
|
979
|
<str name="fmap.a">links</str>
|
980
|
<str name="fmap.div">ignored_</str>
|
981
|
</lst>
|
982
|
</requestHandler>
|
983
|
|
984
|
|
985
|
<!-- Field Analysis Request Handler
|
986
|
|
987
|
RequestHandler that provides much the same functionality as
|
988
|
analysis.jsp. Provides the ability to specify multiple field
|
989
|
types and field names in the same request and outputs
|
990
|
index-time and query-time analysis for each of them.
|
991
|
|
992
|
Request parameters are:
|
993
|
analysis.fieldname - field name whose analyzers are to be used
|
994
|
|
995
|
analysis.fieldtype - field type whose analyzers are to be used
|
996
|
analysis.fieldvalue - text for index-time analysis
|
997
|
q (or analysis.q) - text for query time analysis
|
998
|
analysis.showmatch (true|false) - When set to true and when
|
999
|
query analysis is performed, the produced tokens of the
|
1000
|
field value analysis will be marked as "matched" for every
|
1001
|
token that is produces by the query analysis
|
1002
|
-->
|
1003
|
<requestHandler name="/analysis/field"
|
1004
|
startup="lazy"
|
1005
|
class="solr.FieldAnalysisRequestHandler" />
|
1006
|
|
1007
|
|
1008
|
<!-- Document Analysis Handler
|
1009
|
|
1010
|
http://wiki.apache.org/solr/AnalysisRequestHandler
|
1011
|
|
1012
|
An analysis handler that provides a breakdown of the analysis
|
1013
|
process of provided documents. This handler expects a (single)
|
1014
|
content stream with the following format:
|
1015
|
|
1016
|
<docs>
|
1017
|
<doc>
|
1018
|
<field name="id">1</field>
|
1019
|
<field name="name">The Name</field>
|
1020
|
<field name="text">The Text Value</field>
|
1021
|
</doc>
|
1022
|
<doc>...</doc>
|
1023
|
<doc>...</doc>
|
1024
|
...
|
1025
|
</docs>
|
1026
|
|
1027
|
Note: Each document must contain a field which serves as the
|
1028
|
unique key. This key is used in the returned response to associate
|
1029
|
an analysis breakdown to the analyzed document.
|
1030
|
|
1031
|
Like the FieldAnalysisRequestHandler, this handler also supports
|
1032
|
query analysis by sending either an "analysis.query" or "q"
|
1033
|
request parameter that holds the query text to be analyzed. It
|
1034
|
also supports the "analysis.showmatch" parameter which when set to
|
1035
|
true, all field tokens that match the query tokens will be marked
|
1036
|
as a "match".
|
1037
|
-->
|
1038
|
<requestHandler name="/analysis/document"
|
1039
|
class="solr.DocumentAnalysisRequestHandler"
|
1040
|
startup="lazy" />
|
1041
|
|
1042
|
<!-- Admin Handlers
|
1043
|
|
1044
|
Admin Handlers - This will register all the standard admin
|
1045
|
RequestHandlers.
|
1046
|
-->
|
1047
|
<requestHandler name="/admin/"
|
1048
|
class="solr.admin.AdminHandlers" />
|
1049
|
<!-- This single handler is equivalent to the following... -->
|
1050
|
<!--
|
1051
|
<requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
|
1052
|
<requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
|
1053
|
<requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
|
1054
|
<requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
|
1055
|
<requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
|
1056
|
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
1057
|
-->
|
1058
|
<!-- If you wish to hide files under \${solr.home}/conf, explicitly
|
1059
|
register the ShowFileRequestHandler using the definition below.
|
1060
|
NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
|
1061
|
not exclude all files ending in '.xml'. Use it to exclude _all_ updates
|
1062
|
-->
|
1063
|
<!--
|
1064
|
<requestHandler name="/admin/file"
|
1065
|
class="solr.admin.ShowFileRequestHandler" >
|
1066
|
<lst name="invariants">
|
1067
|
<str name="hidden">synonyms.txt</str>
|
1068
|
<str name="hidden">anotherfile.txt</str>
|
1069
|
<str name="hidden">*</str>
|
1070
|
</lst>
|
1071
|
</requestHandler>
|
1072
|
-->
|
1073
|
|
1074
|
<!-- ping/healthcheck -->
|
1075
|
<requestHandler name="/admin/ping" class="solr.PingRequestHandler">
|
1076
|
<lst name="invariants">
|
1077
|
<str name="q">solrpingquery</str>
|
1078
|
</lst>
|
1079
|
<lst name="defaults">
|
1080
|
<str name="echoParams">all</str>
|
1081
|
</lst>
|
1082
|
<!-- An optional feature of the PingRequestHandler is to configure the
|
1083
|
handler with a "healthcheckFile" which can be used to enable/disable
|
1084
|
the PingRequestHandler.
|
1085
|
relative paths are resolved against the data dir
|
1086
|
-->
|
1087
|
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
1088
|
</requestHandler>
|
1089
|
|
1090
|
<!-- Echo the request contents back to the client -->
|
1091
|
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
1092
|
<lst name="defaults">
|
1093
|
<str name="echoParams">explicit</str>
|
1094
|
<str name="echoHandler">true</str>
|
1095
|
</lst>
|
1096
|
</requestHandler>
|
1097
|
|
1098
|
<!-- Solr Replication
|
1099
|
|
1100
|
The SolrReplicationHandler supports replicating indexes from a
|
1101
|
"master" used for indexing and "slaves" used for queries.
|
1102
|
|
1103
|
http://wiki.apache.org/solr/SolrReplication
|
1104
|
|
1105
|
It is also necessary for SolrCloud to function (in Cloud mode, the
|
1106
|
replication handler is used to bulk transfer segments when nodes
|
1107
|
are added or need to recover).
|
1108
|
|
1109
|
https://wiki.apache.org/solr/SolrCloud/
|
1110
|
-->
|
1111
|
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
1112
|
<!--
|
1113
|
To enable simple master/slave replication, uncomment one of the
|
1114
|
sections below, depending on whether this solr instance should be
|
1115
|
the "master" or a "slave". If this instance is a "slave" you will
|
1116
|
also need to fill in the masterUrl to point to a real machine.
|
1117
|
-->
|
1118
|
<!--
|
1119
|
<lst name="master">
|
1120
|
<str name="replicateAfter">commit</str>
|
1121
|
<str name="replicateAfter">startup</str>
|
1122
|
<str name="confFiles">schema.xml,stopwords.txt</str>
|
1123
|
</lst>
|
1124
|
-->
|
1125
|
<!--
|
1126
|
<lst name="slave">
|
1127
|
<str name="masterUrl">http://your-master-hostname:8983/solr</str>
|
1128
|
<str name="pollInterval">00:00:60</str>
|
1129
|
</lst>
|
1130
|
-->
|
1131
|
</requestHandler>
|
1132
|
|
1133
|
<!-- Search Components
|
1134
|
|
1135
|
Search components are registered to SolrCore and used by
|
1136
|
instances of SearchHandler (which can access them by name)
|
1137
|
|
1138
|
By default, the following components are available:
|
1139
|
|
1140
|
<searchComponent name="query" class="solr.QueryComponent" />
|
1141
|
<searchComponent name="facet" class="solr.FacetComponent" />
|
1142
|
<searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
|
1143
|
<searchComponent name="highlight" class="solr.HighlightComponent" />
|
1144
|
<searchComponent name="stats" class="solr.StatsComponent" />
|
1145
|
<searchComponent name="debug" class="solr.DebugComponent" />
|
1146
|
|
1147
|
Default configuration in a requestHandler would look like:
|
1148
|
|
1149
|
<arr name="components">
|
1150
|
<str>query</str>
|
1151
|
<str>facet</str>
|
1152
|
<str>mlt</str>
|
1153
|
<str>highlight</str>
|
1154
|
<str>stats</str>
|
1155
|
<str>debug</str>
|
1156
|
</arr>
|
1157
|
|
1158
|
If you register a searchComponent to one of the standard names,
|
1159
|
that will be used instead of the default.
|
1160
|
|
1161
|
To insert components before or after the 'standard' components, use:
|
1162
|
|
1163
|
<arr name="first-components">
|
1164
|
<str>myFirstComponentName</str>
|
1165
|
</arr>
|
1166
|
|
1167
|
<arr name="last-components">
|
1168
|
<str>myLastComponentName</str>
|
1169
|
</arr>
|
1170
|
|
1171
|
NOTE: The component registered with the name "debug" will
|
1172
|
always be executed after the "last-components"
|
1173
|
|
1174
|
-->
|
1175
|
|
1176
|
<!-- Spell Check
|
1177
|
|
1178
|
The spell check component can return a list of alternative spelling
|
1179
|
suggestions.
|
1180
|
|
1181
|
http://wiki.apache.org/solr/SpellCheckComponent
|
1182
|
-->
|
1183
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
1184
|
|
1185
|
<str name="queryAnalyzerFieldType">text_general</str>
|
1186
|
|
1187
|
<!-- Multiple "Spell Checkers" can be declared and used by this
|
1188
|
component
|
1189
|
-->
|
1190
|
|
1191
|
<!-- a spellchecker built from a field of the main index -->
|
1192
|
<lst name="spellchecker">
|
1193
|
<str name="name">default</str>
|
1194
|
<str name="field">__all</str>
|
1195
|
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1196
|
<!-- the spellcheck distance measure used, the default is the internal levenshtein -->
|
1197
|
<str name="distanceMeasure">internal</str>
|
1198
|
<!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
|
1199
|
<float name="accuracy">0.5</float>
|
1200
|
<!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
|
1201
|
<int name="maxEdits">2</int>
|
1202
|
<!-- the minimum shared prefix when enumerating terms -->
|
1203
|
<int name="minPrefix">1</int>
|
1204
|
<!-- maximum number of inspections per result. -->
|
1205
|
<int name="maxInspections">5</int>
|
1206
|
<!-- minimum length of a query term to be considered for correction -->
|
1207
|
<int name="minQueryLength">4</int>
|
1208
|
<!-- maximum threshold of documents a query term can appear to be considered for correction -->
|
1209
|
<float name="maxQueryFrequency">0.01</float>
|
1210
|
<!-- uncomment this to require suggestions to occur in 1% of the documents
|
1211
|
<float name="thresholdTokenFrequency">.01</float>
|
1212
|
-->
|
1213
|
</lst>
|
1214
|
|
1215
|
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
|
1216
|
<lst name="spellchecker">
|
1217
|
<str name="name">wordbreak</str>
|
1218
|
<str name="classname">solr.WordBreakSolrSpellChecker</str>
|
1219
|
<str name="field">name</str>
|
1220
|
<str name="combineWords">true</str>
|
1221
|
<str name="breakWords">true</str>
|
1222
|
<int name="maxChanges">10</int>
|
1223
|
</lst>
|
1224
|
|
1225
|
<!-- a spellchecker that uses a different distance measure -->
|
1226
|
<!--
|
1227
|
<lst name="spellchecker">
|
1228
|
<str name="name">jarowinkler</str>
|
1229
|
<str name="field">spell</str>
|
1230
|
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1231
|
<str name="distanceMeasure">
|
1232
|
org.apache.lucene.search.spell.JaroWinklerDistance
|
1233
|
</str>
|
1234
|
</lst>
|
1235
|
-->
|
1236
|
|
1237
|
<!-- a spellchecker that use an alternate comparator
|
1238
|
|
1239
|
comparatorClass be one of:
|
1240
|
1. score (default)
|
1241
|
2. freq (Frequency first, then score)
|
1242
|
3. A fully qualified class name
|
1243
|
-->
|
1244
|
<!--
|
1245
|
<lst name="spellchecker">
|
1246
|
<str name="name">freq</str>
|
1247
|
<str name="field">lowerfilt</str>
|
1248
|
<str name="classname">solr.DirectSolrSpellChecker</str>
|
1249
|
<str name="comparatorClass">freq</str>
|
1250
|
-->
|
1251
|
|
1252
|
<!-- A spellchecker that reads the list of words from a file -->
|
1253
|
<!--
|
1254
|
<lst name="spellchecker">
|
1255
|
<str name="classname">solr.FileBasedSpellChecker</str>
|
1256
|
<str name="name">file</str>
|
1257
|
<str name="sourceLocation">spellings.txt</str>
|
1258
|
<str name="characterEncoding">UTF-8</str>
|
1259
|
<str name="spellcheckIndexDir">spellcheckerFile</str>
|
1260
|
</lst>
|
1261
|
-->
|
1262
|
</searchComponent>
|
1263
|
|
1264
|
<!-- A request handler for demonstrating the spellcheck component.
|
1265
|
|
1266
|
NOTE: This is purely as an example. The whole purpose of the
|
1267
|
SpellCheckComponent is to hook it into the request handler that
|
1268
|
handles your normal user queries so that a separate request is
|
1269
|
not needed to get suggestions.
|
1270
|
|
1271
|
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
|
1272
|
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
1273
|
|
1274
|
See http://wiki.apache.org/solr/SpellCheckComponent for details
|
1275
|
on the request parameters.
|
1276
|
-->
|
1277
|
<requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
|
1278
|
<lst name="defaults">
|
1279
|
<str name="df">__all</str>
|
1280
|
<!-- Solr will use suggestions from both the 'default' spellchecker
|
1281
|
and from the 'wordbreak' spellchecker and combine them.
|
1282
|
collations (re-written queries) can include a combination of
|
1283
|
corrections from both spellcheckers -->
|
1284
|
<str name="spellcheck.dictionary">default</str>
|
1285
|
<str name="spellcheck.dictionary">wordbreak</str>
|
1286
|
<str name="spellcheck">on</str>
|
1287
|
<str name="spellcheck.extendedResults">true</str>
|
1288
|
<str name="spellcheck.count">10</str>
|
1289
|
<str name="spellcheck.alternativeTermCount">5</str>
|
1290
|
<str name="spellcheck.maxResultsForSuggest">5</str>
|
1291
|
<str name="spellcheck.collate">true</str>
|
1292
|
<str name="spellcheck.collateExtendedResults">true</str>
|
1293
|
<str name="spellcheck.maxCollationTries">10</str>
|
1294
|
<str name="spellcheck.maxCollations">5</str>
|
1295
|
</lst>
|
1296
|
<arr name="last-components">
|
1297
|
<str>spellcheck</str>
|
1298
|
</arr>
|
1299
|
</requestHandler>
|
1300
|
|
1301
|
<searchComponent name="suggest" class="solr.SuggestComponent">
|
1302
|
<lst name="suggester">
|
1303
|
<str name="name">mySuggester</str>
|
1304
|
<str name="lookupImpl">FuzzyLookupFactory</str> <!-- org.apache.solr.spelling.suggest.fst -->
|
1305
|
<str name="dictionaryImpl">DocumentDictionaryFactory</str> <!-- org.apache.solr.spelling.suggest.HighFrequencyDictionaryFactory -->
|
1306
|
<str name="field">cat</str>
|
1307
|
<str name="weightField">price</str>
|
1308
|
<str name="suggestAnalyzerFieldType">string</str>
|
1309
|
</lst>
|
1310
|
</searchComponent>
|
1311
|
|
1312
|
<requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
|
1313
|
<lst name="defaults">
|
1314
|
<str name="suggest">true</str>
|
1315
|
<str name="suggest.count">10</str>
|
1316
|
</lst>
|
1317
|
<arr name="components">
|
1318
|
<str>suggest</str>
|
1319
|
</arr>
|
1320
|
</requestHandler>
|
1321
|
<!-- Term Vector Component
|
1322
|
|
1323
|
http://wiki.apache.org/solr/TermVectorComponent
|
1324
|
-->
|
1325
|
<searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
|
1326
|
|
1327
|
<!-- A request handler for demonstrating the term vector component
|
1328
|
|
1329
|
This is purely as an example.
|
1330
|
|
1331
|
In reality you will likely want to add the component to your
|
1332
|
already specified request handlers.
|
1333
|
-->
|
1334
|
<requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
|
1335
|
<lst name="defaults">
|
1336
|
<str name="df">__all</str>
|
1337
|
<bool name="tv">true</bool>
|
1338
|
</lst>
|
1339
|
<arr name="last-components">
|
1340
|
<str>tvComponent</str>
|
1341
|
</arr>
|
1342
|
</requestHandler>
|
1343
|
|
1344
|
<!-- Clustering Component
|
1345
|
|
1346
|
http://wiki.apache.org/solr/ClusteringComponent
|
1347
|
|
1348
|
You'll need to set the solr.clustering.enabled system property
|
1349
|
when running solr to run with clustering enabled:
|
1350
|
|
1351
|
java -Dsolr.clustering.enabled=true -jar start.jar
|
1352
|
|
1353
|
http://wiki.apache.org/solr/ClusteringComponent
|
1354
|
http://carrot2.github.io/solr-integration-strategies/
|
1355
|
-->
|
1356
|
<searchComponent name="clustering"
|
1357
|
enable="\${solr.clustering.enabled:false}"
|
1358
|
class="solr.clustering.ClusteringComponent" >
|
1359
|
<!-- Declare an engine -->
|
1360
|
<lst name="engine">
|
1361
|
<str name="name">lingo</str>
|
1362
|
|
1363
|
<!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
|
1364
|
|
1365
|
Currently available open source algorithms are:
|
1366
|
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
1367
|
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
1368
|
* org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
1369
|
|
1370
|
See http://project.carrot2.org/algorithms.html for the
|
1371
|
algorithm's characteristics.
|
1372
|
-->
|
1373
|
<str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
|
1374
|
|
1375
|
See http://project.carrot2.org/algorithms.html for more information.
|
1376
|
|
1377
|
A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
|
1378
|
* com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
|
1379
|
-->
|
1380
|
<str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
|
1381
|
|
1382
|
<!-- Override location of the clustering algorithm's resources
|
1383
|
(attribute definitions and lexical resources).
|
1384
|
|
1385
|
A directory from which to load algorithm-specific stop words,
|
1386
|
stop labels and attribute definition XMLs.
|
1387
|
|
1388
|
For an overview of Carrot2 lexical resources, see:
|
1389
|
http://download.carrot2.org/head/manual/#chapter.lexical-resources
|
1390
|
-->
|
1391
|
<str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
|
1392
|
|
1393
|
For an overview of Lingo3G lexical resources, see:
|
1394
|
http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
|
1395
|
-->
|
1396
|
<str name="carrot.resourcesDir">clustering/carrot2</str>
|
1397
|
</lst>
|
1398
|
|
1399
|
<!-- An example definition for the STC clustering algorithm. -->
|
1400
|
<lst name="engine">
|
1401
|
<str name="name">stc</str>
|
1402
|
<str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
|
1403
|
</lst>
|
1404
|
|
1405
|
<!-- An example definition for the bisecting kmeans clustering algorithm. -->
|
1406
|
<lst name="engine">
|
1407
|
<str name="name">kmeans</str>
|
1408
|
<str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
|
1409
|
</lst>
|
1410
|
</searchComponent>
|
1411
|
|
1412
|
<!-- A request handler for demonstrating the clustering component
|
1413
|
|
1414
|
This is purely as an example.
|
1415
|
|
1416
|
In reality you will likely want to add the component to your
|
1417
|
already specified request handlers.
|
1418
|
-->
|
1419
|
<requestHandler name="/clustering"
|
1420
|
startup="lazy"
|
1421
|
enable="\${solr.clustering.enabled:false}"
|
1422
|
class="solr.SearchHandler">
|
1423
|
<lst name="defaults">
|
1424
|
<bool name="clustering">true</bool>
|
1425
|
<str name="clustering.engine">default</str>
|
1426
|
<bool name="clustering.results">true</bool>
|
1427
|
<!-- Field name with the logical "title" of a each document (optional) -->
|
1428
|
<str name="carrot.title">name</str>
|
1429
|
<!-- Field name with the logical "URL" of a each document (optional) -->
|
1430
|
<str name="carrot.url">id</str>
|
1431
|
<!-- Field name with the logical "content" of a each document (optional) -->
|
1432
|
<str name="carrot.snippet">features</str>
|
1433
|
<!-- Apply highlighter to the title/ content and use this for clustering. -->
|
1434
|
<bool name="carrot.produceSummary">true</bool>
|
1435
|
<!-- the maximum number of labels per cluster -->
|
1436
|
<!--<int name="carrot.numDescriptions">5</int>-->
|
1437
|
<!-- produce sub clusters -->
|
1438
|
<bool name="carrot.outputSubClusters">false</bool>
|
1439
|
|
1440
|
<!-- Configure the remaining request handler parameters. -->
|
1441
|
<str name="defType">edismax</str>
|
1442
|
<str name="qf">
|
1443
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
1444
|
</str>
|
1445
|
<str name="q.alt">*:*</str>
|
1446
|
<str name="rows">10</str>
|
1447
|
<str name="fl">*,score</str>
|
1448
|
</lst>
|
1449
|
<arr name="last-components">
|
1450
|
<str>clustering</str>
|
1451
|
</arr>
|
1452
|
</requestHandler>
|
1453
|
|
1454
|
<!-- Terms Component
|
1455
|
|
1456
|
http://wiki.apache.org/solr/TermsComponent
|
1457
|
|
1458
|
A component to return terms and document frequency of those
|
1459
|
terms
|
1460
|
-->
|
1461
|
<searchComponent name="terms" class="solr.TermsComponent"/>
|
1462
|
|
1463
|
<!-- A request handler for demonstrating the terms component -->
|
1464
|
<requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
|
1465
|
<lst name="defaults">
|
1466
|
<bool name="terms">true</bool>
|
1467
|
<bool name="distrib">false</bool>
|
1468
|
</lst>
|
1469
|
<arr name="components">
|
1470
|
<str>terms</str>
|
1471
|
</arr>
|
1472
|
</requestHandler>
|
1473
|
|
1474
|
|
1475
|
<!-- Query Elevation Component
|
1476
|
|
1477
|
http://wiki.apache.org/solr/QueryElevationComponent
|
1478
|
|
1479
|
a search component that enables you to configure the top
|
1480
|
results for a given query regardless of the normal lucene
|
1481
|
scoring.
|
1482
|
-->
|
1483
|
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
1484
|
<!-- pick a fieldType to analyze queries -->
|
1485
|
<str name="queryFieldType">string</str>
|
1486
|
<str name="config-file">elevate.xml</str>
|
1487
|
</searchComponent>
|
1488
|
|
1489
|
<!-- A request handler for demonstrating the elevator component -->
|
1490
|
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
1491
|
<lst name="defaults">
|
1492
|
<str name="echoParams">explicit</str>
|
1493
|
<str name="df">__all</str>
|
1494
|
</lst>
|
1495
|
<arr name="last-components">
|
1496
|
<str>elevator</str>
|
1497
|
</arr>
|
1498
|
</requestHandler>
|
1499
|
|
1500
|
<!-- Highlighting Component
|
1501
|
|
1502
|
http://wiki.apache.org/solr/HighlightingParameters
|
1503
|
-->
|
1504
|
<searchComponent class="solr.HighlightComponent" name="highlight">
|
1505
|
<highlighting>
|
1506
|
<!-- Configure the standard fragmenter -->
|
1507
|
<!-- This could most likely be commented out in the "default" case -->
|
1508
|
<fragmenter name="gap"
|
1509
|
default="true"
|
1510
|
class="solr.highlight.GapFragmenter">
|
1511
|
<lst name="defaults">
|
1512
|
<int name="hl.fragsize">100</int>
|
1513
|
</lst>
|
1514
|
</fragmenter>
|
1515
|
|
1516
|
<!-- A regular-expression-based fragmenter
|
1517
|
(for sentence extraction)
|
1518
|
-->
|
1519
|
<fragmenter name="regex"
|
1520
|
class="solr.highlight.RegexFragmenter">
|
1521
|
<lst name="defaults">
|
1522
|
<!-- slightly smaller fragsizes work better because of slop -->
|
1523
|
<int name="hl.fragsize">70</int>
|
1524
|
<!-- allow 50% slop on fragment sizes -->
|
1525
|
<float name="hl.regex.slop">0.5</float>
|
1526
|
<!-- a basic sentence pattern -->
|
1527
|
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
1528
|
</lst>
|
1529
|
</fragmenter>
|
1530
|
|
1531
|
<!-- Configure the standard formatter -->
|
1532
|
<formatter name="html"
|
1533
|
default="true"
|
1534
|
class="solr.highlight.HtmlFormatter">
|
1535
|
<lst name="defaults">
|
1536
|
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
1537
|
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
1538
|
</lst>
|
1539
|
</formatter>
|
1540
|
|
1541
|
<!-- Configure the standard encoder -->
|
1542
|
<encoder name="html"
|
1543
|
class="solr.highlight.HtmlEncoder" />
|
1544
|
|
1545
|
<!-- Configure the standard fragListBuilder -->
|
1546
|
<fragListBuilder name="simple"
|
1547
|
class="solr.highlight.SimpleFragListBuilder"/>
|
1548
|
|
1549
|
<!-- Configure the single fragListBuilder -->
|
1550
|
<fragListBuilder name="single"
|
1551
|
class="solr.highlight.SingleFragListBuilder"/>
|
1552
|
|
1553
|
<!-- Configure the weighted fragListBuilder -->
|
1554
|
<fragListBuilder name="weighted"
|
1555
|
default="true"
|
1556
|
class="solr.highlight.WeightedFragListBuilder"/>
|
1557
|
|
1558
|
<!-- default tag FragmentsBuilder -->
|
1559
|
<fragmentsBuilder name="default"
|
1560
|
default="true"
|
1561
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
1562
|
<!--
|
1563
|
<lst name="defaults">
|
1564
|
<str name="hl.multiValuedSeparatorChar">/</str>
|
1565
|
</lst>
|
1566
|
-->
|
1567
|
</fragmentsBuilder>
|
1568
|
|
1569
|
<!-- multi-colored tag FragmentsBuilder -->
|
1570
|
<fragmentsBuilder name="colored"
|
1571
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
1572
|
<lst name="defaults">
|
1573
|
<str name="hl.tag.pre"><![CDATA[
|
1574
|
<b style="background:yellow">,<b style="background:lawgreen">,
|
1575
|
<b style="background:aquamarine">,<b style="background:magenta">,
|
1576
|
<b style="background:palegreen">,<b style="background:coral">,
|
1577
|
<b style="background:wheat">,<b style="background:khaki">,
|
1578
|
<b style="background:lime">,<b style="background:deepskyblue">]]></str>
|
1579
|
<str name="hl.tag.post"><![CDATA[</b>]]></str>
|
1580
|
</lst>
|
1581
|
</fragmentsBuilder>
|
1582
|
|
1583
|
<boundaryScanner name="default"
|
1584
|
default="true"
|
1585
|
class="solr.highlight.SimpleBoundaryScanner">
|
1586
|
<lst name="defaults">
|
1587
|
<str name="hl.bs.maxScan">10</str>
|
1588
|
<str name="hl.bs.chars">.,!? 	 </str>
|
1589
|
</lst>
|
1590
|
</boundaryScanner>
|
1591
|
|
1592
|
<boundaryScanner name="breakIterator"
|
1593
|
class="solr.highlight.BreakIteratorBoundaryScanner">
|
1594
|
<lst name="defaults">
|
1595
|
<!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
|
1596
|
<str name="hl.bs.type">WORD</str>
|
1597
|
<!-- language and country are used when constructing Locale object. -->
|
1598
|
<!-- And the Locale object will be used when getting instance of BreakIterator -->
|
1599
|
<str name="hl.bs.language">en</str>
|
1600
|
<str name="hl.bs.country">US</str>
|
1601
|
</lst>
|
1602
|
</boundaryScanner>
|
1603
|
</highlighting>
|
1604
|
</searchComponent>
|
1605
|
|
1606
|
<!-- Update Processors
|
1607
|
|
1608
|
Chains of Update Processor Factories for dealing with Update
|
1609
|
Requests can be declared, and then used by name in Update
|
1610
|
Request Processors
|
1611
|
|
1612
|
http://wiki.apache.org/solr/UpdateRequestProcessor
|
1613
|
|
1614
|
-->
|
1615
|
<!-- Deduplication
|
1616
|
|
1617
|
An example dedup update processor that creates the "id" field
|
1618
|
on the fly based on the hash code of some other fields. This
|
1619
|
example has overwriteDupes set to false since we are using the
|
1620
|
id field as the signatureField and Solr will maintain
|
1621
|
uniqueness based on that anyway.
|
1622
|
|
1623
|
-->
|
1624
|
<!--
|
1625
|
<updateRequestProcessorChain name="dedupe">
|
1626
|
<processor class="solr.processor.SignatureUpdateProcessorFactory">
|
1627
|
<bool name="enabled">true</bool>
|
1628
|
<str name="signatureField">id</str>
|
1629
|
<bool name="overwriteDupes">false</bool>
|
1630
|
<str name="fields">name,features,cat</str>
|
1631
|
<str name="signatureClass">solr.processor.Lookup3Signature</str>
|
1632
|
</processor>
|
1633
|
<processor class="solr.LogUpdateProcessorFactory" />
|
1634
|
<processor class="solr.RunUpdateProcessorFactory" />
|
1635
|
</updateRequestProcessorChain>
|
1636
|
-->
|
1637
|
|
1638
|
<!-- Language identification
|
1639
|
|
1640
|
This example update chain identifies the language of the incoming
|
1641
|
documents using the langid contrib. The detected language is
|
1642
|
written to field language_s. No field name mapping is done.
|
1643
|
The fields used for detection are text, title, subject and description,
|
1644
|
making this example suitable for detecting languages form full-text
|
1645
|
rich documents injected via ExtractingRequestHandler.
|
1646
|
See more about langId at http://wiki.apache.org/solr/LanguageDetection
|
1647
|
-->
|
1648
|
<!--
|
1649
|
<updateRequestProcessorChain name="langid">
|
1650
|
<processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
|
1651
|
<str name="langid.fl">text,title,subject,description</str>
|
1652
|
<str name="langid.langField">language_s</str>
|
1653
|
<str name="langid.fallback">en</str>
|
1654
|
</processor>
|
1655
|
<processor class="solr.LogUpdateProcessorFactory" />
|
1656
|
<processor class="solr.RunUpdateProcessorFactory" />
|
1657
|
</updateRequestProcessorChain>
|
1658
|
-->
|
1659
|
|
1660
|
<!-- Script update processor
|
1661
|
|
1662
|
This example hooks in an update processor implemented using JavaScript.
|
1663
|
|
1664
|
See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
|
1665
|
-->
|
1666
|
<!--
|
1667
|
<updateRequestProcessorChain name="script">
|
1668
|
<processor class="solr.StatelessScriptUpdateProcessorFactory">
|
1669
|
<str name="script">update-script.js</str>
|
1670
|
<lst name="params">
|
1671
|
<str name="config_param">example config parameter</str>
|
1672
|
</lst>
|
1673
|
</processor>
|
1674
|
<processor class="solr.RunUpdateProcessorFactory" />
|
1675
|
</updateRequestProcessorChain>
|
1676
|
-->
|
1677
|
|
1678
|
<!-- Response Writers
|
1679
|
|
1680
|
http://wiki.apache.org/solr/QueryResponseWriter
|
1681
|
|
1682
|
Request responses will be written using the writer specified by
|
1683
|
the 'wt' request parameter matching the name of a registered
|
1684
|
writer.
|
1685
|
|
1686
|
The "default" writer is the default and will be used if 'wt' is
|
1687
|
not specified in the request.
|
1688
|
-->
|
1689
|
<!-- The following response writers are implicitly configured unless
|
1690
|
overridden...
|
1691
|
-->
|
1692
|
<!--
|
1693
|
<queryResponseWriter name="xml"
|
1694
|
default="true"
|
1695
|
class="solr.XMLResponseWriter" />
|
1696
|
<queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
|
1697
|
<queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
|
1698
|
<queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
|
1699
|
<queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
|
1700
|
<queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
|
1701
|
<queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
|
1702
|
<queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
|
1703
|
-->
|
1704
|
|
1705
|
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
|
1706
|
<!-- For the purposes of the tutorial, JSON responses are written as
|
1707
|
plain text so that they are easy to read in *any* browser.
|
1708
|
If you expect a MIME type of "application/json" just remove this override.
|
1709
|
-->
|
1710
|
<str name="content-type">text/plain; charset=UTF-8</str>
|
1711
|
</queryResponseWriter>
|
1712
|
|
1713
|
<!--
|
1714
|
Custom response writers can be declared as needed...
|
1715
|
-->
|
1716
|
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
1717
|
|
1718
|
|
1719
|
<!-- XSLT response writer transforms the XML output by any xslt file found
|
1720
|
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
1721
|
every xsltCacheLifetimeSeconds.
|
1722
|
-->
|
1723
|
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
|
1724
|
<int name="xsltCacheLifetimeSeconds">5</int>
|
1725
|
</queryResponseWriter>
|
1726
|
|
1727
|
<!-- Query Parsers
|
1728
|
|
1729
|
http://wiki.apache.org/solr/SolrQuerySyntax
|
1730
|
|
1731
|
Multiple QParserPlugins can be registered by name, and then
|
1732
|
used in either the "defType" param for the QueryComponent (used
|
1733
|
by SearchHandler) or in LocalParams
|
1734
|
-->
|
1735
|
<!-- example of registering a query parser -->
|
1736
|
<!--
|
1737
|
<queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
|
1738
|
-->
|
1739
|
|
1740
|
<!-- Function Parsers
|
1741
|
|
1742
|
http://wiki.apache.org/solr/FunctionQuery
|
1743
|
|
1744
|
Multiple ValueSourceParsers can be registered by name, and then
|
1745
|
used as function names when using the "func" QParser.
|
1746
|
-->
|
1747
|
<!-- example of registering a custom function parser -->
|
1748
|
<!--
|
1749
|
<valueSourceParser name="myfunc"
|
1750
|
class="com.mycompany.MyValueSourceParser" />
|
1751
|
-->
|
1752
|
|
1753
|
|
1754
|
<!-- Document Transformers
|
1755
|
http://wiki.apache.org/solr/DocTransformers
|
1756
|
-->
|
1757
|
<!--
|
1758
|
Could be something like:
|
1759
|
<transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
|
1760
|
<int name="connection">jdbc://....</int>
|
1761
|
</transformer>
|
1762
|
|
1763
|
To add a constant value to all docs, use:
|
1764
|
<transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
1765
|
<int name="value">5</int>
|
1766
|
</transformer>
|
1767
|
|
1768
|
If you want the user to still be able to change it with _value:something_ use this:
|
1769
|
<transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
1770
|
<double name="defaultValue">5</double>
|
1771
|
</transformer>
|
1772
|
|
1773
|
If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
|
1774
|
EditorialMarkerFactory will do exactly that:
|
1775
|
<transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
|
1776
|
-->
|
1777
|
|
1778
|
|
1779
|
<!-- Legacy config for the admin interface -->
|
1780
|
<admin>
|
1781
|
<defaultQuery>*:*</defaultQuery>
|
1782
|
</admin>
|
1783
|
|
1784
|
</config>
|