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