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>LUCENE_CURRENT</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 The examples below can be used to load some solr-contribs along
70 with their external dependencies.
72 <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
73 <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
75 <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
76 <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
78 <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
79 <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
81 <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
82 <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
84 <!-- If a 'dir' option (with or without a regex) is used and nothing
85 is found that matches, a warning will be logged.
87 <lib dir="/non/existent/dir/yields/warning" />
89 <!-- an exact 'path' can be used instead of a 'dir' to specify a
90 specific jar file. This will cause a serious error to be logged
91 if it can't be loaded.
94 <lib path="../a-jar-that-does-not-exist.jar" />
99 Used to specify an alternate directory to hold all index data
100 other than the default ./data under the Solr home. If
101 replication is in use, this should match the replication
105 <dataDir>${solr.data.dir:/var/lib/masterkey/lui/solr4/master}</dataDir>
108 <!-- The DirectoryFactory to use for indexes.
110 solr.StandardDirectoryFactory is filesystem
111 based and tries to pick the best implementation for the current
112 JVM and platform. solr.NRTCachingDirectoryFactory, the default,
113 wraps solr.StandardDirectoryFactory and caches small files in memory
114 for better NRT performance.
116 One can force a particular implementation via solr.MMapDirectoryFactory,
117 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
119 solr.RAMDirectoryFactory is memory based, not
120 persistent, and doesn't work with replication.
122 <directoryFactory name="DirectoryFactory"
123 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
125 <!-- The CodecFactory for defining the format of the inverted index.
126 The default implementation is SchemaCodecFactory, which is the official Lucene
127 index format, but hooks into the schema to provide per-field customization of
128 the postings lists and per-document values in the fieldType element
129 (postingsFormat/docValuesFormat). Note that most of the alternative implementations
130 are experimental, so if you choose to customize the index format, its a good
131 idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
132 before upgrading to a newer version to avoid unnecessary reindexing.
134 <codecFactory class="solr.SchemaCodecFactory"/>
136 <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
138 <schemaFactory class="ManagedIndexSchemaFactory">
139 <bool name="mutable">true</bool>
140 <str name="managedSchemaResourceName">managed-schema</str>
143 When ManagedIndexSchemaFactory is specified, Solr will load the schema from
144 he resource named in 'managedSchemaResourceName', rather than from schema.xml.
145 Note that the managed schema resource CANNOT be named schema.xml. If the managed
146 schema does not exist, Solr will create it after reading schema.xml, then rename
147 'schema.xml' to 'schema.xml.bak'.
149 Do NOT hand edit the managed schema - external modifications will be ignored and
150 overwritten as a result of schema modification REST API calls.
152 When ManagedIndexSchemaFactory is specified with mutable = true, schema
153 modification REST API calls will be allowed; otherwise, error responses will be
154 sent back for these requests.
156 <schemaFactory class="ClassicIndexSchemaFactory"/>
158 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
159 Index Config - These settings control low-level behavior of indexing
160 Most example settings here show the default value, but are commented
161 out, to more easily see where customizations have been made.
163 Note: This replaces <indexDefaults> and <mainIndex> from older versions
164 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
166 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
167 LimitTokenCountFilterFactory in your fieldType definition. E.g.
168 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
170 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
171 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
173 <!-- The maximum number of simultaneous threads that may be
174 indexing documents at once in IndexWriter; if more than this
175 many threads arrive they will wait for others to finish.
176 Default in Solr/Lucene is 8. -->
177 <!-- <maxIndexingThreads>8</maxIndexingThreads> -->
179 <!-- Expert: Enabling compound file will use less files for the index,
180 using fewer file descriptors on the expense of performance decrease.
181 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
182 <!-- <useCompoundFile>false</useCompoundFile> -->
184 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
185 indexing for buffering added documents and deletions before they are
186 flushed to the Directory.
187 maxBufferedDocs sets a limit on the number of documents buffered
189 If both ramBufferSizeMB and maxBufferedDocs is set, then
190 Lucene will flush based on whichever limit is hit first. -->
191 <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
192 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
194 <!-- Expert: Merge Policy
195 The Merge Policy in Lucene controls how merging of segments is done.
196 The default since Solr/Lucene 3.3 is TieredMergePolicy.
197 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
198 Even older versions of Lucene used LogDocMergePolicy.
201 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
202 <int name="maxMergeAtOnce">10</int>
203 <int name="segmentsPerTier">10</int>
208 The merge factor controls how many segments will get merged at a time.
209 For TieredMergePolicy, mergeFactor is a convenience parameter which
210 will set both MaxMergeAtOnce and SegmentsPerTier at once.
211 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
212 will be allowed before they are merged into one.
213 Default is 10 for both merge policies.
216 <mergeFactor>10</mergeFactor>
219 <!-- Expert: Merge Scheduler
220 The Merge Scheduler in Lucene controls how merges are
221 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
222 can perform merges in the background using separate threads.
223 The SerialMergeScheduler (Lucene 2.2 default) does not.
226 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
231 This option specifies which Lucene LockFactory implementation
234 single = SingleInstanceLockFactory - suggested for a
235 read-only index or when there is no possibility of
236 another process trying to modify the index.
237 native = NativeFSLockFactory - uses OS native file locking.
238 Do not use when multiple solr webapps in the same
239 JVM are attempting to share a single index.
240 simple = SimpleFSLockFactory - uses a plain file for locking
242 Defaults: 'native' is default for Solr3.6 and later, otherwise
243 'simple' is the default
245 More details on the nuances of each LockFactory...
246 http://wiki.apache.org/lucene-java/AvailableLockFactories
248 <lockType>${solr.lock.type:native}</lockType>
250 <!-- Unlock On Startup
252 If true, unlock any held write or commit locks on startup.
253 This defeats the locking mechanism that allows multiple
254 processes to safely access a lucene index, and should be used
255 with care. Default is "false".
257 This is not needed if lock type is 'single'
260 <unlockOnStartup>false</unlockOnStartup>
263 <!-- Expert: Controls how often Lucene loads terms into memory
264 Default is 128 and is likely good for most everyone.
266 <!-- <termIndexInterval>128</termIndexInterval> -->
268 <!-- If true, IndexReaders will be reopened (often more efficient)
269 instead of closed and then opened. Default: true
272 <reopenReaders>true</reopenReaders>
275 <!-- Commit Deletion Policy
276 Custom deletion policies can be specified here. The class must
277 implement org.apache.lucene.index.IndexDeletionPolicy.
279 The default Solr IndexDeletionPolicy implementation supports
280 deleting index commit points on number of commits, age of
281 commit point and optimized status.
283 The latest commit point should always be preserved regardless
287 <deletionPolicy class="solr.SolrDeletionPolicy">
289 <!-- The number of commit points to be kept -->
290 <!-- <str name="maxCommitsToKeep">1</str> -->
291 <!-- The number of optimized commit points to be kept -->
292 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
294 Delete all commit points once they have reached the given age.
295 Supports DateMathParser syntax e.g.
298 <str name="maxCommitAge">30MINUTES</str>
299 <str name="maxCommitAge">1DAY</str>
305 <!-- Lucene Infostream
307 To aid in advanced debugging, Lucene provides an "InfoStream"
308 of detailed information when indexing.
310 Setting The value to true will instruct the underlying Lucene
311 IndexWriter to write its debugging info the specified file
313 <!-- <infoStream file="INFOSTREAM.txt">false</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>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>1000</maxTime>
385 <!-- Update Related Event Listeners
387 Various IndexWriter related events can trigger Listeners to
390 postCommit - fired after every commit or optimize command
391 postOptimize - fired after every optimize command
393 <!-- The RunExecutableListener executes an external command from a
394 hook such as postCommit or postOptimize.
396 exe - the name of the executable to run
397 dir - dir to use as the current working directory. (default=".")
398 wait - the calling thread waits until the executable returns.
400 args - the arguments to pass to the program. (default is none)
401 env - environment variables to set. (default is none)
403 <!-- This example shows how RunExecutableListener could be used
404 with the script based replication...
405 http://wiki.apache.org/solr/CollectionDistribution
408 <listener event="postCommit" class="solr.RunExecutableListener">
409 <str name="exe">solr/bin/snapshooter</str>
410 <str name="dir">.</str>
411 <bool name="wait">true</bool>
412 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
413 <arr name="env"> <str>MYVAR=val1</str> </arr>
419 <!-- IndexReaderFactory
421 Use the following format to specify a custom IndexReaderFactory,
422 which allows for alternate IndexReader implementations.
424 ** Experimental Feature **
426 Please note - Using a custom IndexReaderFactory may prevent
427 certain other features from working. The API to
428 IndexReaderFactory may change without warning or may even be
429 removed from future releases if the problems cannot be
433 ** Features that may not work with custom IndexReaderFactory **
435 The ReplicationHandler assumes a disk-resident index. Using a
436 custom IndexReader implementation may cause incompatibility
437 with ReplicationHandler and may cause replication to not work
438 correctly. See SOLR-1366 for details.
442 <indexReaderFactory name="IndexReaderFactory" class="package.class">
443 <str name="someArg">Some Value</str>
444 </indexReaderFactory >
446 <!-- By explicitly declaring the Factory, the termIndexDivisor can
450 <indexReaderFactory name="IndexReaderFactory"
451 class="solr.StandardIndexReaderFactory">
452 <int name="setTermIndexDivisor">12</int>
453 </indexReaderFactory >
456 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
457 Query section - these settings control query time things like caches
458 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
460 <!-- Max Boolean Clauses
462 Maximum number of clauses in each BooleanQuery, an exception
463 is thrown if exceeded.
467 This option actually modifies a global Lucene property that
468 will affect all SolrCores. If multiple solrconfig.xml files
469 disagree on this property, the value at any given moment will
470 be based on the last SolrCore to be initialized.
473 <maxBooleanClauses>1024</maxBooleanClauses>
476 <!-- Solr Internal Query Caches
478 There are two implementations of cache available for Solr,
479 LRUCache, based on a synchronized LinkedHashMap, and
480 FastLRUCache, based on a ConcurrentHashMap.
482 FastLRUCache has faster gets and slower puts in single
483 threaded operation and thus is generally faster than LRUCache
484 when the hit ratio of the cache is high (> 75%), and may be
485 faster under other scenarios on multi-cpu systems.
490 Cache used by SolrIndexSearcher for filters (DocSets),
491 unordered sets of *all* documents that match a query. When a
492 new searcher is opened, its caches may be prepopulated or
493 "autowarmed" using data from caches in the old searcher.
494 autowarmCount is the number of items to prepopulate. For
495 LRUCache, the autowarmed items will be the most recently
499 class - the SolrCache implementation LRUCache or
500 (LRUCache or FastLRUCache)
501 size - the maximum number of entries in the cache
502 initialSize - the initial capacity (number of entries) of
503 the cache. (see java.util.HashMap)
504 autowarmCount - the number of entries to prepopulate from
507 <filterCache class="solr.FastLRUCache"
512 <!-- Query Result Cache
514 Caches results of searches - ordered lists of document ids
515 (DocList) based on a query, a sort, and the range of documents requested.
517 <queryResultCache class="solr.LRUCache"
524 Caches Lucene Document objects (the stored fields for each
525 document). Since Lucene internal document ids are transient,
526 this cache will not be autowarmed.
528 <documentCache class="solr.LRUCache"
533 <!-- Field Value Cache
535 Cache used to hold field values that are quickly accessible
536 by document id. The fieldValueCache is created by default
537 even if not configured here.
540 <fieldValueCache class="solr.FastLRUCache"
548 Example of a generic cache. These caches may be accessed by
549 name through SolrIndexSearcher.getCache(),cacheLookup(), and
550 cacheInsert(). The purpose is to enable easy caching of
551 user/application level data. The regenerator argument should
552 be specified as an implementation of solr.CacheRegenerator
553 if autowarming is desired.
556 <cache name="myUserCache"
557 class="solr.LRUCache"
561 regenerator="com.mycompany.MyRegenerator"
566 <!-- Lazy Field Loading
568 If true, stored fields that are not requested will be loaded
569 lazily. This can result in a significant speed improvement
570 if the usual case is to not load all stored fields,
571 especially if the skipped fields are large compressed text
574 <enableLazyFieldLoading>true</enableLazyFieldLoading>
576 <!-- Use Filter For Sorted Query
578 A possible optimization that attempts to use a filter to
579 satisfy a search. If the requested sort does not include
580 score, then the filterCache will be checked for a filter
581 matching the query. If found, the filter will be used as the
582 source of document ids, and then the sort will be applied to
585 For most situations, this will not be useful unless you
586 frequently get the same search repeatedly with different sort
587 options, and none of them ever use "score"
590 <useFilterForSortedQuery>true</useFilterForSortedQuery>
593 <!-- Result Window Size
595 An optimization for use with the queryResultCache. When a search
596 is requested, a superset of the requested number of document ids
597 are collected. For example, if a search for a particular query
598 requests matching documents 10 through 19, and queryWindowSize is 50,
599 then documents 0 through 49 will be collected and cached. Any further
600 requests in that range can be satisfied via the cache.
602 <queryResultWindowSize>20</queryResultWindowSize>
604 <!-- Maximum number of documents to cache for any entry in the
607 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
609 <!-- Query Related Event Listeners
611 Various IndexSearcher related events can trigger Listeners to
614 newSearcher - fired whenever a new searcher is being prepared
615 and there is a current searcher handling requests (aka
616 registered). It can be used to prime certain caches to
617 prevent long request times for certain requests.
619 firstSearcher - fired whenever a new searcher is being
620 prepared but there is no current registered searcher to handle
621 requests or to gain autowarming data from.
625 <!-- QuerySenderListener takes an array of NamedList and executes a
626 local query request for each NamedList in sequence.
628 <listener event="newSearcher" class="solr.QuerySenderListener">
632 <str name="q">database:*</str>
633 <str name="facet">true</str>
634 <str name="facet.mincount">1</str>
635 <str name="facet.field">author_exact</str>
636 <str name="facet.field">subject_exact</str>
637 <str name="facet.field">medium_exact</str>
638 <str name="facet.field">date</str>
639 <str name="facet.field">database</str>
644 <listener event="firstSearcher" class="solr.QuerySenderListener">
648 <str name="q">database:*</str>
649 <str name="facet">true</str>
650 <str name="facet.mincount">1</str>
651 <str name="facet.field">author_exact</str>
652 <str name="facet.field">subject_exact</str>
653 <str name="facet.field">medium_exact</str>
654 <str name="facet.field">date</str>
655 <str name="facet.field">database</str>
661 <!-- Use Cold Searcher
663 If a search request comes in and there is no current
664 registered searcher, then immediately register the still
665 warming searcher and use it. If "false" then all requests
666 will block until the first searcher is done warming.
668 <useColdSearcher>true</useColdSearcher>
670 <!-- Max Warming Searchers
672 Maximum number of searchers that may be warming in the
673 background concurrently. An error is returned if this limit
676 Recommend values of 1-2 for read-only slaves, higher for
677 masters w/o cache warming.
679 <maxWarmingSearchers>10</maxWarmingSearchers>
684 <!-- Request Dispatcher
686 This section contains instructions for how the SolrDispatchFilter
687 should behave when processing requests for this SolrCore.
689 handleSelect is a legacy option that affects the behavior of requests
690 such as /select?qt=XXX
692 handleSelect="true" will cause the SolrDispatchFilter to process
693 the request and dispatch the query to a handler specified by the
694 "qt" param, assuming "/select" isn't already registered.
696 handleSelect="false" will cause the SolrDispatchFilter to
697 ignore "/select" requests, resulting in a 404 unless a handler
698 is explicitly registered with the name "/select"
700 handleSelect="true" is not recommended for new users, but is the default
701 for backwards compatibility
703 <requestDispatcher handleSelect="false" >
706 These settings indicate how Solr Requests may be parsed, and
707 what restrictions may be placed on the ContentStreams from
710 enableRemoteStreaming - enables use of the stream.file
711 and stream.url parameters for specifying remote streams.
713 multipartUploadLimitInKB - specifies the max size (in KiB) of
714 Multipart File Uploads that Solr will allow in a Request.
716 formdataUploadLimitInKB - specifies the max size (in KiB) of
717 form data (application/x-www-form-urlencoded) sent via
718 POST. You can use POST to pass request parameters not
719 fitting into the URL.
722 The settings below authorize Solr to fetch remote files, You
723 should make sure your system has some authentication before
724 using enableRemoteStreaming="true"
727 <requestParsers enableRemoteStreaming="true"
728 multipartUploadLimitInKB="2048000"
729 formdataUploadLimitInKB="2048"/>
733 Set HTTP caching related parameters (for proxy caches and clients).
735 The options below instruct Solr not to output any HTTP Caching
738 <httpCaching never304="true" />
739 <!-- If you include a <cacheControl> directive, it will be used to
740 generate a Cache-Control header (as well as an Expires header
741 if the value contains "max-age=")
743 By default, no Cache-Control header is generated.
745 You can use the <cacheControl> option even if you have set
749 <httpCaching never304="true" >
750 <cacheControl>max-age=30, public</cacheControl>
753 <!-- To enable Solr to respond with automatically generated HTTP
754 Caching headers, and to response to Cache Validation requests
755 correctly, set the value of never304="false"
757 This will cause Solr to generate Last-Modified and ETag
758 headers based on the properties of the Index.
760 The following options can also be specified to affect the
761 values of these headers...
763 lastModFrom - the default value is "openTime" which means the
764 Last-Modified value (and validation against If-Modified-Since
765 requests) will all be relative to when the current Searcher
766 was opened. You can change it to lastModFrom="dirLastMod" if
767 you want the value to exactly correspond to when the physical
768 index was last modified.
770 etagSeed="..." is an option you can change to force the ETag
771 header (and validation against If-None-Match requests) to be
772 different even if the index has not changed (ie: when making
773 significant changes to your config file)
775 (lastModifiedFrom and etagSeed are both ignored if you use
776 the never304="true" option)
779 <httpCaching lastModifiedFrom="openTime"
781 <cacheControl>max-age=30, public</cacheControl>
786 <!-- Request Handlers
788 http://wiki.apache.org/solr/SolrRequestHandler
790 Incoming queries will be dispatched to a specific handler by name
791 based on the path specified in the request.
793 Legacy behavior: If the request path uses "/select" but no Request
794 Handler has that name, and if handleSelect="true" has been specified in
795 the requestDispatcher, then the Request Handler is dispatched based on
796 the qt parameter. Handlers without a leading '/' are accessed this way
797 like so: http://host/app/[core/]select?qt=name If no qt is
798 given, then the requestHandler that declares default="true" will be
799 used or the one named "standard".
801 If a Request Handler is declared with startup="lazy", then it will
802 not be initialized until the first request that uses it.
807 http://wiki.apache.org/solr/SearchHandler
809 For processing Search Queries, the primary Request Handler
810 provided with Solr is "SearchHandler" It delegates to a sequent
811 of SearchComponents (see below) and supports distributed
812 queries across multiple shards
814 <requestHandler name="/select" class="solr.SearchHandler">
815 <!-- default values for query parameters can be specified, these
816 will be overridden by parameters in the request
818 <lst name="defaults">
819 <str name="echoParams">explicit</str>
820 <int name="rows">10</int>
821 <str name="df">text</str>
823 <!-- In addition to defaults, "appends" params can be specified
824 to identify values which should be appended to the list of
825 multi-val params from the query (or the existing "defaults").
827 <!-- In this example, the param "fq=instock:true" would be appended to
828 any query time fq params the user may specify, as a mechanism for
829 partitioning the index, independent of any user selected filtering
830 that may also be desired (perhaps as a result of faceted searching).
832 NOTE: there is *absolutely* nothing a client can do to prevent these
833 "appends" values from being used, so don't use this mechanism
834 unless you are sure you always want it.
838 <str name="fq">inStock:true</str>
841 <!-- "invariants" are a way of letting the Solr maintainer lock down
842 the options available to Solr clients. Any params values
843 specified here are used regardless of what values may be specified
844 in either the query, the "defaults", or the "appends" params.
846 In this example, the facet.field and facet.query params would
847 be fixed, limiting the facets clients can use. Faceting is
848 not turned on by default - but if the client does specify
849 facet=true in the request, these are the only facets they
850 will be able to see counts for; regardless of what other
851 facet.field or facet.query params they may specify.
853 NOTE: there is *absolutely* nothing a client can do to prevent these
854 "invariants" values from being used, so don't use this mechanism
855 unless you are sure you always want it.
858 <lst name="invariants">
859 <str name="facet.field">cat</str>
860 <str name="facet.field">manu_exact</str>
861 <str name="facet.query">price:[* TO 500]</str>
862 <str name="facet.query">price:[500 TO *]</str>
865 <!-- If the default list of SearchComponents is not desired, that
866 list can either be overridden completely, or components can be
867 prepended or appended to the default list. (see below)
870 <arr name="components">
871 <str>nameOfCustomComponent1</str>
872 <str>nameOfCustomComponent2</str>
877 <!-- A request handler that returns indented JSON by default -->
878 <requestHandler name="/query" class="solr.SearchHandler">
879 <lst name="defaults">
880 <str name="echoParams">explicit</str>
881 <str name="wt">json</str>
882 <str name="indent">true</str>
883 <str name="df">text</str>
888 <!-- realtime get handler, guaranteed to return the latest stored fields of
889 any document, without the need to commit or open a new searcher. The
890 current implementation relies on the updateLog feature being enabled. -->
891 <requestHandler name="/get" class="solr.RealTimeGetHandler">
892 <lst name="defaults">
893 <str name="omitHeader">true</str>
894 <str name="wt">json</str>
895 <str name="indent">true</str>
900 <!-- A Robust Example
902 This example SearchHandler declaration shows off usage of the
903 SearchHandler with many defaults declared
905 Note that multiple instances of the same Request Handler
906 (SearchHandler) can be registered multiple times with different
907 names (and different init parameters)
909 <requestHandler name="/browse" class="solr.SearchHandler">
910 <lst name="defaults">
911 <str name="echoParams">explicit</str>
913 <!-- VelocityResponseWriter settings -->
914 <str name="wt">velocity</str>
915 <str name="v.template">browse</str>
916 <str name="v.layout">layout</str>
917 <str name="title">Solritas</str>
919 <!-- Query settings -->
920 <str name="defType">edismax</str>
922 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
923 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
925 <str name="df">text</str>
926 <str name="mm">100%</str>
927 <str name="q.alt">*:*</str>
928 <str name="rows">10</str>
929 <str name="fl">*,score</str>
932 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
933 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
935 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
936 <int name="mlt.count">3</int>
938 <!-- Faceting defaults -->
939 <str name="facet">on</str>
940 <str name="facet.field">cat</str>
941 <str name="facet.field">manu_exact</str>
942 <str name="facet.field">content_type</str>
943 <str name="facet.field">author_s</str>
944 <str name="facet.query">ipod</str>
945 <str name="facet.query">GB</str>
946 <str name="facet.mincount">1</str>
947 <str name="facet.pivot">cat,inStock</str>
948 <str name="facet.range.other">after</str>
949 <str name="facet.range">price</str>
950 <int name="f.price.facet.range.start">0</int>
951 <int name="f.price.facet.range.end">600</int>
952 <int name="f.price.facet.range.gap">50</int>
953 <str name="facet.range">popularity</str>
954 <int name="f.popularity.facet.range.start">0</int>
955 <int name="f.popularity.facet.range.end">10</int>
956 <int name="f.popularity.facet.range.gap">3</int>
957 <str name="facet.range">manufacturedate_dt</str>
958 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
959 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
960 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
961 <str name="f.manufacturedate_dt.facet.range.other">before</str>
962 <str name="f.manufacturedate_dt.facet.range.other">after</str>
964 <!-- Highlighting defaults -->
965 <str name="hl">on</str>
966 <str name="hl.fl">content features title name</str>
967 <str name="hl.encoder">html</str>
968 <str name="hl.simple.pre"><b></str>
969 <str name="hl.simple.post"></b></str>
970 <str name="f.title.hl.fragsize">0</str>
971 <str name="f.title.hl.alternateField">title</str>
972 <str name="f.name.hl.fragsize">0</str>
973 <str name="f.name.hl.alternateField">name</str>
974 <str name="f.content.hl.snippets">3</str>
975 <str name="f.content.hl.fragsize">200</str>
976 <str name="f.content.hl.alternateField">content</str>
977 <str name="f.content.hl.maxAlternateFieldLength">750</str>
979 <!-- Spell checking defaults -->
980 <str name="spellcheck">on</str>
981 <str name="spellcheck.extendedResults">false</str>
982 <str name="spellcheck.count">5</str>
983 <str name="spellcheck.alternativeTermCount">2</str>
984 <str name="spellcheck.maxResultsForSuggest">5</str>
985 <str name="spellcheck.collate">true</str>
986 <str name="spellcheck.collateExtendedResults">true</str>
987 <str name="spellcheck.maxCollationTries">5</str>
988 <str name="spellcheck.maxCollations">3</str>
991 <!-- append spellchecking to our list of components -->
992 <arr name="last-components">
993 <str>spellcheck</str>
998 <!-- Update Request Handler.
1000 http://wiki.apache.org/solr/UpdateXmlMessages
1002 The canonical Request Handler for Modifying the Index through
1003 commands specified using XML, JSON, CSV, or JAVABIN
1005 Note: Since solr1.1 requestHandlers requires a valid content
1006 type header if posted in the body. For example, curl now
1007 requires: -H 'Content-type:text/xml; charset=utf-8'
1009 To override the request content type and force a specific
1010 Content-type, use the request parameter:
1011 ?update.contentType=text/csv
1013 This handler will pick a response format to match the input
1014 if the 'wt' parameter is not explicit
1016 <requestHandler name="/update" class="solr.UpdateRequestHandler">
1017 <!-- See below for information on defining
1018 updateRequestProcessorChains that can be used by name
1019 on each Update Request
1022 <lst name="defaults">
1023 <str name="update.chain">dedupe</str>
1028 <!-- for back compat with clients using /update/json and /update/csv -->
1029 <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
1030 <lst name="defaults">
1031 <str name="stream.contentType">application/json</str>
1034 <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
1035 <lst name="defaults">
1036 <str name="stream.contentType">application/csv</str>
1040 <!-- Solr Cell Update Request Handler
1042 http://wiki.apache.org/solr/ExtractingRequestHandler
1045 <requestHandler name="/update/extract"
1047 class="solr.extraction.ExtractingRequestHandler" >
1048 <lst name="defaults">
1049 <str name="lowernames">true</str>
1050 <str name="uprefix">ignored_</str>
1052 <!-- capture link hrefs but ignore div attributes -->
1053 <str name="captureAttr">true</str>
1054 <str name="fmap.a">links</str>
1055 <str name="fmap.div">ignored_</str>
1060 <!-- Field Analysis Request Handler
1062 RequestHandler that provides much the same functionality as
1063 analysis.jsp. Provides the ability to specify multiple field
1064 types and field names in the same request and outputs
1065 index-time and query-time analysis for each of them.
1067 Request parameters are:
1068 analysis.fieldname - field name whose analyzers are to be used
1070 analysis.fieldtype - field type whose analyzers are to be used
1071 analysis.fieldvalue - text for index-time analysis
1072 q (or analysis.q) - text for query time analysis
1073 analysis.showmatch (true|false) - When set to true and when
1074 query analysis is performed, the produced tokens of the
1075 field value analysis will be marked as "matched" for every
1076 token that is produces by the query analysis
1078 <requestHandler name="/analysis/field"
1080 class="solr.FieldAnalysisRequestHandler" />
1083 <!-- Document Analysis Handler
1085 http://wiki.apache.org/solr/AnalysisRequestHandler
1087 An analysis handler that provides a breakdown of the analysis
1088 process of provided documents. This handler expects a (single)
1089 content stream with the following format:
1093 <field name="id">1</field>
1094 <field name="name">The Name</field>
1095 <field name="text">The Text Value</field>
1102 Note: Each document must contain a field which serves as the
1103 unique key. This key is used in the returned response to associate
1104 an analysis breakdown to the analyzed document.
1106 Like the FieldAnalysisRequestHandler, this handler also supports
1107 query analysis by sending either an "analysis.query" or "q"
1108 request parameter that holds the query text to be analyzed. It
1109 also supports the "analysis.showmatch" parameter which when set to
1110 true, all field tokens that match the query tokens will be marked
1113 <requestHandler name="/analysis/document"
1114 class="solr.DocumentAnalysisRequestHandler"
1119 Admin Handlers - This will register all the standard admin
1122 <requestHandler name="/admin/"
1123 class="solr.admin.AdminHandlers" />
1124 <!-- This single handler is equivalent to the following... -->
1126 <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1127 <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1128 <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1129 <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1130 <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1131 <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1133 <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1134 register the ShowFileRequestHandler using:
1137 <requestHandler name="/admin/file"
1138 class="solr.admin.ShowFileRequestHandler" >
1139 <lst name="invariants">
1140 <str name="hidden">synonyms.txt</str>
1141 <str name="hidden">anotherfile.txt</str>
1146 <!-- ping/healthcheck -->
1147 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1148 <lst name="invariants">
1149 <str name="q">solrpingquery</str>
1151 <lst name="defaults">
1152 <str name="echoParams">all</str>
1154 <!-- An optional feature of the PingRequestHandler is to configure the
1155 handler with a "healthcheckFile" which can be used to enable/disable
1156 the PingRequestHandler.
1157 relative paths are resolved against the data dir
1159 <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1162 <!-- Echo the request contents back to the client -->
1163 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1164 <lst name="defaults">
1165 <str name="echoParams">explicit</str>
1166 <str name="echoHandler">true</str>
1170 <!-- Solr Replication
1172 The SolrReplicationHandler supports replicating indexes from a
1173 "master" used for indexing and "slaves" used for queries.
1175 http://wiki.apache.org/solr/SolrReplication
1177 It is also necessary for SolrCloud to function (in Cloud mode, the
1178 replication handler is used to bulk transfer segments when nodes
1179 are added or need to recover).
1181 https://wiki.apache.org/solr/SolrCloud/
1183 <requestHandler name="/replication" class="solr.ReplicationHandler" >
1185 To enable simple master/slave replication, uncomment one of the
1186 sections below, depending on whether this solr instance should be
1187 the "master" or a "slave". If this instance is a "slave" you will
1188 also need to fill in the masterUrl to point to a real machine.
1192 <str name="replicateAfter">commit</str>
1193 <str name="replicateAfter">startup</str>
1194 <str name="confFiles">schema.xml,stopwords.txt</str>
1199 <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1200 <str name="pollInterval">00:00:60</str>
1205 <!-- Search Components
1207 Search components are registered to SolrCore and used by
1208 instances of SearchHandler (which can access them by name)
1210 By default, the following components are available:
1212 <searchComponent name="query" class="solr.QueryComponent" />
1213 <searchComponent name="facet" class="solr.FacetComponent" />
1214 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1215 <searchComponent name="highlight" class="solr.HighlightComponent" />
1216 <searchComponent name="stats" class="solr.StatsComponent" />
1217 <searchComponent name="debug" class="solr.DebugComponent" />
1219 Default configuration in a requestHandler would look like:
1221 <arr name="components">
1225 <str>highlight</str>
1230 If you register a searchComponent to one of the standard names,
1231 that will be used instead of the default.
1233 To insert components before or after the 'standard' components, use:
1235 <arr name="first-components">
1236 <str>myFirstComponentName</str>
1239 <arr name="last-components">
1240 <str>myLastComponentName</str>
1243 NOTE: The component registered with the name "debug" will
1244 always be executed after the "last-components"
1250 The spell check component can return a list of alternative spelling
1253 http://wiki.apache.org/solr/SpellCheckComponent
1255 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1257 <str name="queryAnalyzerFieldType">text_general</str>
1259 <!-- Multiple "Spell Checkers" can be declared and used by this
1263 <!-- a spellchecker built from a field of the main index -->
1264 <lst name="spellchecker">
1265 <str name="name">default</str>
1266 <str name="field">text</str>
1267 <str name="classname">solr.DirectSolrSpellChecker</str>
1268 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1269 <str name="distanceMeasure">internal</str>
1270 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1271 <float name="accuracy">0.5</float>
1272 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1273 <int name="maxEdits">2</int>
1274 <!-- the minimum shared prefix when enumerating terms -->
1275 <int name="minPrefix">1</int>
1276 <!-- maximum number of inspections per result. -->
1277 <int name="maxInspections">5</int>
1278 <!-- minimum length of a query term to be considered for correction -->
1279 <int name="minQueryLength">4</int>
1280 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1281 <float name="maxQueryFrequency">0.01</float>
1282 <!-- uncomment this to require suggestions to occur in 1% of the documents
1283 <float name="thresholdTokenFrequency">.01</float>
1287 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1288 <lst name="spellchecker">
1289 <str name="name">wordbreak</str>
1290 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1291 <str name="field">name</str>
1292 <str name="combineWords">true</str>
1293 <str name="breakWords">true</str>
1294 <int name="maxChanges">10</int>
1297 <!-- a spellchecker that uses a different distance measure -->
1299 <lst name="spellchecker">
1300 <str name="name">jarowinkler</str>
1301 <str name="field">spell</str>
1302 <str name="classname">solr.DirectSolrSpellChecker</str>
1303 <str name="distanceMeasure">
1304 org.apache.lucene.search.spell.JaroWinklerDistance
1309 <!-- a spellchecker that use an alternate comparator
1311 comparatorClass be one of:
1313 2. freq (Frequency first, then score)
1314 3. A fully qualified class name
1317 <lst name="spellchecker">
1318 <str name="name">freq</str>
1319 <str name="field">lowerfilt</str>
1320 <str name="classname">solr.DirectSolrSpellChecker</str>
1321 <str name="comparatorClass">freq</str>
1324 <!-- A spellchecker that reads the list of words from a file -->
1326 <lst name="spellchecker">
1327 <str name="classname">solr.FileBasedSpellChecker</str>
1328 <str name="name">file</str>
1329 <str name="sourceLocation">spellings.txt</str>
1330 <str name="characterEncoding">UTF-8</str>
1331 <str name="spellcheckIndexDir">spellcheckerFile</str>
1336 <!-- A request handler for demonstrating the spellcheck component.
1338 NOTE: This is purely as an example. The whole purpose of the
1339 SpellCheckComponent is to hook it into the request handler that
1340 handles your normal user queries so that a separate request is
1341 not needed to get suggestions.
1343 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1344 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1346 See http://wiki.apache.org/solr/SpellCheckComponent for details
1347 on the request parameters.
1349 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1350 <lst name="defaults">
1351 <str name="df">text</str>
1352 <!-- Solr will use suggestions from both the 'default' spellchecker
1353 and from the 'wordbreak' spellchecker and combine them.
1354 collations (re-written queries) can include a combination of
1355 corrections from both spellcheckers -->
1356 <str name="spellcheck.dictionary">default</str>
1357 <str name="spellcheck.dictionary">wordbreak</str>
1358 <str name="spellcheck">on</str>
1359 <str name="spellcheck.extendedResults">true</str>
1360 <str name="spellcheck.count">10</str>
1361 <str name="spellcheck.alternativeTermCount">5</str>
1362 <str name="spellcheck.maxResultsForSuggest">5</str>
1363 <str name="spellcheck.collate">true</str>
1364 <str name="spellcheck.collateExtendedResults">true</str>
1365 <str name="spellcheck.maxCollationTries">10</str>
1366 <str name="spellcheck.maxCollations">5</str>
1368 <arr name="last-components">
1369 <str>spellcheck</str>
1373 <!-- Term Vector Component
1375 http://wiki.apache.org/solr/TermVectorComponent
1377 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1379 <!-- A request handler for demonstrating the term vector component
1381 This is purely as an example.
1383 In reality you will likely want to add the component to your
1384 already specified request handlers.
1386 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1387 <lst name="defaults">
1388 <str name="df">text</str>
1389 <bool name="tv">true</bool>
1391 <arr name="last-components">
1392 <str>tvComponent</str>
1396 <!-- Clustering Component
1398 http://wiki.apache.org/solr/ClusteringComponent
1400 You'll need to set the solr.clustering.enabled system property
1401 when running solr to run with clustering enabled:
1403 java -Dsolr.clustering.enabled=true -jar start.jar
1406 <searchComponent name="clustering"
1407 enable="${solr.clustering.enabled:false}"
1408 class="solr.clustering.ClusteringComponent" >
1409 <!-- Declare an engine -->
1411 <!-- The name, only one can be named "default" -->
1412 <str name="name">default</str>
1414 <!-- Class name of Carrot2 clustering algorithm.
1416 Currently available algorithms are:
1418 * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1419 * org.carrot2.clustering.stc.STCClusteringAlgorithm
1420 * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1422 See http://project.carrot2.org/algorithms.html for the
1423 algorithm's characteristics.
1425 <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1427 <!-- Overriding values for Carrot2 default algorithm attributes.
1429 For a description of all available attributes, see:
1430 http://download.carrot2.org/stable/manual/#chapter.components.
1431 Use attribute key as name attribute of str elements
1432 below. These can be further overridden for individual
1433 requests by specifying attribute key as request parameter
1434 name and attribute value as parameter value.
1436 <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1438 <!-- Location of Carrot2 lexical resources.
1440 A directory from which to load Carrot2-specific stop words
1441 and stop labels. Absolute or relative to Solr config directory.
1442 If a specific resource (e.g. stopwords.en) is present in the
1443 specified dir, it will completely override the corresponding
1444 default one that ships with Carrot2.
1446 For an overview of Carrot2 lexical resources, see:
1447 http://download.carrot2.org/head/manual/#chapter.lexical-resources
1449 <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1451 <!-- The language to assume for the documents.
1453 For a list of allowed values, see:
1454 http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1456 <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1459 <str name="name">stc</str>
1460 <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1464 <!-- A request handler for demonstrating the clustering component
1466 This is purely as an example.
1468 In reality you will likely want to add the component to your
1469 already specified request handlers.
1471 <requestHandler name="/clustering"
1473 enable="${solr.clustering.enabled:false}"
1474 class="solr.SearchHandler">
1475 <lst name="defaults">
1476 <bool name="clustering">true</bool>
1477 <str name="clustering.engine">default</str>
1478 <bool name="clustering.results">true</bool>
1479 <!-- The title field -->
1480 <str name="carrot.title">name</str>
1481 <str name="carrot.url">id</str>
1482 <!-- The field to cluster on -->
1483 <str name="carrot.snippet">features</str>
1484 <!-- produce summaries -->
1485 <bool name="carrot.produceSummary">true</bool>
1486 <!-- the maximum number of labels per cluster -->
1487 <!--<int name="carrot.numDescriptions">5</int>-->
1488 <!-- produce sub clusters -->
1489 <bool name="carrot.outputSubClusters">false</bool>
1491 <str name="defType">edismax</str>
1493 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1495 <str name="q.alt">*:*</str>
1496 <str name="rows">10</str>
1497 <str name="fl">*,score</str>
1499 <arr name="last-components">
1500 <str>clustering</str>
1504 <!-- Terms Component
1506 http://wiki.apache.org/solr/TermsComponent
1508 A component to return terms and document frequency of those
1511 <searchComponent name="terms" class="solr.TermsComponent"/>
1513 <!-- A request handler for demonstrating the terms component -->
1514 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1515 <lst name="defaults">
1516 <bool name="terms">true</bool>
1517 <bool name="distrib">false</bool>
1519 <arr name="components">
1525 <!-- Query Elevation Component
1527 http://wiki.apache.org/solr/QueryElevationComponent
1529 a search component that enables you to configure the top
1530 results for a given query regardless of the normal lucene
1533 <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1534 <!-- pick a fieldType to analyze queries -->
1535 <str name="queryFieldType">string</str>
1536 <str name="config-file">elevate.xml</str>
1539 <!-- A request handler for demonstrating the elevator component -->
1540 <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1541 <lst name="defaults">
1542 <str name="echoParams">explicit</str>
1543 <str name="df">text</str>
1545 <arr name="last-components">
1550 <!-- Highlighting Component
1552 http://wiki.apache.org/solr/HighlightingParameters
1554 <searchComponent class="solr.HighlightComponent" name="highlight">
1556 <!-- Configure the standard fragmenter -->
1557 <!-- This could most likely be commented out in the "default" case -->
1558 <fragmenter name="gap"
1560 class="solr.highlight.GapFragmenter">
1561 <lst name="defaults">
1562 <int name="hl.fragsize">100</int>
1566 <!-- A regular-expression-based fragmenter
1567 (for sentence extraction)
1569 <fragmenter name="regex"
1570 class="solr.highlight.RegexFragmenter">
1571 <lst name="defaults">
1572 <!-- slightly smaller fragsizes work better because of slop -->
1573 <int name="hl.fragsize">70</int>
1574 <!-- allow 50% slop on fragment sizes -->
1575 <float name="hl.regex.slop">0.5</float>
1576 <!-- a basic sentence pattern -->
1577 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
1581 <!-- Configure the standard formatter -->
1582 <formatter name="html"
1584 class="solr.highlight.HtmlFormatter">
1585 <lst name="defaults">
1586 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1587 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1591 <!-- Configure the standard encoder -->
1592 <encoder name="html"
1593 class="solr.highlight.HtmlEncoder" />
1595 <!-- Configure the standard fragListBuilder -->
1596 <fragListBuilder name="simple"
1597 class="solr.highlight.SimpleFragListBuilder"/>
1599 <!-- Configure the single fragListBuilder -->
1600 <fragListBuilder name="single"
1601 class="solr.highlight.SingleFragListBuilder"/>
1603 <!-- Configure the weighted fragListBuilder -->
1604 <fragListBuilder name="weighted"
1606 class="solr.highlight.WeightedFragListBuilder"/>
1608 <!-- default tag FragmentsBuilder -->
1609 <fragmentsBuilder name="default"
1611 class="solr.highlight.ScoreOrderFragmentsBuilder">
1613 <lst name="defaults">
1614 <str name="hl.multiValuedSeparatorChar">/</str>
1619 <!-- multi-colored tag FragmentsBuilder -->
1620 <fragmentsBuilder name="colored"
1621 class="solr.highlight.ScoreOrderFragmentsBuilder">
1622 <lst name="defaults">
1623 <str name="hl.tag.pre"><![CDATA[
1624 <b style="background:yellow">,<b style="background:lawgreen">,
1625 <b style="background:aquamarine">,<b style="background:magenta">,
1626 <b style="background:palegreen">,<b style="background:coral">,
1627 <b style="background:wheat">,<b style="background:khaki">,
1628 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1629 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1633 <boundaryScanner name="default"
1635 class="solr.highlight.SimpleBoundaryScanner">
1636 <lst name="defaults">
1637 <str name="hl.bs.maxScan">10</str>
1638 <str name="hl.bs.chars">.,!? 	 </str>
1642 <boundaryScanner name="breakIterator"
1643 class="solr.highlight.BreakIteratorBoundaryScanner">
1644 <lst name="defaults">
1645 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1646 <str name="hl.bs.type">WORD</str>
1647 <!-- language and country are used when constructing Locale object. -->
1648 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1649 <str name="hl.bs.language">en</str>
1650 <str name="hl.bs.country">US</str>
1656 <!-- Update Processors
1658 Chains of Update Processor Factories for dealing with Update
1659 Requests can be declared, and then used by name in Update
1662 http://wiki.apache.org/solr/UpdateRequestProcessor
1667 An example dedup update processor that creates the "id" field
1668 on the fly based on the hash code of some other fields. This
1669 example has overwriteDupes set to false since we are using the
1670 id field as the signatureField and Solr will maintain
1671 uniqueness based on that anyway.
1675 <updateRequestProcessorChain name="dedupe">
1676 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1677 <bool name="enabled">true</bool>
1678 <str name="signatureField">id</str>
1679 <bool name="overwriteDupes">false</bool>
1680 <str name="fields">name,features,cat</str>
1681 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1683 <processor class="solr.LogUpdateProcessorFactory" />
1684 <processor class="solr.RunUpdateProcessorFactory" />
1685 </updateRequestProcessorChain>
1688 <!-- Language identification
1690 This example update chain identifies the language of the incoming
1691 documents using the langid contrib. The detected language is
1692 written to field language_s. No field name mapping is done.
1693 The fields used for detection are text, title, subject and description,
1694 making this example suitable for detecting languages form full-text
1695 rich documents injected via ExtractingRequestHandler.
1696 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1699 <updateRequestProcessorChain name="langid">
1700 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1701 <str name="langid.fl">text,title,subject,description</str>
1702 <str name="langid.langField">language_s</str>
1703 <str name="langid.fallback">en</str>
1705 <processor class="solr.LogUpdateProcessorFactory" />
1706 <processor class="solr.RunUpdateProcessorFactory" />
1707 </updateRequestProcessorChain>
1710 <!-- Script update processor
1712 This example hooks in an update processor implemented using JavaScript.
1714 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1717 <updateRequestProcessorChain name="script">
1718 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1719 <str name="script">update-script.js</str>
1721 <str name="config_param">example config parameter</str>
1724 <processor class="solr.RunUpdateProcessorFactory" />
1725 </updateRequestProcessorChain>
1728 <!-- Response Writers
1730 http://wiki.apache.org/solr/QueryResponseWriter
1732 Request responses will be written using the writer specified by
1733 the 'wt' request parameter matching the name of a registered
1736 The "default" writer is the default and will be used if 'wt' is
1737 not specified in the request.
1739 <!-- The following response writers are implicitly configured unless
1743 <queryResponseWriter name="xml"
1745 class="solr.XMLResponseWriter" />
1746 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1747 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1748 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1749 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1750 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1751 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1752 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1755 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1756 <!-- For the purposes of the tutorial, JSON responses are written as
1757 plain text so that they are easy to read in *any* browser.
1758 If you expect a MIME type of "application/json" just remove this override.
1760 <str name="content-type">text/plain; charset=UTF-8</str>
1761 </queryResponseWriter>
1764 Custom response writers can be declared as needed...
1766 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1769 <!-- XSLT response writer transforms the XML output by any xslt file found
1770 in Solr's conf/xslt directory. Changes to xslt files are checked for
1771 every xsltCacheLifetimeSeconds.
1773 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1774 <int name="xsltCacheLifetimeSeconds">5</int>
1775 </queryResponseWriter>
1779 http://wiki.apache.org/solr/SolrQuerySyntax
1781 Multiple QParserPlugins can be registered by name, and then
1782 used in either the "defType" param for the QueryComponent (used
1783 by SearchHandler) or in LocalParams
1785 <!-- example of registering a query parser -->
1787 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1790 <!-- Function Parsers
1792 http://wiki.apache.org/solr/FunctionQuery
1794 Multiple ValueSourceParsers can be registered by name, and then
1795 used as function names when using the "func" QParser.
1797 <!-- example of registering a custom function parser -->
1799 <valueSourceParser name="myfunc"
1800 class="com.mycompany.MyValueSourceParser" />
1804 <!-- Document Transformers
1805 http://wiki.apache.org/solr/DocTransformers
1808 Could be something like:
1809 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1810 <int name="connection">jdbc://....</int>
1813 To add a constant value to all docs, use:
1814 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1815 <int name="value">5</int>
1818 If you want the user to still be able to change it with _value:something_ use this:
1819 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1820 <double name="defaultValue">5</double>
1823 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1824 EditorialMarkerFactory will do exactly that:
1825 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1829 <!-- Legacy config for the admin interface -->
1831 <defaultQuery>*:*</defaultQuery>