1 <?xml version="1.0" encoding="UTF-8" ?>
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
10 http://www.apache.org/licenses/LICENSE-2.0
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.
20 For more details about configurations options that may appear in
21 this file, see http://wiki.apache.org/solr/SolrConfigXml.
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)
28 You may also specify a fully qualified Java classname if you
29 have your own custom plugins.
32 <!-- Controls what version of Lucene various components of Solr
33 adhere to. Generally, you want to use the latest version to
34 get all bug fixes and improvements. It is highly recommended
35 that you fully re-index after changing this setting as it can
36 affect both how text is indexed and queried.
38 <luceneMatchVersion>4.4</luceneMatchVersion>
40 <!-- <lib/> directives can be used to instruct Solr to load an Jars
41 identified and use them to resolve any "plugins" specified in
42 your solrconfig.xml or schema.xml (ie: Analyzers, Request
45 All directories and paths are resolved relative to the
48 Please note that <lib/> directives are processed in the order
49 that they appear in your solrconfig.xml file, and are "stacked"
50 on top of each other when building a ClassLoader - so if you have
51 plugin jars with dependencies on other jars, the "lower level"
52 dependency jars should be loaded first.
54 If a "./lib" directory exists in your instanceDir, all files
55 found in it are included as if you had used the following
61 <!-- A 'dir' option by itself adds any files found in the directory
62 to the classpath, this is useful for including all jars in a
65 When a 'regex' is specified in addition to a 'dir', only the
66 files in that directory which completely match the regex
67 (anchored on both ends) will be included.
69 If a 'dir' option (with or without a regex) is used and nothing
70 is found that matches, a warning will be logged.
72 The examples below can be used to load some solr-contribs along
73 with their external dependencies.
76 <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
77 <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
79 <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
80 <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
82 <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
83 <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
85 <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
86 <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
88 <!-- an exact 'path' can be used instead of a 'dir' to specify a
89 specific jar file. This will cause a serious error to be logged
90 if it can't be loaded.
93 <lib path="../a-jar-that-does-not-exist.jar" />
98 Used to specify an alternate directory to hold all index data
99 other than the default ./data under the Solr home. If
100 replication is in use, this should match the replication
103 <dataDir>${solr.data.dir:/var/lib/masterkey/lui/solr4/slave}</dataDir>
106 <!-- The DirectoryFactory to use for indexes.
108 solr.StandardDirectoryFactory is filesystem
109 based and tries to pick the best implementation for the current
110 JVM and platform. solr.NRTCachingDirectoryFactory, the default,
111 wraps solr.StandardDirectoryFactory and caches small files in memory
112 for better NRT performance.
114 One can force a particular implementation via solr.MMapDirectoryFactory,
115 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
117 solr.RAMDirectoryFactory is memory based, not
118 persistent, and doesn't work with replication.
120 <directoryFactory name="DirectoryFactory"
121 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
123 <!-- The CodecFactory for defining the format of the inverted index.
124 The default implementation is SchemaCodecFactory, which is the official Lucene
125 index format, but hooks into the schema to provide per-field customization of
126 the postings lists and per-document values in the fieldType element
127 (postingsFormat/docValuesFormat). Note that most of the alternative implementations
128 are experimental, so if you choose to customize the index format, its a good
129 idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
130 before upgrading to a newer version to avoid unnecessary reindexing.
132 <codecFactory class="solr.SchemaCodecFactory"/>
134 <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
136 <schemaFactory class="ManagedIndexSchemaFactory">
137 <bool name="mutable">true</bool>
138 <str name="managedSchemaResourceName">managed-schema</str>
141 When ManagedIndexSchemaFactory is specified, Solr will load the schema from
142 he resource named in 'managedSchemaResourceName', rather than from schema.xml.
143 Note that the managed schema resource CANNOT be named schema.xml. If the managed
144 schema does not exist, Solr will create it after reading schema.xml, then rename
145 'schema.xml' to 'schema.xml.bak'.
147 Do NOT hand edit the managed schema - external modifications will be ignored and
148 overwritten as a result of schema modification REST API calls.
150 When ManagedIndexSchemaFactory is specified with mutable = true, schema
151 modification REST API calls will be allowed; otherwise, error responses will be
152 sent back for these requests.
154 <schemaFactory class="ClassicIndexSchemaFactory"/>
156 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
157 Index Config - These settings control low-level behavior of indexing
158 Most example settings here show the default value, but are commented
159 out, to more easily see where customizations have been made.
161 Note: This replaces <indexDefaults> and <mainIndex> from older versions
162 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
164 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
165 LimitTokenCountFilterFactory in your fieldType definition. E.g.
166 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
168 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
169 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
171 <!-- The maximum number of simultaneous threads that may be
172 indexing documents at once in IndexWriter; if more than this
173 many threads arrive they will wait for others to finish.
174 Default in Solr/Lucene is 8. -->
175 <!-- <maxIndexingThreads>8</maxIndexingThreads> -->
177 <!-- Expert: Enabling compound file will use less files for the index,
178 using fewer file descriptors on the expense of performance decrease.
179 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
180 <!-- <useCompoundFile>false</useCompoundFile> -->
182 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
183 indexing for buffering added documents and deletions before they are
184 flushed to the Directory.
185 maxBufferedDocs sets a limit on the number of documents buffered
187 If both ramBufferSizeMB and maxBufferedDocs is set, then
188 Lucene will flush based on whichever limit is hit first.
189 The default is 100 MB. -->
190 <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
191 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
193 <!-- Expert: Merge Policy
194 The Merge Policy in Lucene controls how merging of segments is done.
195 The default since Solr/Lucene 3.3 is TieredMergePolicy.
196 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
197 Even older versions of Lucene used LogDocMergePolicy.
200 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
201 <int name="maxMergeAtOnce">10</int>
202 <int name="segmentsPerTier">10</int>
207 The merge factor controls how many segments will get merged at a time.
208 For TieredMergePolicy, mergeFactor is a convenience parameter which
209 will set both MaxMergeAtOnce and SegmentsPerTier at once.
210 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
211 will be allowed before they are merged into one.
212 Default is 10 for both merge policies.
215 <mergeFactor>10</mergeFactor>
218 <!-- Expert: Merge Scheduler
219 The Merge Scheduler in Lucene controls how merges are
220 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
221 can perform merges in the background using separate threads.
222 The SerialMergeScheduler (Lucene 2.2 default) does not.
225 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
230 This option specifies which Lucene LockFactory implementation
233 single = SingleInstanceLockFactory - suggested for a
234 read-only index or when there is no possibility of
235 another process trying to modify the index.
236 native = NativeFSLockFactory - uses OS native file locking.
237 Do not use when multiple solr webapps in the same
238 JVM are attempting to share a single index.
239 simple = SimpleFSLockFactory - uses a plain file for locking
241 Defaults: 'native' is default for Solr3.6 and later, otherwise
242 'simple' is the default
244 More details on the nuances of each LockFactory...
245 http://wiki.apache.org/lucene-java/AvailableLockFactories
247 <lockType>${solr.lock.type:native}</lockType>
249 <!-- Unlock On Startup
251 If true, unlock any held write or commit locks on startup.
252 This defeats the locking mechanism that allows multiple
253 processes to safely access a lucene index, and should be used
254 with care. Default is "false".
256 This is not needed if lock type is 'single'
259 <unlockOnStartup>false</unlockOnStartup>
262 <!-- Expert: Controls how often Lucene loads terms into memory
263 Default is 128 and is likely good for most everyone.
265 <!-- <termIndexInterval>128</termIndexInterval> -->
267 <!-- If true, IndexReaders will be reopened (often more efficient)
268 instead of closed and then opened. Default: true
271 <reopenReaders>true</reopenReaders>
274 <!-- Commit Deletion Policy
275 Custom deletion policies can be specified here. The class must
276 implement org.apache.lucene.index.IndexDeletionPolicy.
278 The default Solr IndexDeletionPolicy implementation supports
279 deleting index commit points on number of commits, age of
280 commit point and optimized status.
282 The latest commit point should always be preserved regardless
286 <deletionPolicy class="solr.SolrDeletionPolicy">
288 <!-- The number of commit points to be kept -->
289 <!-- <str name="maxCommitsToKeep">1</str> -->
290 <!-- The number of optimized commit points to be kept -->
291 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
293 Delete all commit points once they have reached the given age.
294 Supports DateMathParser syntax e.g.
297 <str name="maxCommitAge">30MINUTES</str>
298 <str name="maxCommitAge">1DAY</str>
304 <!-- Lucene Infostream
306 To aid in advanced debugging, Lucene provides an "InfoStream"
307 of detailed information when indexing.
309 Setting the value to true will instruct the underlying Lucene
310 IndexWriter to write its info stream to solr's log. By default,
311 this is enabled here, and controlled through log4j.properties.
313 <infoStream>true</infoStream>
319 This example enables JMX if and only if an existing MBeanServer
320 is found, use this if you want to configure JMX through JVM
321 parameters. Remove this to disable exposing Solr configuration
322 and statistics to JMX.
324 For more details see http://wiki.apache.org/solr/SolrJmx
327 <!-- If you want to connect to a particular server, specify the
330 <!-- <jmx agentId="myAgent" /> -->
331 <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
332 <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
335 <!-- The default high-performance update handler -->
336 <updateHandler class="solr.DirectUpdateHandler2">
338 <!-- Enables a transaction log, used for real-time get, durability, and
339 and solr cloud replica recovery. The log can grow as big as
340 uncommitted changes to the index, so use of a hard autoCommit
341 is recommended (see below).
342 "dir" - the target directory for transaction logs, defaults to the
343 solr data directory. -->
345 <str name="dir">${solr.ulog.dir:}</str>
350 Perform a hard commit automatically under certain conditions.
351 Instead of enabling autoCommit, consider using "commitWithin"
352 when adding documents.
354 http://wiki.apache.org/solr/UpdateXmlMessages
356 maxDocs - Maximum number of documents to add since the last
357 commit before automatically triggering a new commit.
359 maxTime - Maximum amount of time in ms that is allowed to pass
360 since a document was added before automatically
361 triggering a new commit.
362 openSearcher - if false, the commit causes recent index changes
363 to be flushed to stable storage, but does not cause a new
364 searcher to be opened to make those changes visible.
366 If the updateLog is enabled, then it's highly recommended to
367 have some sort of hard autoCommit to limit the log size.
370 <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
371 <openSearcher>false</openSearcher>
374 <!-- softAutoCommit is like autoCommit except it causes a
375 'soft' commit which only ensures that changes are visible
376 but does not ensure that data is synced to disk. This is
377 faster and more near-realtime friendly than a hard commit.
381 <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
384 <!-- Update Related Event Listeners
386 Various IndexWriter related events can trigger Listeners to
389 postCommit - fired after every commit or optimize command
390 postOptimize - fired after every optimize command
392 <!-- The RunExecutableListener executes an external command from a
393 hook such as postCommit or postOptimize.
395 exe - the name of the executable to run
396 dir - dir to use as the current working directory. (default=".")
397 wait - the calling thread waits until the executable returns.
399 args - the arguments to pass to the program. (default is none)
400 env - environment variables to set. (default is none)
402 <!-- This example shows how RunExecutableListener could be used
403 with the script based replication...
404 http://wiki.apache.org/solr/CollectionDistribution
407 <listener event="postCommit" class="solr.RunExecutableListener">
408 <str name="exe">solr/bin/snapshooter</str>
409 <str name="dir">.</str>
410 <bool name="wait">true</bool>
411 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
412 <arr name="env"> <str>MYVAR=val1</str> </arr>
418 <!-- IndexReaderFactory
420 Use the following format to specify a custom IndexReaderFactory,
421 which allows for alternate IndexReader implementations.
423 ** Experimental Feature **
425 Please note - Using a custom IndexReaderFactory may prevent
426 certain other features from working. The API to
427 IndexReaderFactory may change without warning or may even be
428 removed from future releases if the problems cannot be
432 ** Features that may not work with custom IndexReaderFactory **
434 The ReplicationHandler assumes a disk-resident index. Using a
435 custom IndexReader implementation may cause incompatibility
436 with ReplicationHandler and may cause replication to not work
437 correctly. See SOLR-1366 for details.
441 <indexReaderFactory name="IndexReaderFactory" class="package.class">
442 <str name="someArg">Some Value</str>
443 </indexReaderFactory >
445 <!-- By explicitly declaring the Factory, the termIndexDivisor can
449 <indexReaderFactory name="IndexReaderFactory"
450 class="solr.StandardIndexReaderFactory">
451 <int name="setTermIndexDivisor">12</int>
452 </indexReaderFactory >
455 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
456 Query section - these settings control query time things like caches
457 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
459 <!-- Max Boolean Clauses
461 Maximum number of clauses in each BooleanQuery, an exception
462 is thrown if exceeded.
466 This option actually modifies a global Lucene property that
467 will affect all SolrCores. If multiple solrconfig.xml files
468 disagree on this property, the value at any given moment will
469 be based on the last SolrCore to be initialized.
472 <maxBooleanClauses>1024</maxBooleanClauses>
475 <!-- Solr Internal Query Caches
477 There are two implementations of cache available for Solr,
478 LRUCache, based on a synchronized LinkedHashMap, and
479 FastLRUCache, based on a ConcurrentHashMap.
481 FastLRUCache has faster gets and slower puts in single
482 threaded operation and thus is generally faster than LRUCache
483 when the hit ratio of the cache is high (> 75%), and may be
484 faster under other scenarios on multi-cpu systems.
489 Cache used by SolrIndexSearcher for filters (DocSets),
490 unordered sets of *all* documents that match a query. When a
491 new searcher is opened, its caches may be prepopulated or
492 "autowarmed" using data from caches in the old searcher.
493 autowarmCount is the number of items to prepopulate. For
494 LRUCache, the autowarmed items will be the most recently
498 class - the SolrCache implementation LRUCache or
499 (LRUCache or FastLRUCache)
500 size - the maximum number of entries in the cache
501 initialSize - the initial capacity (number of entries) of
502 the cache. (see java.util.HashMap)
503 autowarmCount - the number of entries to prepopulate from
506 <filterCache class="solr.FastLRUCache"
511 <!-- Query Result Cache
513 Caches results of searches - ordered lists of document ids
514 (DocList) based on a query, a sort, and the range of documents requested.
516 <queryResultCache class="solr.LRUCache"
523 Caches Lucene Document objects (the stored fields for each
524 document). Since Lucene internal document ids are transient,
525 this cache will not be autowarmed.
527 <documentCache class="solr.LRUCache"
532 <!-- Field Value Cache
534 Cache used to hold field values that are quickly accessible
535 by document id. The fieldValueCache is created by default
536 even if not configured here.
539 <fieldValueCache class="solr.FastLRUCache"
547 Example of a generic cache. These caches may be accessed by
548 name through SolrIndexSearcher.getCache(),cacheLookup(), and
549 cacheInsert(). The purpose is to enable easy caching of
550 user/application level data. The regenerator argument should
551 be specified as an implementation of solr.CacheRegenerator
552 if autowarming is desired.
555 <cache name="myUserCache"
556 class="solr.LRUCache"
560 regenerator="com.mycompany.MyRegenerator"
565 <!-- Lazy Field Loading
567 If true, stored fields that are not requested will be loaded
568 lazily. This can result in a significant speed improvement
569 if the usual case is to not load all stored fields,
570 especially if the skipped fields are large compressed text
573 <enableLazyFieldLoading>true</enableLazyFieldLoading>
575 <!-- Use Filter For Sorted Query
577 A possible optimization that attempts to use a filter to
578 satisfy a search. If the requested sort does not include
579 score, then the filterCache will be checked for a filter
580 matching the query. If found, the filter will be used as the
581 source of document ids, and then the sort will be applied to
584 For most situations, this will not be useful unless you
585 frequently get the same search repeatedly with different sort
586 options, and none of them ever use "score"
589 <useFilterForSortedQuery>true</useFilterForSortedQuery>
592 <!-- Result Window Size
594 An optimization for use with the queryResultCache. When a search
595 is requested, a superset of the requested number of document ids
596 are collected. For example, if a search for a particular query
597 requests matching documents 10 through 19, and queryWindowSize is 50,
598 then documents 0 through 49 will be collected and cached. Any further
599 requests in that range can be satisfied via the cache.
601 <queryResultWindowSize>20</queryResultWindowSize>
603 <!-- Maximum number of documents to cache for any entry in the
606 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
608 <!-- Query Related Event Listeners
610 Various IndexSearcher related events can trigger Listeners to
613 newSearcher - fired whenever a new searcher is being prepared
614 and there is a current searcher handling requests (aka
615 registered). It can be used to prime certain caches to
616 prevent long request times for certain requests.
618 firstSearcher - fired whenever a new searcher is being
619 prepared but there is no current registered searcher to handle
620 requests or to gain autowarming data from.
624 <!-- QuerySenderListener takes an array of NamedList and executes a
625 local query request for each NamedList in sequence.
627 <listener event="newSearcher" class="solr.QuerySenderListener">
630 <str name="q">database:*</str>
631 <str name="facet">true</str>
632 <str name="facet.mincount">1</str>
633 <str name="facet.field">author_exact</str>
634 <str name="facet.field">subject_exact</str>
635 <str name="facet.field">medium_exact</str>
636 <str name="facet.field">date</str>
637 <str name="facet.field">database</str>
641 <listener event="firstSearcher" class="solr.QuerySenderListener">
644 <str name="q">database:*</str>
645 <str name="facet">true</str>
646 <str name="facet.mincount">1</str>
647 <str name="facet.field">author_exact</str>
648 <str name="facet.field">subject_exact</str>
649 <str name="facet.field">medium_exact</str>
650 <str name="facet.field">date</str>
651 <str name="facet.field">database</str>
656 <!-- Use Cold Searcher
658 If a search request comes in and there is no current
659 registered searcher, then immediately register the still
660 warming searcher and use it. If "false" then all requests
661 will block until the first searcher is done warming.
663 <useColdSearcher>false</useColdSearcher>
665 <!-- Max Warming Searchers
667 Maximum number of searchers that may be warming in the
668 background concurrently. An error is returned if this limit
671 Recommend values of 1-2 for read-only slaves, higher for
672 masters w/o cache warming.
674 <maxWarmingSearchers>2</maxWarmingSearchers>
679 <!-- Request Dispatcher
681 This section contains instructions for how the SolrDispatchFilter
682 should behave when processing requests for this SolrCore.
684 handleSelect is a legacy option that affects the behavior of requests
685 such as /select?qt=XXX
687 handleSelect="true" will cause the SolrDispatchFilter to process
688 the request and dispatch the query to a handler specified by the
689 "qt" param, assuming "/select" isn't already registered.
691 handleSelect="false" will cause the SolrDispatchFilter to
692 ignore "/select" requests, resulting in a 404 unless a handler
693 is explicitly registered with the name "/select"
695 handleSelect="true" is not recommended for new users, but is the default
696 for backwards compatibility
698 <requestDispatcher handleSelect="false" >
701 These settings indicate how Solr Requests may be parsed, and
702 what restrictions may be placed on the ContentStreams from
705 enableRemoteStreaming - enables use of the stream.file
706 and stream.url parameters for specifying remote streams.
708 multipartUploadLimitInKB - specifies the max size (in KiB) of
709 Multipart File Uploads that Solr will allow in a Request.
711 formdataUploadLimitInKB - specifies the max size (in KiB) of
712 form data (application/x-www-form-urlencoded) sent via
713 POST. You can use POST to pass request parameters not
714 fitting into the URL.
716 addHttpRequestToContext - if set to true, it will instruct
717 the requestParsers to include the original HttpServletRequest
718 object in the context map of the SolrQueryRequest under the
719 key "httpRequest". It will not be used by any of the existing
720 Solr components, but may be useful when developing custom
724 The settings below authorize Solr to fetch remote files, You
725 should make sure your system has some authentication before
726 using enableRemoteStreaming="true"
729 <requestParsers enableRemoteStreaming="true"
730 multipartUploadLimitInKB="2048000"
731 formdataUploadLimitInKB="2048"
732 addHttpRequestToContext="false"/>
736 Set HTTP caching related parameters (for proxy caches and clients).
738 The options below instruct Solr not to output any HTTP Caching
741 <httpCaching never304="true" />
742 <!-- If you include a <cacheControl> directive, it will be used to
743 generate a Cache-Control header (as well as an Expires header
744 if the value contains "max-age=")
746 By default, no Cache-Control header is generated.
748 You can use the <cacheControl> option even if you have set
752 <httpCaching never304="true" >
753 <cacheControl>max-age=30, public</cacheControl>
756 <!-- To enable Solr to respond with automatically generated HTTP
757 Caching headers, and to response to Cache Validation requests
758 correctly, set the value of never304="false"
760 This will cause Solr to generate Last-Modified and ETag
761 headers based on the properties of the Index.
763 The following options can also be specified to affect the
764 values of these headers...
766 lastModFrom - the default value is "openTime" which means the
767 Last-Modified value (and validation against If-Modified-Since
768 requests) will all be relative to when the current Searcher
769 was opened. You can change it to lastModFrom="dirLastMod" if
770 you want the value to exactly correspond to when the physical
771 index was last modified.
773 etagSeed="..." is an option you can change to force the ETag
774 header (and validation against If-None-Match requests) to be
775 different even if the index has not changed (ie: when making
776 significant changes to your config file)
778 (lastModifiedFrom and etagSeed are both ignored if you use
779 the never304="true" option)
782 <httpCaching lastModifiedFrom="openTime"
784 <cacheControl>max-age=30, public</cacheControl>
789 <!-- Request Handlers
791 http://wiki.apache.org/solr/SolrRequestHandler
793 Incoming queries will be dispatched to a specific handler by name
794 based on the path specified in the request.
796 Legacy behavior: If the request path uses "/select" but no Request
797 Handler has that name, and if handleSelect="true" has been specified in
798 the requestDispatcher, then the Request Handler is dispatched based on
799 the qt parameter. Handlers without a leading '/' are accessed this way
800 like so: http://host/app/[core/]select?qt=name If no qt is
801 given, then the requestHandler that declares default="true" will be
802 used or the one named "standard".
804 If a Request Handler is declared with startup="lazy", then it will
805 not be initialized until the first request that uses it.
810 http://wiki.apache.org/solr/SearchHandler
812 For processing Search Queries, the primary Request Handler
813 provided with Solr is "SearchHandler" It delegates to a sequent
814 of SearchComponents (see below) and supports distributed
815 queries across multiple shards
817 <requestHandler name="/select" class="solr.SearchHandler">
818 <!-- default values for query parameters can be specified, these
819 will be overridden by parameters in the request
821 <lst name="defaults">
822 <str name="echoParams">explicit</str>
823 <int name="rows">10</int>
824 <str name="df">text</str>
826 <!-- In addition to defaults, "appends" params can be specified
827 to identify values which should be appended to the list of
828 multi-val params from the query (or the existing "defaults").
830 <!-- In this example, the param "fq=instock:true" would be appended to
831 any query time fq params the user may specify, as a mechanism for
832 partitioning the index, independent of any user selected filtering
833 that may also be desired (perhaps as a result of faceted searching).
835 NOTE: there is *absolutely* nothing a client can do to prevent these
836 "appends" values from being used, so don't use this mechanism
837 unless you are sure you always want it.
841 <str name="fq">inStock:true</str>
844 <!-- "invariants" are a way of letting the Solr maintainer lock down
845 the options available to Solr clients. Any params values
846 specified here are used regardless of what values may be specified
847 in either the query, the "defaults", or the "appends" params.
849 In this example, the facet.field and facet.query params would
850 be fixed, limiting the facets clients can use. Faceting is
851 not turned on by default - but if the client does specify
852 facet=true in the request, these are the only facets they
853 will be able to see counts for; regardless of what other
854 facet.field or facet.query params they may specify.
856 NOTE: there is *absolutely* nothing a client can do to prevent these
857 "invariants" values from being used, so don't use this mechanism
858 unless you are sure you always want it.
861 <lst name="invariants">
862 <str name="facet.field">cat</str>
863 <str name="facet.field">manu_exact</str>
864 <str name="facet.query">price:[* TO 500]</str>
865 <str name="facet.query">price:[500 TO *]</str>
868 <!-- If the default list of SearchComponents is not desired, that
869 list can either be overridden completely, or components can be
870 prepended or appended to the default list. (see below)
873 <arr name="components">
874 <str>nameOfCustomComponent1</str>
875 <str>nameOfCustomComponent2</str>
880 <!-- A request handler that returns indented JSON by default -->
881 <requestHandler name="/query" class="solr.SearchHandler">
882 <lst name="defaults">
883 <str name="echoParams">explicit</str>
884 <str name="wt">json</str>
885 <str name="indent">true</str>
886 <str name="df">text</str>
891 <!-- realtime get handler, guaranteed to return the latest stored fields of
892 any document, without the need to commit or open a new searcher. The
893 current implementation relies on the updateLog feature being enabled. -->
894 <requestHandler name="/get" class="solr.RealTimeGetHandler">
895 <lst name="defaults">
896 <str name="omitHeader">true</str>
897 <str name="wt">json</str>
898 <str name="indent">true</str>
903 <!-- A Robust Example
905 This example SearchHandler declaration shows off usage of the
906 SearchHandler with many defaults declared
908 Note that multiple instances of the same Request Handler
909 (SearchHandler) can be registered multiple times with different
910 names (and different init parameters)
912 <requestHandler name="/browse" class="solr.SearchHandler">
913 <lst name="defaults">
914 <str name="echoParams">explicit</str>
916 <!-- VelocityResponseWriter settings -->
917 <str name="wt">velocity</str>
918 <str name="v.template">browse</str>
919 <str name="v.layout">layout</str>
920 <str name="title">Solritas</str>
922 <!-- Query settings -->
923 <str name="defType">edismax</str>
925 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
926 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
928 <str name="df">text</str>
929 <str name="mm">100%</str>
930 <str name="q.alt">*:*</str>
931 <str name="rows">10</str>
932 <str name="fl">*,score</str>
935 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
936 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
938 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
939 <int name="mlt.count">3</int>
941 <!-- Faceting defaults -->
942 <str name="facet">on</str>
943 <str name="facet.field">cat</str>
944 <str name="facet.field">manu_exact</str>
945 <str name="facet.field">content_type</str>
946 <str name="facet.field">author_s</str>
947 <str name="facet.query">ipod</str>
948 <str name="facet.query">GB</str>
949 <str name="facet.mincount">1</str>
950 <str name="facet.pivot">cat,inStock</str>
951 <str name="facet.range.other">after</str>
952 <str name="facet.range">price</str>
953 <int name="f.price.facet.range.start">0</int>
954 <int name="f.price.facet.range.end">600</int>
955 <int name="f.price.facet.range.gap">50</int>
956 <str name="facet.range">popularity</str>
957 <int name="f.popularity.facet.range.start">0</int>
958 <int name="f.popularity.facet.range.end">10</int>
959 <int name="f.popularity.facet.range.gap">3</int>
960 <str name="facet.range">manufacturedate_dt</str>
961 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
962 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
963 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
964 <str name="f.manufacturedate_dt.facet.range.other">before</str>
965 <str name="f.manufacturedate_dt.facet.range.other">after</str>
967 <!-- Highlighting defaults -->
968 <str name="hl">on</str>
969 <str name="hl.fl">content features title name</str>
970 <str name="hl.encoder">html</str>
971 <str name="hl.simple.pre"><b></str>
972 <str name="hl.simple.post"></b></str>
973 <str name="f.title.hl.fragsize">0</str>
974 <str name="f.title.hl.alternateField">title</str>
975 <str name="f.name.hl.fragsize">0</str>
976 <str name="f.name.hl.alternateField">name</str>
977 <str name="f.content.hl.snippets">3</str>
978 <str name="f.content.hl.fragsize">200</str>
979 <str name="f.content.hl.alternateField">content</str>
980 <str name="f.content.hl.maxAlternateFieldLength">750</str>
982 <!-- Spell checking defaults -->
983 <str name="spellcheck">on</str>
984 <str name="spellcheck.extendedResults">false</str>
985 <str name="spellcheck.count">5</str>
986 <str name="spellcheck.alternativeTermCount">2</str>
987 <str name="spellcheck.maxResultsForSuggest">5</str>
988 <str name="spellcheck.collate">true</str>
989 <str name="spellcheck.collateExtendedResults">true</str>
990 <str name="spellcheck.maxCollationTries">5</str>
991 <str name="spellcheck.maxCollations">3</str>
994 <!-- append spellchecking to our list of components -->
995 <arr name="last-components">
996 <str>spellcheck</str>
1001 <!-- Update Request Handler.
1003 http://wiki.apache.org/solr/UpdateXmlMessages
1005 The canonical Request Handler for Modifying the Index through
1006 commands specified using XML, JSON, CSV, or JAVABIN
1008 Note: Since solr1.1 requestHandlers requires a valid content
1009 type header if posted in the body. For example, curl now
1010 requires: -H 'Content-type:text/xml; charset=utf-8'
1012 To override the request content type and force a specific
1013 Content-type, use the request parameter:
1014 ?update.contentType=text/csv
1016 This handler will pick a response format to match the input
1017 if the 'wt' parameter is not explicit
1019 <requestHandler name="/update" class="solr.UpdateRequestHandler">
1020 <!-- See below for information on defining
1021 updateRequestProcessorChains that can be used by name
1022 on each Update Request
1025 <lst name="defaults">
1026 <str name="update.chain">dedupe</str>
1031 <!-- for back compat with clients using /update/json and /update/csv -->
1032 <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
1033 <lst name="defaults">
1034 <str name="stream.contentType">application/json</str>
1037 <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
1038 <lst name="defaults">
1039 <str name="stream.contentType">application/csv</str>
1043 <!-- Solr Cell Update Request Handler
1045 http://wiki.apache.org/solr/ExtractingRequestHandler
1048 <requestHandler name="/update/extract"
1050 class="solr.extraction.ExtractingRequestHandler" >
1051 <lst name="defaults">
1052 <str name="lowernames">true</str>
1053 <str name="uprefix">ignored_</str>
1055 <!-- capture link hrefs but ignore div attributes -->
1056 <str name="captureAttr">true</str>
1057 <str name="fmap.a">links</str>
1058 <str name="fmap.div">ignored_</str>
1063 <!-- Field Analysis Request Handler
1065 RequestHandler that provides much the same functionality as
1066 analysis.jsp. Provides the ability to specify multiple field
1067 types and field names in the same request and outputs
1068 index-time and query-time analysis for each of them.
1070 Request parameters are:
1071 analysis.fieldname - field name whose analyzers are to be used
1073 analysis.fieldtype - field type whose analyzers are to be used
1074 analysis.fieldvalue - text for index-time analysis
1075 q (or analysis.q) - text for query time analysis
1076 analysis.showmatch (true|false) - When set to true and when
1077 query analysis is performed, the produced tokens of the
1078 field value analysis will be marked as "matched" for every
1079 token that is produces by the query analysis
1081 <requestHandler name="/analysis/field"
1083 class="solr.FieldAnalysisRequestHandler" />
1086 <!-- Document Analysis Handler
1088 http://wiki.apache.org/solr/AnalysisRequestHandler
1090 An analysis handler that provides a breakdown of the analysis
1091 process of provided documents. This handler expects a (single)
1092 content stream with the following format:
1096 <field name="id">1</field>
1097 <field name="name">The Name</field>
1098 <field name="text">The Text Value</field>
1105 Note: Each document must contain a field which serves as the
1106 unique key. This key is used in the returned response to associate
1107 an analysis breakdown to the analyzed document.
1109 Like the FieldAnalysisRequestHandler, this handler also supports
1110 query analysis by sending either an "analysis.query" or "q"
1111 request parameter that holds the query text to be analyzed. It
1112 also supports the "analysis.showmatch" parameter which when set to
1113 true, all field tokens that match the query tokens will be marked
1116 <requestHandler name="/analysis/document"
1117 class="solr.DocumentAnalysisRequestHandler"
1122 Admin Handlers - This will register all the standard admin
1125 <requestHandler name="/admin/"
1126 class="solr.admin.AdminHandlers" />
1127 <!-- This single handler is equivalent to the following... -->
1129 <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1130 <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1131 <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1132 <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1133 <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1134 <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1136 <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1137 register the ShowFileRequestHandler using:
1140 <requestHandler name="/admin/file"
1141 class="solr.admin.ShowFileRequestHandler" >
1142 <lst name="invariants">
1143 <str name="hidden">synonyms.txt</str>
1144 <str name="hidden">anotherfile.txt</str>
1149 <!-- ping/healthcheck -->
1150 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1151 <lst name="invariants">
1152 <str name="q">solrpingquery</str>
1154 <lst name="defaults">
1155 <str name="echoParams">all</str>
1157 <!-- An optional feature of the PingRequestHandler is to configure the
1158 handler with a "healthcheckFile" which can be used to enable/disable
1159 the PingRequestHandler.
1160 relative paths are resolved against the data dir
1162 <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1165 <!-- Echo the request contents back to the client -->
1166 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1167 <lst name="defaults">
1168 <str name="echoParams">explicit</str>
1169 <str name="echoHandler">true</str>
1173 <!-- Solr Replication
1175 The SolrReplicationHandler supports replicating indexes from a
1176 "master" used for indexing and "slaves" used for queries.
1178 http://wiki.apache.org/solr/SolrReplication
1180 It is also necessary for SolrCloud to function (in Cloud mode, the
1181 replication handler is used to bulk transfer segments when nodes
1182 are added or need to recover).
1184 https://wiki.apache.org/solr/SolrCloud/
1186 <requestHandler name="/replication" class="solr.ReplicationHandler" >
1188 To enable simple master/slave replication, uncomment one of the
1189 sections below, depending on whether this solr instance should be
1190 the "master" or a "slave". If this instance is a "slave" you will
1191 also need to fill in the masterUrl to point to a real machine.
1195 <str name="replicateAfter">commit</str>
1196 <str name="replicateAfter">startup</str>
1197 <str name="confFiles">schema.xml,stopwords.txt</str>
1202 <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1203 <str name="pollInterval">00:00:60</str>
1208 <!-- Search Components
1210 Search components are registered to SolrCore and used by
1211 instances of SearchHandler (which can access them by name)
1213 By default, the following components are available:
1215 <searchComponent name="query" class="solr.QueryComponent" />
1216 <searchComponent name="facet" class="solr.FacetComponent" />
1217 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1218 <searchComponent name="highlight" class="solr.HighlightComponent" />
1219 <searchComponent name="stats" class="solr.StatsComponent" />
1220 <searchComponent name="debug" class="solr.DebugComponent" />
1222 Default configuration in a requestHandler would look like:
1224 <arr name="components">
1228 <str>highlight</str>
1233 If you register a searchComponent to one of the standard names,
1234 that will be used instead of the default.
1236 To insert components before or after the 'standard' components, use:
1238 <arr name="first-components">
1239 <str>myFirstComponentName</str>
1242 <arr name="last-components">
1243 <str>myLastComponentName</str>
1246 NOTE: The component registered with the name "debug" will
1247 always be executed after the "last-components"
1253 The spell check component can return a list of alternative spelling
1256 http://wiki.apache.org/solr/SpellCheckComponent
1258 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1260 <str name="queryAnalyzerFieldType">text_general</str>
1262 <!-- Multiple "Spell Checkers" can be declared and used by this
1266 <!-- a spellchecker built from a field of the main index -->
1267 <lst name="spellchecker">
1268 <str name="name">default</str>
1269 <str name="field">text</str>
1270 <str name="classname">solr.DirectSolrSpellChecker</str>
1271 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1272 <str name="distanceMeasure">internal</str>
1273 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1274 <float name="accuracy">0.5</float>
1275 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1276 <int name="maxEdits">2</int>
1277 <!-- the minimum shared prefix when enumerating terms -->
1278 <int name="minPrefix">1</int>
1279 <!-- maximum number of inspections per result. -->
1280 <int name="maxInspections">5</int>
1281 <!-- minimum length of a query term to be considered for correction -->
1282 <int name="minQueryLength">4</int>
1283 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1284 <float name="maxQueryFrequency">0.01</float>
1285 <!-- uncomment this to require suggestions to occur in 1% of the documents
1286 <float name="thresholdTokenFrequency">.01</float>
1290 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1291 <lst name="spellchecker">
1292 <str name="name">wordbreak</str>
1293 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1294 <str name="field">name</str>
1295 <str name="combineWords">true</str>
1296 <str name="breakWords">true</str>
1297 <int name="maxChanges">10</int>
1300 <!-- a spellchecker that uses a different distance measure -->
1302 <lst name="spellchecker">
1303 <str name="name">jarowinkler</str>
1304 <str name="field">spell</str>
1305 <str name="classname">solr.DirectSolrSpellChecker</str>
1306 <str name="distanceMeasure">
1307 org.apache.lucene.search.spell.JaroWinklerDistance
1312 <!-- a spellchecker that use an alternate comparator
1314 comparatorClass be one of:
1316 2. freq (Frequency first, then score)
1317 3. A fully qualified class name
1320 <lst name="spellchecker">
1321 <str name="name">freq</str>
1322 <str name="field">lowerfilt</str>
1323 <str name="classname">solr.DirectSolrSpellChecker</str>
1324 <str name="comparatorClass">freq</str>
1327 <!-- A spellchecker that reads the list of words from a file -->
1329 <lst name="spellchecker">
1330 <str name="classname">solr.FileBasedSpellChecker</str>
1331 <str name="name">file</str>
1332 <str name="sourceLocation">spellings.txt</str>
1333 <str name="characterEncoding">UTF-8</str>
1334 <str name="spellcheckIndexDir">spellcheckerFile</str>
1339 <!-- A request handler for demonstrating the spellcheck component.
1341 NOTE: This is purely as an example. The whole purpose of the
1342 SpellCheckComponent is to hook it into the request handler that
1343 handles your normal user queries so that a separate request is
1344 not needed to get suggestions.
1346 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1347 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1349 See http://wiki.apache.org/solr/SpellCheckComponent for details
1350 on the request parameters.
1352 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1353 <lst name="defaults">
1354 <str name="df">text</str>
1355 <!-- Solr will use suggestions from both the 'default' spellchecker
1356 and from the 'wordbreak' spellchecker and combine them.
1357 collations (re-written queries) can include a combination of
1358 corrections from both spellcheckers -->
1359 <str name="spellcheck.dictionary">default</str>
1360 <str name="spellcheck.dictionary">wordbreak</str>
1361 <str name="spellcheck">on</str>
1362 <str name="spellcheck.extendedResults">true</str>
1363 <str name="spellcheck.count">10</str>
1364 <str name="spellcheck.alternativeTermCount">5</str>
1365 <str name="spellcheck.maxResultsForSuggest">5</str>
1366 <str name="spellcheck.collate">true</str>
1367 <str name="spellcheck.collateExtendedResults">true</str>
1368 <str name="spellcheck.maxCollationTries">10</str>
1369 <str name="spellcheck.maxCollations">5</str>
1371 <arr name="last-components">
1372 <str>spellcheck</str>
1376 <!-- Term Vector Component
1378 http://wiki.apache.org/solr/TermVectorComponent
1380 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1382 <!-- A request handler for demonstrating the term vector component
1384 This is purely as an example.
1386 In reality you will likely want to add the component to your
1387 already specified request handlers.
1389 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1390 <lst name="defaults">
1391 <str name="df">text</str>
1392 <bool name="tv">true</bool>
1394 <arr name="last-components">
1395 <str>tvComponent</str>
1399 <!-- Clustering Component
1401 http://wiki.apache.org/solr/ClusteringComponent
1403 You'll need to set the solr.clustering.enabled system property
1404 when running solr to run with clustering enabled:
1406 java -Dsolr.clustering.enabled=true -jar start.jar
1409 <searchComponent name="clustering"
1410 enable="${solr.clustering.enabled:false}"
1411 class="solr.clustering.ClusteringComponent" >
1412 <!-- Declare an engine -->
1414 <!-- The name, only one can be named "default" -->
1415 <str name="name">default</str>
1417 <!-- Class name of Carrot2 clustering algorithm.
1419 Currently available algorithms are:
1421 * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1422 * org.carrot2.clustering.stc.STCClusteringAlgorithm
1423 * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1425 See http://project.carrot2.org/algorithms.html for the
1426 algorithm's characteristics.
1428 <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1430 <!-- Overriding values for Carrot2 default algorithm attributes.
1432 For a description of all available attributes, see:
1433 http://download.carrot2.org/stable/manual/#chapter.components.
1434 Use attribute key as name attribute of str elements
1435 below. These can be further overridden for individual
1436 requests by specifying attribute key as request parameter
1437 name and attribute value as parameter value.
1439 <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1441 <!-- Location of Carrot2 lexical resources.
1443 A directory from which to load Carrot2-specific stop words
1444 and stop labels. Absolute or relative to Solr config directory.
1445 If a specific resource (e.g. stopwords.en) is present in the
1446 specified dir, it will completely override the corresponding
1447 default one that ships with Carrot2.
1449 For an overview of Carrot2 lexical resources, see:
1450 http://download.carrot2.org/head/manual/#chapter.lexical-resources
1452 <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1454 <!-- The language to assume for the documents.
1456 For a list of allowed values, see:
1457 http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1459 <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1462 <str name="name">stc</str>
1463 <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1467 <!-- A request handler for demonstrating the clustering component
1469 This is purely as an example.
1471 In reality you will likely want to add the component to your
1472 already specified request handlers.
1474 <requestHandler name="/clustering"
1476 enable="${solr.clustering.enabled:false}"
1477 class="solr.SearchHandler">
1478 <lst name="defaults">
1479 <bool name="clustering">true</bool>
1480 <str name="clustering.engine">default</str>
1481 <bool name="clustering.results">true</bool>
1482 <!-- The title field -->
1483 <str name="carrot.title">name</str>
1484 <str name="carrot.url">id</str>
1485 <!-- The field to cluster on -->
1486 <str name="carrot.snippet">features</str>
1487 <!-- produce summaries -->
1488 <bool name="carrot.produceSummary">true</bool>
1489 <!-- the maximum number of labels per cluster -->
1490 <!--<int name="carrot.numDescriptions">5</int>-->
1491 <!-- produce sub clusters -->
1492 <bool name="carrot.outputSubClusters">false</bool>
1494 <str name="defType">edismax</str>
1496 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1498 <str name="q.alt">*:*</str>
1499 <str name="rows">10</str>
1500 <str name="fl">*,score</str>
1502 <arr name="last-components">
1503 <str>clustering</str>
1507 <!-- Terms Component
1509 http://wiki.apache.org/solr/TermsComponent
1511 A component to return terms and document frequency of those
1514 <searchComponent name="terms" class="solr.TermsComponent"/>
1516 <!-- A request handler for demonstrating the terms component -->
1517 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1518 <lst name="defaults">
1519 <bool name="terms">true</bool>
1520 <bool name="distrib">false</bool>
1522 <arr name="components">
1528 <!-- Query Elevation Component
1530 http://wiki.apache.org/solr/QueryElevationComponent
1532 a search component that enables you to configure the top
1533 results for a given query regardless of the normal lucene
1536 <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1537 <!-- pick a fieldType to analyze queries -->
1538 <str name="queryFieldType">string</str>
1539 <str name="config-file">elevate.xml</str>
1542 <!-- A request handler for demonstrating the elevator component -->
1543 <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1544 <lst name="defaults">
1545 <str name="echoParams">explicit</str>
1546 <str name="df">text</str>
1548 <arr name="last-components">
1553 <!-- Highlighting Component
1555 http://wiki.apache.org/solr/HighlightingParameters
1557 <searchComponent class="solr.HighlightComponent" name="highlight">
1559 <!-- Configure the standard fragmenter -->
1560 <!-- This could most likely be commented out in the "default" case -->
1561 <fragmenter name="gap"
1563 class="solr.highlight.GapFragmenter">
1564 <lst name="defaults">
1565 <int name="hl.fragsize">100</int>
1569 <!-- A regular-expression-based fragmenter
1570 (for sentence extraction)
1572 <fragmenter name="regex"
1573 class="solr.highlight.RegexFragmenter">
1574 <lst name="defaults">
1575 <!-- slightly smaller fragsizes work better because of slop -->
1576 <int name="hl.fragsize">70</int>
1577 <!-- allow 50% slop on fragment sizes -->
1578 <float name="hl.regex.slop">0.5</float>
1579 <!-- a basic sentence pattern -->
1580 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
1584 <!-- Configure the standard formatter -->
1585 <formatter name="html"
1587 class="solr.highlight.HtmlFormatter">
1588 <lst name="defaults">
1589 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1590 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1594 <!-- Configure the standard encoder -->
1595 <encoder name="html"
1596 class="solr.highlight.HtmlEncoder" />
1598 <!-- Configure the standard fragListBuilder -->
1599 <fragListBuilder name="simple"
1600 class="solr.highlight.SimpleFragListBuilder"/>
1602 <!-- Configure the single fragListBuilder -->
1603 <fragListBuilder name="single"
1604 class="solr.highlight.SingleFragListBuilder"/>
1606 <!-- Configure the weighted fragListBuilder -->
1607 <fragListBuilder name="weighted"
1609 class="solr.highlight.WeightedFragListBuilder"/>
1611 <!-- default tag FragmentsBuilder -->
1612 <fragmentsBuilder name="default"
1614 class="solr.highlight.ScoreOrderFragmentsBuilder">
1616 <lst name="defaults">
1617 <str name="hl.multiValuedSeparatorChar">/</str>
1622 <!-- multi-colored tag FragmentsBuilder -->
1623 <fragmentsBuilder name="colored"
1624 class="solr.highlight.ScoreOrderFragmentsBuilder">
1625 <lst name="defaults">
1626 <str name="hl.tag.pre"><![CDATA[
1627 <b style="background:yellow">,<b style="background:lawgreen">,
1628 <b style="background:aquamarine">,<b style="background:magenta">,
1629 <b style="background:palegreen">,<b style="background:coral">,
1630 <b style="background:wheat">,<b style="background:khaki">,
1631 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1632 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1636 <boundaryScanner name="default"
1638 class="solr.highlight.SimpleBoundaryScanner">
1639 <lst name="defaults">
1640 <str name="hl.bs.maxScan">10</str>
1641 <str name="hl.bs.chars">.,!? 	 </str>
1645 <boundaryScanner name="breakIterator"
1646 class="solr.highlight.BreakIteratorBoundaryScanner">
1647 <lst name="defaults">
1648 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1649 <str name="hl.bs.type">WORD</str>
1650 <!-- language and country are used when constructing Locale object. -->
1651 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1652 <str name="hl.bs.language">en</str>
1653 <str name="hl.bs.country">US</str>
1659 <!-- Update Processors
1661 Chains of Update Processor Factories for dealing with Update
1662 Requests can be declared, and then used by name in Update
1665 http://wiki.apache.org/solr/UpdateRequestProcessor
1670 An example dedup update processor that creates the "id" field
1671 on the fly based on the hash code of some other fields. This
1672 example has overwriteDupes set to false since we are using the
1673 id field as the signatureField and Solr will maintain
1674 uniqueness based on that anyway.
1678 <updateRequestProcessorChain name="dedupe">
1679 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1680 <bool name="enabled">true</bool>
1681 <str name="signatureField">id</str>
1682 <bool name="overwriteDupes">false</bool>
1683 <str name="fields">name,features,cat</str>
1684 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1686 <processor class="solr.LogUpdateProcessorFactory" />
1687 <processor class="solr.RunUpdateProcessorFactory" />
1688 </updateRequestProcessorChain>
1691 <!-- Language identification
1693 This example update chain identifies the language of the incoming
1694 documents using the langid contrib. The detected language is
1695 written to field language_s. No field name mapping is done.
1696 The fields used for detection are text, title, subject and description,
1697 making this example suitable for detecting languages form full-text
1698 rich documents injected via ExtractingRequestHandler.
1699 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1702 <updateRequestProcessorChain name="langid">
1703 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1704 <str name="langid.fl">text,title,subject,description</str>
1705 <str name="langid.langField">language_s</str>
1706 <str name="langid.fallback">en</str>
1708 <processor class="solr.LogUpdateProcessorFactory" />
1709 <processor class="solr.RunUpdateProcessorFactory" />
1710 </updateRequestProcessorChain>
1713 <!-- Script update processor
1715 This example hooks in an update processor implemented using JavaScript.
1717 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1720 <updateRequestProcessorChain name="script">
1721 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1722 <str name="script">update-script.js</str>
1724 <str name="config_param">example config parameter</str>
1727 <processor class="solr.RunUpdateProcessorFactory" />
1728 </updateRequestProcessorChain>
1731 <!-- Response Writers
1733 http://wiki.apache.org/solr/QueryResponseWriter
1735 Request responses will be written using the writer specified by
1736 the 'wt' request parameter matching the name of a registered
1739 The "default" writer is the default and will be used if 'wt' is
1740 not specified in the request.
1742 <!-- The following response writers are implicitly configured unless
1746 <queryResponseWriter name="xml"
1748 class="solr.XMLResponseWriter" />
1749 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1750 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1751 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1752 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1753 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1754 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1755 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1758 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1759 <!-- For the purposes of the tutorial, JSON responses are written as
1760 plain text so that they are easy to read in *any* browser.
1761 If you expect a MIME type of "application/json" just remove this override.
1763 <str name="content-type">text/plain; charset=UTF-8</str>
1764 </queryResponseWriter>
1767 Custom response writers can be declared as needed...
1769 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1772 <!-- XSLT response writer transforms the XML output by any xslt file found
1773 in Solr's conf/xslt directory. Changes to xslt files are checked for
1774 every xsltCacheLifetimeSeconds.
1776 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1777 <int name="xsltCacheLifetimeSeconds">5</int>
1778 </queryResponseWriter>
1782 http://wiki.apache.org/solr/SolrQuerySyntax
1784 Multiple QParserPlugins can be registered by name, and then
1785 used in either the "defType" param for the QueryComponent (used
1786 by SearchHandler) or in LocalParams
1788 <!-- example of registering a query parser -->
1790 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1793 <!-- Function Parsers
1795 http://wiki.apache.org/solr/FunctionQuery
1797 Multiple ValueSourceParsers can be registered by name, and then
1798 used as function names when using the "func" QParser.
1800 <!-- example of registering a custom function parser -->
1802 <valueSourceParser name="myfunc"
1803 class="com.mycompany.MyValueSourceParser" />
1807 <!-- Document Transformers
1808 http://wiki.apache.org/solr/DocTransformers
1811 Could be something like:
1812 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1813 <int name="connection">jdbc://....</int>
1816 To add a constant value to all docs, use:
1817 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1818 <int name="value">5</int>
1821 If you want the user to still be able to change it with _value:something_ use this:
1822 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1823 <double name="defaultValue">5</double>
1826 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1827 EditorialMarkerFactory will do exactly that:
1828 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1832 <!-- Legacy config for the admin interface -->
1834 <defaultQuery>*:*</defaultQuery>