| 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 |
<config>
|
| 20 |
|
| 21 |
<!-- Set this to 'false' if you want solr to continue working after it has
|
| 22 |
encountered an severe configuration error. In a production environment,
|
| 23 |
you may want solr to keep working even if one handler is mis-configured.
|
| 24 |
|
| 25 |
You may also set this to false using by setting the system property:
|
| 26 |
-Dsolr.abortOnConfigurationError=false
|
| 27 |
-->
|
| 28 |
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
| 29 |
|
| 30 |
<!-- Used to specify an alternate directory to hold all index data
|
| 31 |
other than the default ./data under the Solr home.
|
| 32 |
If replication is in use, this should match the replication configuration. -->
|
| 33 |
<!--
|
| 34 |
<dataDir>${solr.data.dir:./solr/data}</dataDir>
|
| 35 |
-->
|
| 36 |
|
| 37 |
<indexDefaults>
|
| 38 |
<!-- Values here affect all index writers and act as a default unless overridden. -->
|
| 39 |
<useCompoundFile>false</useCompoundFile>
|
| 40 |
|
| 41 |
<mergeFactor>10</mergeFactor>
|
| 42 |
<!--
|
| 43 |
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
| 44 |
|
| 45 |
-->
|
| 46 |
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
| 47 |
<!-- Tell Lucene when to flush documents to disk.
|
| 48 |
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
|
| 49 |
|
| 50 |
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
| 51 |
|
| 52 |
-->
|
| 53 |
<ramBufferSizeMB>32</ramBufferSizeMB>
|
| 54 |
<maxMergeDocs>2147483647</maxMergeDocs>
|
| 55 |
<maxFieldLength>10000</maxFieldLength>
|
| 56 |
<writeLockTimeout>1000</writeLockTimeout>
|
| 57 |
<commitLockTimeout>10000</commitLockTimeout>
|
| 58 |
|
| 59 |
<!--
|
| 60 |
Expert: Turn on Lucene's auto commit capability.
|
| 61 |
This causes intermediate segment flushes to write a new lucene
|
| 62 |
index descriptor, enabling it to be opened by an external
|
| 63 |
IndexReader.
|
| 64 |
NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
|
| 65 |
-->
|
| 66 |
<!--<luceneAutoCommit>false</luceneAutoCommit>-->
|
| 67 |
<!--
|
| 68 |
Expert:
|
| 69 |
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
|
| 70 |
versions used LogDocMergePolicy.
|
| 71 |
|
| 72 |
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
|
| 73 |
to merge based on number of documents
|
| 74 |
|
| 75 |
Other implementations of MergePolicy must have a no-argument constructor
|
| 76 |
-->
|
| 77 |
<!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
|
| 78 |
|
| 79 |
<!--
|
| 80 |
Expert:
|
| 81 |
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
| 82 |
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
|
| 83 |
-->
|
| 84 |
<!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
|
| 85 |
|
| 86 |
<!--
|
| 87 |
This option specifies which Lucene LockFactory implementation to use.
|
| 88 |
|
| 89 |
single = SingleInstanceLockFactory - suggested for a read-only index
|
| 90 |
or when there is no possibility of another process trying
|
| 91 |
to modify the index.
|
| 92 |
native = NativeFSLockFactory
|
| 93 |
simple = SimpleFSLockFactory
|
| 94 |
|
| 95 |
(For backwards compatibility with Solr 1.2, 'simple' is the default
|
| 96 |
if not specified.)
|
| 97 |
-->
|
| 98 |
<lockType>single</lockType>
|
| 99 |
</indexDefaults>
|
| 100 |
|
| 101 |
<mainIndex>
|
| 102 |
<!-- options specific to the main on-disk lucene index -->
|
| 103 |
<useCompoundFile>false</useCompoundFile>
|
| 104 |
<ramBufferSizeMB>32</ramBufferSizeMB>
|
| 105 |
<mergeFactor>4</mergeFactor>
|
| 106 |
<!-- Deprecated -->
|
| 107 |
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
| 108 |
<maxMergeDocs>2147483647</maxMergeDocs>
|
| 109 |
<maxFieldLength>10000</maxFieldLength>
|
| 110 |
|
| 111 |
<!-- If true, unlock any held write or commit locks on startup.
|
| 112 |
This defeats the locking mechanism that allows multiple
|
| 113 |
processes to safely access a lucene index, and should be
|
| 114 |
used with care.
|
| 115 |
This is not needed if lock type is 'none' or 'single'
|
| 116 |
-->
|
| 117 |
<unlockOnStartup>false</unlockOnStartup>
|
| 118 |
|
| 119 |
<!--
|
| 120 |
Custom deletion policies can specified here. The class must
|
| 121 |
implement org.apache.lucene.index.IndexDeletionPolicy.
|
| 122 |
|
| 123 |
http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
|
| 124 |
|
| 125 |
The standard Solr IndexDeletionPolicy implementation supports deleting
|
| 126 |
index commit points on number of commits, age of commit point and
|
| 127 |
optimized status.
|
| 128 |
|
| 129 |
The latest commit point should always be preserved regardless
|
| 130 |
of the criteria.
|
| 131 |
-->
|
| 132 |
<deletionPolicy class="solr.SolrDeletionPolicy">
|
| 133 |
<!-- Keep only optimized commit points -->
|
| 134 |
<str name="keepOptimizedOnly">false</str>
|
| 135 |
<!-- The maximum number of commit points to be kept -->
|
| 136 |
<str name="maxCommitsToKeep">1</str>
|
| 137 |
<!--
|
| 138 |
Delete all commit points once they have reached the given age.
|
| 139 |
Supports DateMathParser syntax e.g.
|
| 140 |
|
| 141 |
<str name="maxCommitAge">30MINUTES</str>
|
| 142 |
<str name="maxCommitAge">1DAY</str>
|
| 143 |
-->
|
| 144 |
</deletionPolicy>
|
| 145 |
|
| 146 |
</mainIndex>
|
| 147 |
|
| 148 |
<!-- Enables JMX if and only if an existing MBeanServer is found, use
|
| 149 |
this if you want to configure JMX through JVM parameters. Remove
|
| 150 |
this to disable exposing Solr configuration and statistics to JMX.
|
| 151 |
|
| 152 |
If you want to connect to a particular server, specify the agentId
|
| 153 |
e.g. <jmx agentId="myAgent" />
|
| 154 |
|
| 155 |
If you want to start a new MBeanServer, specify the serviceUrl
|
| 156 |
e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
|
| 157 |
|
| 158 |
For more details see http://wiki.apache.org/solr/SolrJmx
|
| 159 |
-->
|
| 160 |
<jmx />
|
| 161 |
|
| 162 |
<!-- the default high-performance update handler -->
|
| 163 |
<updateHandler class="solr.DirectUpdateHandler2">
|
| 164 |
|
| 165 |
<!-- A prefix of "solr." for class names is an alias that
|
| 166 |
causes solr to search appropriate packages, including
|
| 167 |
org.apache.solr.(search|update|request|core|analysis)
|
| 168 |
-->
|
| 169 |
|
| 170 |
<!-- Perform a <commit/> automatically under certain conditions:
|
| 171 |
maxDocs - number of updates since last commit is greater than this
|
| 172 |
maxTime - oldest uncommited update (in ms) is this long ago
|
| 173 |
-->
|
| 174 |
<autoCommit>
|
| 175 |
<maxDocs>2000</maxDocs>
|
| 176 |
<maxTime>120000</maxTime>
|
| 177 |
</autoCommit>
|
| 178 |
|
| 179 |
|
| 180 |
<!-- The RunExecutableListener executes an external command.
|
| 181 |
exe - the name of the executable to run
|
| 182 |
dir - dir to use as the current working directory. default="."
|
| 183 |
wait - the calling thread waits until the executable returns. default="true"
|
| 184 |
args - the arguments to pass to the program. default=nothing
|
| 185 |
env - environment variables to set. default=nothing
|
| 186 |
-->
|
| 187 |
<!-- A postCommit event is fired after every commit or optimize command
|
| 188 |
<listener event="postCommit" class="solr.RunExecutableListener">
|
| 189 |
<str name="exe">solr/bin/snapshooter</str>
|
| 190 |
<str name="dir">.</str>
|
| 191 |
<bool name="wait">true</bool>
|
| 192 |
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
| 193 |
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
| 194 |
</listener>
|
| 195 |
-->
|
| 196 |
<!-- A postOptimize event is fired only after every optimize command, useful
|
| 197 |
in conjunction with index distribution to only distribute optimized indicies
|
| 198 |
<listener event="postOptimize" class="solr.RunExecutableListener">
|
| 199 |
<str name="exe">snapshooter</str>
|
| 200 |
<str name="dir">solr/bin</str>
|
| 201 |
<bool name="wait">true</bool>
|
| 202 |
</listener>
|
| 203 |
-->
|
| 204 |
|
| 205 |
</updateHandler>
|
| 206 |
|
| 207 |
|
| 208 |
<query>
|
| 209 |
<!-- Maximum number of clauses in a boolean query... can affect
|
| 210 |
range or prefix queries that expand to big boolean
|
| 211 |
queries. An exception is thrown if exceeded. -->
|
| 212 |
<maxBooleanClauses>1024</maxBooleanClauses>
|
| 213 |
|
| 214 |
|
| 215 |
<!-- There are two implementations of cache available for Solr,
|
| 216 |
LRUCache, based on a synchronized LinkedHashMap, and
|
| 217 |
FastLRUCache, based on a ConcurrentHashMap. FastLRUCache has faster gets
|
| 218 |
and slower puts in single threaded operation and thus is generally faster
|
| 219 |
than LRUCache when the hit ratio of the cache is high (> 75%), and may be
|
| 220 |
faster under other scenarios on multi-cpu systems. -->
|
| 221 |
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
|
| 222 |
unordered sets of *all* documents that match a query.
|
| 223 |
When a new searcher is opened, its caches may be prepopulated
|
| 224 |
or "autowarmed" using data from caches in the old searcher.
|
| 225 |
autowarmCount is the number of items to prepopulate. For LRUCache,
|
| 226 |
the autowarmed items will be the most recently accessed items.
|
| 227 |
Parameters:
|
| 228 |
class - the SolrCache implementation LRUCache or FastLRUCache
|
| 229 |
size - the maximum number of entries in the cache
|
| 230 |
initialSize - the initial capacity (number of entries) of
|
| 231 |
the cache. (seel java.util.HashMap)
|
| 232 |
autowarmCount - the number of entries to prepopulate from
|
| 233 |
and old cache.
|
| 234 |
-->
|
| 235 |
<filterCache
|
| 236 |
class="solr.FastLRUCache"
|
| 237 |
size="512"
|
| 238 |
initialSize="512"
|
| 239 |
autowarmCount="128"/>
|
| 240 |
|
| 241 |
<!-- Cache used to hold field values that are quickly accessible
|
| 242 |
by document id. The fieldValueCache is created by default
|
| 243 |
even if not configured here.
|
| 244 |
<fieldValueCache
|
| 245 |
class="solr.FastLRUCache"
|
| 246 |
size="512"
|
| 247 |
autowarmCount="128"
|
| 248 |
showItems="32"
|
| 249 |
/>
|
| 250 |
-->
|
| 251 |
|
| 252 |
<!-- queryResultCache caches results of searches - ordered lists of
|
| 253 |
document ids (DocList) based on a query, a sort, and the range
|
| 254 |
of documents requested. -->
|
| 255 |
<queryResultCache
|
| 256 |
class="solr.LRUCache"
|
| 257 |
size="512"
|
| 258 |
initialSize="512"
|
| 259 |
autowarmCount="32"/>
|
| 260 |
|
| 261 |
<!-- documentCache caches Lucene Document objects (the stored fields for each document).
|
| 262 |
Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
|
| 263 |
<documentCache
|
| 264 |
class="solr.LRUCache"
|
| 265 |
size="512"
|
| 266 |
initialSize="512"
|
| 267 |
autowarmCount="0"/>
|
| 268 |
|
| 269 |
<!-- If true, stored fields that are not requested will be loaded lazily.
|
| 270 |
|
| 271 |
This can result in a significant speed improvement if the usual case is to
|
| 272 |
not load all stored fields, especially if the skipped fields are large compressed
|
| 273 |
text fields.
|
| 274 |
-->
|
| 275 |
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
| 276 |
|
| 277 |
<!-- Example of a generic cache. These caches may be accessed by name
|
| 278 |
through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
|
| 279 |
The purpose is to enable easy caching of user/application level data.
|
| 280 |
The regenerator argument should be specified as an implementation
|
| 281 |
of solr.search.CacheRegenerator if autowarming is desired. -->
|
| 282 |
<!--
|
| 283 |
<cache name="myUserCache"
|
| 284 |
class="solr.LRUCache"
|
| 285 |
size="4096"
|
| 286 |
initialSize="1024"
|
| 287 |
autowarmCount="1024"
|
| 288 |
regenerator="org.mycompany.mypackage.MyRegenerator"
|
| 289 |
/>
|
| 290 |
-->
|
| 291 |
|
| 292 |
<!-- An optimization that attempts to use a filter to satisfy a search.
|
| 293 |
If the requested sort does not include score, then the filterCache
|
| 294 |
will be checked for a filter matching the query. If found, the filter
|
| 295 |
will be used as the source of document ids, and then the sort will be
|
| 296 |
applied to that.
|
| 297 |
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
| 298 |
-->
|
| 299 |
|
| 300 |
<!-- An optimization for use with the queryResultCache. When a search
|
| 301 |
is requested, a superset of the requested number of document ids
|
| 302 |
are collected. For example, if a search for a particular query
|
| 303 |
requests matching documents 10 through 19, and queryWindowSize is 50,
|
| 304 |
then documents 0 through 49 will be collected and cached. Any further
|
| 305 |
requests in that range can be satisfied via the cache. -->
|
| 306 |
<queryResultWindowSize>50</queryResultWindowSize>
|
| 307 |
|
| 308 |
<!-- Maximum number of documents to cache for any entry in the
|
| 309 |
queryResultCache. -->
|
| 310 |
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
| 311 |
|
| 312 |
<!-- This entry enables an int hash representation for filters (DocSets)
|
| 313 |
when the number of items in the set is less than maxSize. For smaller
|
| 314 |
sets, this representation is more memory efficient, more efficient to
|
| 315 |
iterate over, and faster to take intersections. -->
|
| 316 |
<HashDocSet maxSize="3000" loadFactor="0.75"/>
|
| 317 |
|
| 318 |
<!-- a newSearcher event is fired whenever a new searcher is being prepared
|
| 319 |
and there is a current searcher handling requests (aka registered). -->
|
| 320 |
<!-- QuerySenderListener takes an array of NamedList and executes a
|
| 321 |
local query request for each NamedList in sequence. -->
|
| 322 |
<listener event="newSearcher" class="solr.QuerySenderListener">
|
| 323 |
<arr name="queries">
|
| 324 |
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
| 325 |
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
| 326 |
<lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
|
| 327 |
</arr>
|
| 328 |
</listener>
|
| 329 |
|
| 330 |
<!-- a firstSearcher event is fired whenever a new searcher is being
|
| 331 |
prepared but there is no current registered searcher to handle
|
| 332 |
requests or to gain autowarming data from. -->
|
| 333 |
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
| 334 |
<arr name="queries">
|
| 335 |
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
| 336 |
<lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
|
| 337 |
</arr>
|
| 338 |
</listener>
|
| 339 |
|
| 340 |
<!-- If a search request comes in and there is no current registered searcher,
|
| 341 |
then immediately register the still warming searcher and use it. If
|
| 342 |
"false" then all requests will block until the first searcher is done
|
| 343 |
warming. -->
|
| 344 |
<useColdSearcher>false</useColdSearcher>
|
| 345 |
|
| 346 |
<!-- Maximum number of searchers that may be warming in the background
|
| 347 |
concurrently. An error is returned if this limit is exceeded. Recommend
|
| 348 |
1-2 for read-only slaves, higher for masters w/o cache warming. -->
|
| 349 |
<maxWarmingSearchers>2</maxWarmingSearchers>
|
| 350 |
|
| 351 |
</query>
|
| 352 |
|
| 353 |
<!--
|
| 354 |
Let the dispatch filter handler /select?qt=XXX
|
| 355 |
handleSelect=true will use consistent error handling for /select and /update
|
| 356 |
handleSelect=false will use solr1.1 style error formatting
|
| 357 |
-->
|
| 358 |
<requestDispatcher handleSelect="true" >
|
| 359 |
<!--Make sure your system has some authentication before enabling remote streaming! -->
|
| 360 |
<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
|
| 361 |
|
| 362 |
<!-- Set HTTP caching related parameters (for proxy caches and clients).
|
| 363 |
|
| 364 |
To get the behaviour of Solr 1.2 (ie: no caching related headers)
|
| 365 |
use the never304="true" option and do not specify a value for
|
| 366 |
<cacheControl>
|
| 367 |
-->
|
| 368 |
<!-- <httpCaching never304="true"> -->
|
| 369 |
<httpCaching lastModifiedFrom="openTime"
|
| 370 |
etagSeed="Solr">
|
| 371 |
<!-- lastModFrom="openTime" is the default, the Last-Modified value
|
| 372 |
(and validation against If-Modified-Since requests) will all be
|
| 373 |
relative to when the current Searcher was opened.
|
| 374 |
You can change it to lastModFrom="dirLastMod" if you want the
|
| 375 |
value to exactly corrispond to when the physical index was last
|
| 376 |
modified.
|
| 377 |
|
| 378 |
etagSeed="..." is an option you can change to force the ETag
|
| 379 |
header (and validation against If-None-Match requests) to be
|
| 380 |
differnet even if the index has not changed (ie: when making
|
| 381 |
significant changes to your config file)
|
| 382 |
|
| 383 |
lastModifiedFrom and etagSeed are both ignored if you use the
|
| 384 |
never304="true" option.
|
| 385 |
-->
|
| 386 |
<!-- If you include a <cacheControl> directive, it will be used to
|
| 387 |
generate a Cache-Control header, as well as an Expires header
|
| 388 |
if the value contains "max-age="
|
| 389 |
|
| 390 |
By default, no Cache-Control header is generated.
|
| 391 |
|
| 392 |
You can use the <cacheControl> option even if you have set
|
| 393 |
never304="true"
|
| 394 |
-->
|
| 395 |
<!-- <cacheControl>max-age=30, public</cacheControl> -->
|
| 396 |
</httpCaching>
|
| 397 |
</requestDispatcher>
|
| 398 |
|
| 399 |
|
| 400 |
<!-- requestHandler plugins... incoming queries will be dispatched to the
|
| 401 |
correct handler based on the path or the qt (query type) param.
|
| 402 |
Names starting with a '/' are accessed with the a path equal to the
|
| 403 |
registered name. Names without a leading '/' are accessed with:
|
| 404 |
http://host/app/select?qt=name
|
| 405 |
If no qt is defined, the requestHandler that declares default="true"
|
| 406 |
will be used.
|
| 407 |
-->
|
| 408 |
<requestHandler name="standard" class="solr.SearchHandler">
|
| 409 |
<!-- default values for query parameters -->
|
| 410 |
<lst name="defaults">
|
| 411 |
<str name="echoParams">explicit</str>
|
| 412 |
<!--
|
| 413 |
<int name="rows">10</int>
|
| 414 |
<str name="fl">*</str>
|
| 415 |
<str name="version">2.1</str>
|
| 416 |
-->
|
| 417 |
</lst>
|
| 418 |
</requestHandler>
|
| 419 |
|
| 420 |
<!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
|
| 421 |
<!-- MASTER_REPLICATION_START
|
| 422 |
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
| 423 |
<lst name="master">
|
| 424 |
<str name="replicateAfter">commit</str>
|
| 425 |
<str name="replicateAfter">startup</str>
|
| 426 |
<str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str>
|
| 427 |
</lst>
|
| 428 |
</requestHandler>
|
| 429 |
MASTER_REPLICATION_END -->
|
| 430 |
|
| 431 |
<!-- SLAVE_REPLICATION_START
|
| 432 |
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
| 433 |
<lst name="slave">
|
| 434 |
<str name="masterUrl">$MASTER_CORE_URL/replication</str>
|
| 435 |
<str name="pollInterval">$POLL_TIME</str>
|
| 436 |
</lst>
|
| 437 |
</requestHandler>
|
| 438 |
SLAVE_REPLICATION_END -->
|
| 439 |
|
| 440 |
<!-- DisMaxRequestHandler allows easy searching across multiple fields
|
| 441 |
for simple user-entered phrases. It's implementation is now
|
| 442 |
just the standard SearchHandler with a default query type
|
| 443 |
of "dismax".
|
| 444 |
see http://wiki.apache.org/solr/DisMaxRequestHandler
|
| 445 |
-->
|
| 446 |
<requestHandler name="dismax" class="solr.SearchHandler">
|
| 447 |
<lst name="defaults">
|
| 448 |
<str name="defType">dismax</str>
|
| 449 |
<str name="echoParams">explicit</str>
|
| 450 |
</lst>
|
| 451 |
</requestHandler>
|
| 452 |
|
| 453 |
<!-- Note how you can register the same handler multiple times with
|
| 454 |
different names (and different init parameters)
|
| 455 |
-->
|
| 456 |
<requestHandler name="partitioned" class="solr.SearchHandler" default="true">
|
| 457 |
<lst name="defaults">
|
| 458 |
<str name="defType">dismax</str>
|
| 459 |
<str name="echoParams">explicit</str>
|
| 460 |
<float name="tie">0.01</float>
|
| 461 |
<str name="qf">
|
| 462 |
body^40.0 title^5.0 name^3.0 taxonomy_names^2.0 tags_h1^5.0 tags_h2_h3^3.0 tags_h4_h5_h6^2.0 tags_inline^1.0
|
| 463 |
</str>
|
| 464 |
<str name="pf">
|
| 465 |
body^2.0
|
| 466 |
</str>
|
| 467 |
<int name="ps">15</int>
|
| 468 |
<!-- Abort any searches longer than 4 seconds -->
|
| 469 |
<!-- <int name="timeAllowed">4000</int> -->
|
| 470 |
<str name="mm">
|
| 471 |
2<-35%
|
| 472 |
</str>
|
| 473 |
<str name="q.alt">*:*</str>
|
| 474 |
|
| 475 |
<!-- example highlighter config, enable per-query with hl=true -->
|
| 476 |
<str name="hl">true</str>
|
| 477 |
<str name="hl.fl">body</str>
|
| 478 |
<int name="hl.snippets">3</int>
|
| 479 |
<str name="hl.mergeContiguous">true</str>
|
| 480 |
<!-- instructs Solr to return the field itself if no query terms are
|
| 481 |
found -->
|
| 482 |
<str name="f.body.hl.alternateField">body</str>
|
| 483 |
<str name="f.body.hl.maxAlternateFieldLength">256</str>
|
| 484 |
<!-- JS: I wasn't getting good results here... I'm turning off for now
|
| 485 |
because I was getting periods (.) by themselves at the begining of
|
| 486 |
snippets and don't feel like deubgging anymore. Without the regex is
|
| 487 |
faster too -->
|
| 488 |
<!--<str name="f.body.hl.fragmenter">regex</str>--> <!-- defined below -->
|
| 489 |
|
| 490 |
<!-- By default, don't spell check -->
|
| 491 |
<str name="spellcheck">false</str>
|
| 492 |
<!-- Defaults for the spell checker when used -->
|
| 493 |
<str name="spellcheck.onlyMorePopular">true</str>
|
| 494 |
<str name="spellcheck.extendedResults">false</str>
|
| 495 |
<!-- The number of suggestions to return -->
|
| 496 |
<str name="spellcheck.count">1</str>
|
| 497 |
</lst>
|
| 498 |
<arr name="last-components">
|
| 499 |
<str>spellcheck</str>
|
| 500 |
</arr>
|
| 501 |
</requestHandler>
|
| 502 |
|
| 503 |
<!-- The more like this handler offers many advantages over the standard handler,
|
| 504 |
when performing moreLikeThis requests.-->
|
| 505 |
<requestHandler name="mlt" class="solr.MoreLikeThisHandler">
|
| 506 |
<lst name="defaults">
|
| 507 |
<str name="mlt.mintf">1</str>
|
| 508 |
<str name="mlt.mindf">1</str>
|
| 509 |
<str name="mlt.minwl">3</str>
|
| 510 |
<str name="mlt.maxwl">15</str>
|
| 511 |
<str name="mlt.maxqt">20</str>
|
| 512 |
<str name="mlt.match.include">false</str>
|
| 513 |
<!-- Abort any searches longer than 1.5 seconds -->
|
| 514 |
<!-- <int name="timeAllowed">1500</int> -->
|
| 515 |
</lst>
|
| 516 |
</requestHandler>
|
| 517 |
|
| 518 |
|
| 519 |
<!--
|
| 520 |
Search components are registered to SolrCore and used by Search Handlers
|
| 521 |
|
| 522 |
By default, the following components are avaliable:
|
| 523 |
|
| 524 |
<searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
|
| 525 |
<searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
|
| 526 |
<searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
|
| 527 |
<searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
|
| 528 |
<searchComponent name="stats" class="org.apache.solr.handler.component.StatsComponent" />
|
| 529 |
<searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
|
| 530 |
|
| 531 |
Default configuration in a requestHandler would look like:
|
| 532 |
<arr name="components">
|
| 533 |
<str>query</str>
|
| 534 |
<str>facet</str>
|
| 535 |
<str>mlt</str>
|
| 536 |
<str>highlight</str>
|
| 537 |
<str>stats</str>
|
| 538 |
<str>debug</str>
|
| 539 |
</arr>
|
| 540 |
|
| 541 |
If you register a searchComponent to one of the standard names, that will be used instead.
|
| 542 |
To insert components before or after the 'standard' components, use:
|
| 543 |
|
| 544 |
<arr name="first-components">
|
| 545 |
<str>myFirstComponentName</str>
|
| 546 |
</arr>
|
| 547 |
|
| 548 |
<arr name="last-components">
|
| 549 |
<str>myLastComponentName</str>
|
| 550 |
</arr>
|
| 551 |
-->
|
| 552 |
|
| 553 |
<!-- The spell check component can return a list of alternative spelling
|
| 554 |
suggestions. -->
|
| 555 |
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
| 556 |
|
| 557 |
<str name="queryAnalyzerFieldType">textSpell</str>
|
| 558 |
|
| 559 |
<lst name="spellchecker">
|
| 560 |
<str name="name">default</str>
|
| 561 |
<str name="field">spell</str>
|
| 562 |
<str name="spellcheckIndexDir">./spellchecker1</str>
|
| 563 |
<str name="buildOnOptimize">true</str>
|
| 564 |
</lst>
|
| 565 |
<lst name="spellchecker">
|
| 566 |
<str name="name">jarowinkler</str>
|
| 567 |
<str name="field">spell</str>
|
| 568 |
<!-- Use a different Distance Measure -->
|
| 569 |
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
|
| 570 |
<str name="spellcheckIndexDir">./spellchecker2</str>
|
| 571 |
<str name="buildOnOptimize">true</str>
|
| 572 |
</lst>
|
| 573 |
|
| 574 |
</searchComponent>
|
| 575 |
|
| 576 |
<!-- a search component that enables you to configure the top results for
|
| 577 |
a given query regardless of the normal lucene scoring.-->
|
| 578 |
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
| 579 |
<!-- pick a fieldType to analyze queries -->
|
| 580 |
<str name="queryFieldType">string</str>
|
| 581 |
<str name="config-file">elevate.xml</str>
|
| 582 |
</searchComponent>
|
| 583 |
|
| 584 |
<!-- a request handler utilizing the elevator component -->
|
| 585 |
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
| 586 |
<lst name="defaults">
|
| 587 |
<str name="echoParams">explicit</str>
|
| 588 |
</lst>
|
| 589 |
<arr name="last-components">
|
| 590 |
<str>elevator</str>
|
| 591 |
</arr>
|
| 592 |
</requestHandler>
|
| 593 |
|
| 594 |
|
| 595 |
<!-- Update request handler.
|
| 596 |
|
| 597 |
Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
|
| 598 |
the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
|
| 599 |
The response format differs from solr1.1 formatting and returns a standard error code.
|
| 600 |
|
| 601 |
To enable solr1.1 behavior, remove the /update handler or change its path
|
| 602 |
-->
|
| 603 |
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
|
| 604 |
|
| 605 |
<!--
|
| 606 |
Analysis request handler. Since Solr 1.3. Use to returnhow a document is analyzed. Useful
|
| 607 |
for debugging and as a token server for other types of applications
|
| 608 |
-->
|
| 609 |
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
| 610 |
|
| 611 |
|
| 612 |
<!-- CSV update handler, loaded on demand -->
|
| 613 |
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
|
| 614 |
|
| 615 |
|
| 616 |
<!--
|
| 617 |
Admin Handlers - This will register all the standard admin RequestHandlers. Adding
|
| 618 |
this single handler is equivalent to registering:
|
| 619 |
|
| 620 |
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
| 621 |
<requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
| 622 |
<requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
| 623 |
<requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
| 624 |
<requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
| 625 |
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
| 626 |
|
| 627 |
If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
| 628 |
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
| 629 |
<lst name="invariants">
|
| 630 |
<str name="hidden">synonyms.txt</str>
|
| 631 |
<str name="hidden">anotherfile.txt</str>
|
| 632 |
</lst>
|
| 633 |
</requestHandler>
|
| 634 |
-->
|
| 635 |
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
| 636 |
|
| 637 |
<!-- ping/healthcheck -->
|
| 638 |
<requestHandler name="/admin/ping" class="PingRequestHandler">
|
| 639 |
<lst name="defaults">
|
| 640 |
<str name="qt">standard</str>
|
| 641 |
<str name="q">solrpingquery</str>
|
| 642 |
<str name="echoParams">all</str>
|
| 643 |
</lst>
|
| 644 |
</requestHandler>
|
| 645 |
|
| 646 |
<!-- Echo the request contents back to the client -->
|
| 647 |
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
| 648 |
<lst name="defaults">
|
| 649 |
<str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
|
| 650 |
<str name="echoHandler">true</str>
|
| 651 |
</lst>
|
| 652 |
</requestHandler>
|
| 653 |
|
| 654 |
<highlighting>
|
| 655 |
<!-- Configure the standard fragmenter -->
|
| 656 |
<!-- This could most likely be commented out in the "default" case -->
|
| 657 |
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
|
| 658 |
<lst name="defaults">
|
| 659 |
<int name="hl.fragsize">100</int>
|
| 660 |
</lst>
|
| 661 |
</fragmenter>
|
| 662 |
|
| 663 |
<!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
|
| 664 |
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
|
| 665 |
<lst name="defaults">
|
| 666 |
<!-- slightly smaller fragsizes work better because of slop -->
|
| 667 |
<int name="hl.fragsize">70</int>
|
| 668 |
<!-- allow 50% slop on fragment sizes -->
|
| 669 |
<float name="hl.regex.slop">0.5</float>
|
| 670 |
<!-- a basic sentence pattern -->
|
| 671 |
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
| 672 |
</lst>
|
| 673 |
</fragmenter>
|
| 674 |
|
| 675 |
<!-- Configure the standard formatter -->
|
| 676 |
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
|
| 677 |
<lst name="defaults">
|
| 678 |
<str name="hl.simple.pre"><![CDATA[<strong>]]></str>
|
| 679 |
<str name="hl.simple.post"><![CDATA[</strong>]]></str>
|
| 680 |
</lst>
|
| 681 |
</formatter>
|
| 682 |
</highlighting>
|
| 683 |
|
| 684 |
|
| 685 |
<!-- queryResponseWriter plugins... query responses will be written using the
|
| 686 |
writer specified by the 'wt' request parameter matching the name of a registered
|
| 687 |
writer.
|
| 688 |
The "default" writer is the default and will be used if 'wt' is not specified
|
| 689 |
in the request. XMLResponseWriter will be used if nothing is specified here.
|
| 690 |
The json, python, and ruby writers are also available by default.
|
| 691 |
|
| 692 |
<queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
|
| 693 |
<queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
|
| 694 |
<queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
|
| 695 |
<queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
|
| 696 |
<queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
|
| 697 |
<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
|
| 698 |
|
| 699 |
<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
|
| 700 |
-->
|
| 701 |
|
| 702 |
<!-- XSLT response writer transforms the XML output by any xslt file found
|
| 703 |
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
| 704 |
every xsltCacheLifetimeSeconds.
|
| 705 |
-->
|
| 706 |
<queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
|
| 707 |
<int name="xsltCacheLifetimeSeconds">5</int>
|
| 708 |
</queryResponseWriter>
|
| 709 |
|
| 710 |
|
| 711 |
<!-- example of registering a query parser
|
| 712 |
<queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
|
| 713 |
-->
|
| 714 |
|
| 715 |
<!-- example of registering a custom function parser
|
| 716 |
<valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
|
| 717 |
-->
|
| 718 |
|
| 719 |
<!-- config for the admin interface -->
|
| 720 |
<admin>
|
| 721 |
<defaultQuery>solr</defaultQuery>
|
| 722 |
|
| 723 |
<!-- configure a healthcheck file for servers behind a loadbalancer
|
| 724 |
<healthcheck type="file">server-enabled</healthcheck>
|
| 725 |
-->
|
| 726 |
</admin>
|
| 727 |
|
| 728 |
</config>
|