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