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