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.
75 <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
76 <lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
78 <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
79 <lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
81 <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
82 <lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
84 <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
85 <lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
87 <!-- an exact 'path' can be used instead of a 'dir' to specify a
88 specific jar file. This will cause a serious error to be logged
89 if it can't be loaded.
92 <lib path="../a-jar-that-does-not-exist.jar" />
97 Used to specify an alternate directory to hold all index data
98 other than the default ./data under the Solr home. If
99 replication is in use, this should match the replication
102 <dataDir>${solr.data.dir:lui-solr4/collection1/data}</dataDir>
105 <!-- The DirectoryFactory to use for indexes.
107 solr.StandardDirectoryFactory is filesystem
108 based and tries to pick the best implementation for the current
109 JVM and platform. solr.NRTCachingDirectoryFactory, the default,
110 wraps solr.StandardDirectoryFactory and caches small files in memory
111 for better NRT performance.
113 One can force a particular implementation via solr.MMapDirectoryFactory,
114 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
116 solr.RAMDirectoryFactory is memory based, not
117 persistent, and doesn't work with replication.
119 <directoryFactory name="DirectoryFactory"
120 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
122 <!-- The CodecFactory for defining the format of the inverted index.
123 The default implementation is SchemaCodecFactory, which is the official Lucene
124 index format, but hooks into the schema to provide per-field customization of
125 the postings lists and per-document values in the fieldType element
126 (postingsFormat/docValuesFormat). Note that most of the alternative implementations
127 are experimental, so if you choose to customize the index format, its a good
128 idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
129 before upgrading to a newer version to avoid unnecessary reindexing.
131 <codecFactory class="solr.SchemaCodecFactory"/>
133 <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
135 <schemaFactory class="ManagedIndexSchemaFactory">
136 <bool name="mutable">true</bool>
137 <str name="managedSchemaResourceName">managed-schema</str>
140 When ManagedIndexSchemaFactory is specified, Solr will load the schema from
141 he resource named in 'managedSchemaResourceName', rather than from schema.xml.
142 Note that the managed schema resource CANNOT be named schema.xml. If the managed
143 schema does not exist, Solr will create it after reading schema.xml, then rename
144 'schema.xml' to 'schema.xml.bak'.
146 Do NOT hand edit the managed schema - external modifications will be ignored and
147 overwritten as a result of schema modification REST API calls.
149 When ManagedIndexSchemaFactory is specified with mutable = true, schema
150 modification REST API calls will be allowed; otherwise, error responses will be
151 sent back for these requests.
153 <schemaFactory class="ClassicIndexSchemaFactory"/>
155 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156 Index Config - These settings control low-level behavior of indexing
157 Most example settings here show the default value, but are commented
158 out, to more easily see where customizations have been made.
160 Note: This replaces <indexDefaults> and <mainIndex> from older versions
161 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
163 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
164 LimitTokenCountFilterFactory in your fieldType definition. E.g.
165 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
167 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
168 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
170 <!-- The maximum number of simultaneous threads that may be
171 indexing documents at once in IndexWriter; if more than this
172 many threads arrive they will wait for others to finish.
173 Default in Solr/Lucene is 8. -->
174 <!-- <maxIndexingThreads>8</maxIndexingThreads> -->
176 <!-- Expert: Enabling compound file will use less files for the index,
177 using fewer file descriptors on the expense of performance decrease.
178 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
179 <!-- <useCompoundFile>false</useCompoundFile> -->
181 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
182 indexing for buffering added documents and deletions before they are
183 flushed to the Directory.
184 maxBufferedDocs sets a limit on the number of documents buffered
186 If both ramBufferSizeMB and maxBufferedDocs is set, then
187 Lucene will flush based on whichever limit is hit first.
188 The default is 100 MB. -->
189 <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
190 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
192 <!-- Expert: Merge Policy
193 The Merge Policy in Lucene controls how merging of segments is done.
194 The default since Solr/Lucene 3.3 is TieredMergePolicy.
195 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
196 Even older versions of Lucene used LogDocMergePolicy.
199 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
200 <int name="maxMergeAtOnce">10</int>
201 <int name="segmentsPerTier">10</int>
206 The merge factor controls how many segments will get merged at a time.
207 For TieredMergePolicy, mergeFactor is a convenience parameter which
208 will set both MaxMergeAtOnce and SegmentsPerTier at once.
209 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
210 will be allowed before they are merged into one.
211 Default is 10 for both merge policies.
214 <mergeFactor>10</mergeFactor>
217 <!-- Expert: Merge Scheduler
218 The Merge Scheduler in Lucene controls how merges are
219 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
220 can perform merges in the background using separate threads.
221 The SerialMergeScheduler (Lucene 2.2 default) does not.
224 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
229 This option specifies which Lucene LockFactory implementation
232 single = SingleInstanceLockFactory - suggested for a
233 read-only index or when there is no possibility of
234 another process trying to modify the index.
235 native = NativeFSLockFactory - uses OS native file locking.
236 Do not use when multiple solr webapps in the same
237 JVM are attempting to share a single index.
238 simple = SimpleFSLockFactory - uses a plain file for locking
240 Defaults: 'native' is default for Solr3.6 and later, otherwise
241 'simple' is the default
243 More details on the nuances of each LockFactory...
244 http://wiki.apache.org/lucene-java/AvailableLockFactories
246 <lockType>${solr.lock.type:native}</lockType>
248 <!-- Unlock On Startup
250 If true, unlock any held write or commit locks on startup.
251 This defeats the locking mechanism that allows multiple
252 processes to safely access a lucene index, and should be used
253 with care. Default is "false".
255 This is not needed if lock type is 'single'
258 <unlockOnStartup>false</unlockOnStartup>
261 <!-- Expert: Controls how often Lucene loads terms into memory
262 Default is 128 and is likely good for most everyone.
264 <!-- <termIndexInterval>128</termIndexInterval> -->
266 <!-- If true, IndexReaders will be reopened (often more efficient)
267 instead of closed and then opened. Default: true
270 <reopenReaders>true</reopenReaders>
273 <!-- Commit Deletion Policy
274 Custom deletion policies can be specified here. The class must
275 implement org.apache.lucene.index.IndexDeletionPolicy.
277 The default Solr IndexDeletionPolicy implementation supports
278 deleting index commit points on number of commits, age of
279 commit point and optimized status.
281 The latest commit point should always be preserved regardless
285 <deletionPolicy class="solr.SolrDeletionPolicy">
287 <!-- The number of commit points to be kept -->
288 <!-- <str name="maxCommitsToKeep">1</str> -->
289 <!-- The number of optimized commit points to be kept -->
290 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
292 Delete all commit points once they have reached the given age.
293 Supports DateMathParser syntax e.g.
296 <str name="maxCommitAge">30MINUTES</str>
297 <str name="maxCommitAge">1DAY</str>
303 <!-- Lucene Infostream
305 To aid in advanced debugging, Lucene provides an "InfoStream"
306 of detailed information when indexing.
308 Setting the value to true will instruct the underlying Lucene
309 IndexWriter to write its info stream to solr's log. By default,
310 this is enabled here, and controlled through log4j.properties.
312 <infoStream>true</infoStream>
318 This example enables JMX if and only if an existing MBeanServer
319 is found, use this if you want to configure JMX through JVM
320 parameters. Remove this to disable exposing Solr configuration
321 and statistics to JMX.
323 For more details see http://wiki.apache.org/solr/SolrJmx
326 <!-- If you want to connect to a particular server, specify the
329 <!-- <jmx agentId="myAgent" /> -->
330 <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
331 <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
334 <!-- The default high-performance update handler -->
335 <updateHandler class="solr.DirectUpdateHandler2">
337 <!-- Enables a transaction log, used for real-time get, durability, and
338 and solr cloud replica recovery. The log can grow as big as
339 uncommitted changes to the index, so use of a hard autoCommit
340 is recommended (see below).
341 "dir" - the target directory for transaction logs, defaults to the
342 solr data directory. -->
344 <str name="dir">${solr.ulog.dir:}</str>
349 Perform a hard commit automatically under certain conditions.
350 Instead of enabling autoCommit, consider using "commitWithin"
351 when adding documents.
353 http://wiki.apache.org/solr/UpdateXmlMessages
355 maxDocs - Maximum number of documents to add since the last
356 commit before automatically triggering a new commit.
358 maxTime - Maximum amount of time in ms that is allowed to pass
359 since a document was added before automatically
360 triggering a new commit.
361 openSearcher - if false, the commit causes recent index changes
362 to be flushed to stable storage, but does not cause a new
363 searcher to be opened to make those changes visible.
365 If the updateLog is enabled, then it's highly recommended to
366 have some sort of hard autoCommit to limit the log size.
369 <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
370 <openSearcher>false</openSearcher>
373 <!-- softAutoCommit is like autoCommit except it causes a
374 'soft' commit which only ensures that changes are visible
375 but does not ensure that data is synced to disk. This is
376 faster and more near-realtime friendly than a hard commit.
380 <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
383 <!-- Update Related Event Listeners
385 Various IndexWriter related events can trigger Listeners to
388 postCommit - fired after every commit or optimize command
389 postOptimize - fired after every optimize command
391 <!-- The RunExecutableListener executes an external command from a
392 hook such as postCommit or postOptimize.
394 exe - the name of the executable to run
395 dir - dir to use as the current working directory. (default=".")
396 wait - the calling thread waits until the executable returns.
398 args - the arguments to pass to the program. (default is none)
399 env - environment variables to set. (default is none)
401 <!-- This example shows how RunExecutableListener could be used
402 with the script based replication...
403 http://wiki.apache.org/solr/CollectionDistribution
406 <listener event="postCommit" class="solr.RunExecutableListener">
407 <str name="exe">solr/bin/snapshooter</str>
408 <str name="dir">.</str>
409 <bool name="wait">true</bool>
410 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
411 <arr name="env"> <str>MYVAR=val1</str> </arr>
417 <!-- IndexReaderFactory
419 Use the following format to specify a custom IndexReaderFactory,
420 which allows for alternate IndexReader implementations.
422 ** Experimental Feature **
424 Please note - Using a custom IndexReaderFactory may prevent
425 certain other features from working. The API to
426 IndexReaderFactory may change without warning or may even be
427 removed from future releases if the problems cannot be
431 ** Features that may not work with custom IndexReaderFactory **
433 The ReplicationHandler assumes a disk-resident index. Using a
434 custom IndexReader implementation may cause incompatibility
435 with ReplicationHandler and may cause replication to not work
436 correctly. See SOLR-1366 for details.
440 <indexReaderFactory name="IndexReaderFactory" class="package.class">
441 <str name="someArg">Some Value</str>
442 </indexReaderFactory >
444 <!-- By explicitly declaring the Factory, the termIndexDivisor can
448 <indexReaderFactory name="IndexReaderFactory"
449 class="solr.StandardIndexReaderFactory">
450 <int name="setTermIndexDivisor">12</int>
451 </indexReaderFactory >
454 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
455 Query section - these settings control query time things like caches
456 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
458 <!-- Max Boolean Clauses
460 Maximum number of clauses in each BooleanQuery, an exception
461 is thrown if exceeded.
465 This option actually modifies a global Lucene property that
466 will affect all SolrCores. If multiple solrconfig.xml files
467 disagree on this property, the value at any given moment will
468 be based on the last SolrCore to be initialized.
471 <maxBooleanClauses>1024</maxBooleanClauses>
474 <!-- Solr Internal Query Caches
476 There are two implementations of cache available for Solr,
477 LRUCache, based on a synchronized LinkedHashMap, and
478 FastLRUCache, based on a ConcurrentHashMap.
480 FastLRUCache has faster gets and slower puts in single
481 threaded operation and thus is generally faster than LRUCache
482 when the hit ratio of the cache is high (> 75%), and may be
483 faster under other scenarios on multi-cpu systems.
488 Cache used by SolrIndexSearcher for filters (DocSets),
489 unordered sets of *all* documents that match a query. When a
490 new searcher is opened, its caches may be prepopulated or
491 "autowarmed" using data from caches in the old searcher.
492 autowarmCount is the number of items to prepopulate. For
493 LRUCache, the autowarmed items will be the most recently
497 class - the SolrCache implementation LRUCache or
498 (LRUCache or FastLRUCache)
499 size - the maximum number of entries in the cache
500 initialSize - the initial capacity (number of entries) of
501 the cache. (see java.util.HashMap)
502 autowarmCount - the number of entries to prepopulate from
505 <filterCache class="solr.FastLRUCache"
510 <!-- Query Result Cache
512 Caches results of searches - ordered lists of document ids
513 (DocList) based on a query, a sort, and the range of documents requested.
515 <queryResultCache class="solr.LRUCache"
522 Caches Lucene Document objects (the stored fields for each
523 document). Since Lucene internal document ids are transient,
524 this cache will not be autowarmed.
526 <documentCache class="solr.LRUCache"
531 <!-- Field Value Cache
533 Cache used to hold field values that are quickly accessible
534 by document id. The fieldValueCache is created by default
535 even if not configured here.
538 <fieldValueCache class="solr.FastLRUCache"
546 Example of a generic cache. These caches may be accessed by
547 name through SolrIndexSearcher.getCache(),cacheLookup(), and
548 cacheInsert(). The purpose is to enable easy caching of
549 user/application level data. The regenerator argument should
550 be specified as an implementation of solr.CacheRegenerator
551 if autowarming is desired.
554 <cache name="myUserCache"
555 class="solr.LRUCache"
559 regenerator="com.mycompany.MyRegenerator"
564 <!-- Lazy Field Loading
566 If true, stored fields that are not requested will be loaded
567 lazily. This can result in a significant speed improvement
568 if the usual case is to not load all stored fields,
569 especially if the skipped fields are large compressed text
572 <enableLazyFieldLoading>true</enableLazyFieldLoading>
574 <!-- Use Filter For Sorted Query
576 A possible optimization that attempts to use a filter to
577 satisfy a search. If the requested sort does not include
578 score, then the filterCache will be checked for a filter
579 matching the query. If found, the filter will be used as the
580 source of document ids, and then the sort will be applied to
583 For most situations, this will not be useful unless you
584 frequently get the same search repeatedly with different sort
585 options, and none of them ever use "score"
588 <useFilterForSortedQuery>true</useFilterForSortedQuery>
591 <!-- Result Window Size
593 An optimization for use with the queryResultCache. When a search
594 is requested, a superset of the requested number of document ids
595 are collected. For example, if a search for a particular query
596 requests matching documents 10 through 19, and queryWindowSize is 50,
597 then documents 0 through 49 will be collected and cached. Any further
598 requests in that range can be satisfied via the cache.
600 <queryResultWindowSize>20</queryResultWindowSize>
602 <!-- Maximum number of documents to cache for any entry in the
605 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
607 <!-- Query Related Event Listeners
609 Various IndexSearcher related events can trigger Listeners to
612 newSearcher - fired whenever a new searcher is being prepared
613 and there is a current searcher handling requests (aka
614 registered). It can be used to prime certain caches to
615 prevent long request times for certain requests.
617 firstSearcher - fired whenever a new searcher is being
618 prepared but there is no current registered searcher to handle
619 requests or to gain autowarming data from.
623 <!-- QuerySenderListener takes an array of NamedList and executes a
624 local query request for each NamedList in sequence.
626 <listener event="newSearcher" class="solr.QuerySenderListener">
629 <str name="q">database:*</str>
630 <str name="facet">true</str>
631 <str name="facet.mincount">1</str>
632 <str name="facet.field">author_exact</str>
633 <str name="facet.field">subject_exact</str>
634 <str name="facet.field">medium_exact</str>
635 <str name="facet.field">date</str>
636 <str name="facet.field">database</str>
640 <listener event="firstSearcher" class="solr.QuerySenderListener">
643 <str name="q">database:*</str>
644 <str name="facet">true</str>
645 <str name="facet.mincount">1</str>
646 <str name="facet.field">author_exact</str>
647 <str name="facet.field">subject_exact</str>
648 <str name="facet.field">medium_exact</str>
649 <str name="facet.field">date</str>
650 <str name="facet.field">database</str>
655 <!-- Use Cold Searcher
657 If a search request comes in and there is no current
658 registered searcher, then immediately register the still
659 warming searcher and use it. If "false" then all requests
660 will block until the first searcher is done warming.
662 <useColdSearcher>false</useColdSearcher>
664 <!-- Max Warming Searchers
666 Maximum number of searchers that may be warming in the
667 background concurrently. An error is returned if this limit
670 Recommend values of 1-2 for read-only slaves, higher for
671 masters w/o cache warming.
673 <maxWarmingSearchers>2</maxWarmingSearchers>
678 <!-- Request Dispatcher
680 This section contains instructions for how the SolrDispatchFilter
681 should behave when processing requests for this SolrCore.
683 handleSelect is a legacy option that affects the behavior of requests
684 such as /select?qt=XXX
686 handleSelect="true" will cause the SolrDispatchFilter to process
687 the request and dispatch the query to a handler specified by the
688 "qt" param, assuming "/select" isn't already registered.
690 handleSelect="false" will cause the SolrDispatchFilter to
691 ignore "/select" requests, resulting in a 404 unless a handler
692 is explicitly registered with the name "/select"
694 handleSelect="true" is not recommended for new users, but is the default
695 for backwards compatibility
697 <requestDispatcher handleSelect="false" >
700 These settings indicate how Solr Requests may be parsed, and
701 what restrictions may be placed on the ContentStreams from
704 enableRemoteStreaming - enables use of the stream.file
705 and stream.url parameters for specifying remote streams.
707 multipartUploadLimitInKB - specifies the max size (in KiB) of
708 Multipart File Uploads that Solr will allow in a Request.
710 formdataUploadLimitInKB - specifies the max size (in KiB) of
711 form data (application/x-www-form-urlencoded) sent via
712 POST. You can use POST to pass request parameters not
713 fitting into the URL.
715 addHttpRequestToContext - if set to true, it will instruct
716 the requestParsers to include the original HttpServletRequest
717 object in the context map of the SolrQueryRequest under the
718 key "httpRequest". It will not be used by any of the existing
719 Solr components, but may be useful when developing custom
723 The settings below authorize Solr to fetch remote files, You
724 should make sure your system has some authentication before
725 using enableRemoteStreaming="true"
728 <requestParsers enableRemoteStreaming="true"
729 multipartUploadLimitInKB="2048000"
730 formdataUploadLimitInKB="2048"
731 addHttpRequestToContext="false"/>
735 Set HTTP caching related parameters (for proxy caches and clients).
737 The options below instruct Solr not to output any HTTP Caching
740 <httpCaching never304="true" />
741 <!-- If you include a <cacheControl> directive, it will be used to
742 generate a Cache-Control header (as well as an Expires header
743 if the value contains "max-age=")
745 By default, no Cache-Control header is generated.
747 You can use the <cacheControl> option even if you have set
751 <httpCaching never304="true" >
752 <cacheControl>max-age=30, public</cacheControl>
755 <!-- To enable Solr to respond with automatically generated HTTP
756 Caching headers, and to response to Cache Validation requests
757 correctly, set the value of never304="false"
759 This will cause Solr to generate Last-Modified and ETag
760 headers based on the properties of the Index.
762 The following options can also be specified to affect the
763 values of these headers...
765 lastModFrom - the default value is "openTime" which means the
766 Last-Modified value (and validation against If-Modified-Since
767 requests) will all be relative to when the current Searcher
768 was opened. You can change it to lastModFrom="dirLastMod" if
769 you want the value to exactly correspond to when the physical
770 index was last modified.
772 etagSeed="..." is an option you can change to force the ETag
773 header (and validation against If-None-Match requests) to be
774 different even if the index has not changed (ie: when making
775 significant changes to your config file)
777 (lastModifiedFrom and etagSeed are both ignored if you use
778 the never304="true" option)
781 <httpCaching lastModifiedFrom="openTime"
783 <cacheControl>max-age=30, public</cacheControl>
788 <!-- Request Handlers
790 http://wiki.apache.org/solr/SolrRequestHandler
792 Incoming queries will be dispatched to a specific handler by name
793 based on the path specified in the request.
795 Legacy behavior: If the request path uses "/select" but no Request
796 Handler has that name, and if handleSelect="true" has been specified in
797 the requestDispatcher, then the Request Handler is dispatched based on
798 the qt parameter. Handlers without a leading '/' are accessed this way
799 like so: http://host/app/[core/]select?qt=name If no qt is
800 given, then the requestHandler that declares default="true" will be
801 used or the one named "standard".
803 If a Request Handler is declared with startup="lazy", then it will
804 not be initialized until the first request that uses it.
809 http://wiki.apache.org/solr/SearchHandler
811 For processing Search Queries, the primary Request Handler
812 provided with Solr is "SearchHandler" It delegates to a sequent
813 of SearchComponents (see below) and supports distributed
814 queries across multiple shards
816 <requestHandler name="/select" class="solr.SearchHandler">
817 <!-- default values for query parameters can be specified, these
818 will be overridden by parameters in the request
820 <lst name="defaults">
821 <str name="echoParams">explicit</str>
822 <int name="rows">10</int>
823 <str name="df">text</str>
825 <!-- In addition to defaults, "appends" params can be specified
826 to identify values which should be appended to the list of
827 multi-val params from the query (or the existing "defaults").
829 <!-- In this example, the param "fq=instock:true" would be appended to
830 any query time fq params the user may specify, as a mechanism for
831 partitioning the index, independent of any user selected filtering
832 that may also be desired (perhaps as a result of faceted searching).
834 NOTE: there is *absolutely* nothing a client can do to prevent these
835 "appends" values from being used, so don't use this mechanism
836 unless you are sure you always want it.
840 <str name="fq">inStock:true</str>
843 <!-- "invariants" are a way of letting the Solr maintainer lock down
844 the options available to Solr clients. Any params values
845 specified here are used regardless of what values may be specified
846 in either the query, the "defaults", or the "appends" params.
848 In this example, the facet.field and facet.query params would
849 be fixed, limiting the facets clients can use. Faceting is
850 not turned on by default - but if the client does specify
851 facet=true in the request, these are the only facets they
852 will be able to see counts for; regardless of what other
853 facet.field or facet.query params they may specify.
855 NOTE: there is *absolutely* nothing a client can do to prevent these
856 "invariants" values from being used, so don't use this mechanism
857 unless you are sure you always want it.
860 <lst name="invariants">
861 <str name="facet.field">cat</str>
862 <str name="facet.field">manu_exact</str>
863 <str name="facet.query">price:[* TO 500]</str>
864 <str name="facet.query">price:[500 TO *]</str>
867 <!-- If the default list of SearchComponents is not desired, that
868 list can either be overridden completely, or components can be
869 prepended or appended to the default list. (see below)
872 <arr name="components">
873 <str>nameOfCustomComponent1</str>
874 <str>nameOfCustomComponent2</str>
879 <!-- A request handler that returns indented JSON by default -->
880 <requestHandler name="/query" class="solr.SearchHandler">
881 <lst name="defaults">
882 <str name="echoParams">explicit</str>
883 <str name="wt">json</str>
884 <str name="indent">true</str>
885 <str name="df">text</str>
890 <!-- realtime get handler, guaranteed to return the latest stored fields of
891 any document, without the need to commit or open a new searcher. The
892 current implementation relies on the updateLog feature being enabled. -->
893 <requestHandler name="/get" class="solr.RealTimeGetHandler">
894 <lst name="defaults">
895 <str name="omitHeader">true</str>
896 <str name="wt">json</str>
897 <str name="indent">true</str>
902 <!-- A Robust Example
904 This example SearchHandler declaration shows off usage of the
905 SearchHandler with many defaults declared
907 Note that multiple instances of the same Request Handler
908 (SearchHandler) can be registered multiple times with different
909 names (and different init parameters)
911 <requestHandler name="/browse" class="solr.SearchHandler">
912 <lst name="defaults">
913 <str name="echoParams">explicit</str>
915 <!-- VelocityResponseWriter settings -->
916 <str name="wt">velocity</str>
917 <str name="v.template">browse</str>
918 <str name="v.layout">layout</str>
919 <str name="title">Solritas</str>
921 <!-- Query settings -->
922 <str name="defType">edismax</str>
924 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
925 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
927 <str name="df">text</str>
928 <str name="mm">100%</str>
929 <str name="q.alt">*:*</str>
930 <str name="rows">10</str>
931 <str name="fl">*,score</str>
934 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
935 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
937 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
938 <int name="mlt.count">3</int>
940 <!-- Faceting defaults -->
941 <str name="facet">on</str>
942 <str name="facet.field">cat</str>
943 <str name="facet.field">manu_exact</str>
944 <str name="facet.field">content_type</str>
945 <str name="facet.field">author_s</str>
946 <str name="facet.query">ipod</str>
947 <str name="facet.query">GB</str>
948 <str name="facet.mincount">1</str>
949 <str name="facet.pivot">cat,inStock</str>
950 <str name="facet.range.other">after</str>
951 <str name="facet.range">price</str>
952 <int name="f.price.facet.range.start">0</int>
953 <int name="f.price.facet.range.end">600</int>
954 <int name="f.price.facet.range.gap">50</int>
955 <str name="facet.range">popularity</str>
956 <int name="f.popularity.facet.range.start">0</int>
957 <int name="f.popularity.facet.range.end">10</int>
958 <int name="f.popularity.facet.range.gap">3</int>
959 <str name="facet.range">manufacturedate_dt</str>
960 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
961 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
962 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
963 <str name="f.manufacturedate_dt.facet.range.other">before</str>
964 <str name="f.manufacturedate_dt.facet.range.other">after</str>
966 <!-- Highlighting defaults -->
967 <str name="hl">on</str>
968 <str name="hl.fl">content features title name</str>
969 <str name="hl.encoder">html</str>
970 <str name="hl.simple.pre"><b></str>
971 <str name="hl.simple.post"></b></str>
972 <str name="f.title.hl.fragsize">0</str>
973 <str name="f.title.hl.alternateField">title</str>
974 <str name="f.name.hl.fragsize">0</str>
975 <str name="f.name.hl.alternateField">name</str>
976 <str name="f.content.hl.snippets">3</str>
977 <str name="f.content.hl.fragsize">200</str>
978 <str name="f.content.hl.alternateField">content</str>
979 <str name="f.content.hl.maxAlternateFieldLength">750</str>
981 <!-- Spell checking defaults -->
982 <str name="spellcheck">on</str>
983 <str name="spellcheck.extendedResults">false</str>
984 <str name="spellcheck.count">5</str>
985 <str name="spellcheck.alternativeTermCount">2</str>
986 <str name="spellcheck.maxResultsForSuggest">5</str>
987 <str name="spellcheck.collate">true</str>
988 <str name="spellcheck.collateExtendedResults">true</str>
989 <str name="spellcheck.maxCollationTries">5</str>
990 <str name="spellcheck.maxCollations">3</str>
993 <!-- append spellchecking to our list of components -->
994 <arr name="last-components">
995 <str>spellcheck</str>
1000 <!-- Update Request Handler.
1002 http://wiki.apache.org/solr/UpdateXmlMessages
1004 The canonical Request Handler for Modifying the Index through
1005 commands specified using XML, JSON, CSV, or JAVABIN
1007 Note: Since solr1.1 requestHandlers requires a valid content
1008 type header if posted in the body. For example, curl now
1009 requires: -H 'Content-type:text/xml; charset=utf-8'
1011 To override the request content type and force a specific
1012 Content-type, use the request parameter:
1013 ?update.contentType=text/csv
1015 This handler will pick a response format to match the input
1016 if the 'wt' parameter is not explicit
1018 <requestHandler name="/update" class="solr.UpdateRequestHandler">
1019 <!-- See below for information on defining
1020 updateRequestProcessorChains that can be used by name
1021 on each Update Request
1024 <lst name="defaults">
1025 <str name="update.chain">dedupe</str>
1030 <!-- for back compat with clients using /update/json and /update/csv -->
1031 <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler">
1032 <lst name="defaults">
1033 <str name="stream.contentType">application/json</str>
1036 <requestHandler name="/update/csv" class="solr.CSVRequestHandler">
1037 <lst name="defaults">
1038 <str name="stream.contentType">application/csv</str>
1042 <!-- Solr Cell Update Request Handler
1044 http://wiki.apache.org/solr/ExtractingRequestHandler
1047 <requestHandler name="/update/extract"
1049 class="solr.extraction.ExtractingRequestHandler" >
1050 <lst name="defaults">
1051 <str name="lowernames">true</str>
1052 <str name="uprefix">ignored_</str>
1054 <!-- capture link hrefs but ignore div attributes -->
1055 <str name="captureAttr">true</str>
1056 <str name="fmap.a">links</str>
1057 <str name="fmap.div">ignored_</str>
1062 <!-- Field Analysis Request Handler
1064 RequestHandler that provides much the same functionality as
1065 analysis.jsp. Provides the ability to specify multiple field
1066 types and field names in the same request and outputs
1067 index-time and query-time analysis for each of them.
1069 Request parameters are:
1070 analysis.fieldname - field name whose analyzers are to be used
1072 analysis.fieldtype - field type whose analyzers are to be used
1073 analysis.fieldvalue - text for index-time analysis
1074 q (or analysis.q) - text for query time analysis
1075 analysis.showmatch (true|false) - When set to true and when
1076 query analysis is performed, the produced tokens of the
1077 field value analysis will be marked as "matched" for every
1078 token that is produces by the query analysis
1080 <requestHandler name="/analysis/field"
1082 class="solr.FieldAnalysisRequestHandler" />
1085 <!-- Document Analysis Handler
1087 http://wiki.apache.org/solr/AnalysisRequestHandler
1089 An analysis handler that provides a breakdown of the analysis
1090 process of provided documents. This handler expects a (single)
1091 content stream with the following format:
1095 <field name="id">1</field>
1096 <field name="name">The Name</field>
1097 <field name="text">The Text Value</field>
1104 Note: Each document must contain a field which serves as the
1105 unique key. This key is used in the returned response to associate
1106 an analysis breakdown to the analyzed document.
1108 Like the FieldAnalysisRequestHandler, this handler also supports
1109 query analysis by sending either an "analysis.query" or "q"
1110 request parameter that holds the query text to be analyzed. It
1111 also supports the "analysis.showmatch" parameter which when set to
1112 true, all field tokens that match the query tokens will be marked
1115 <requestHandler name="/analysis/document"
1116 class="solr.DocumentAnalysisRequestHandler"
1121 Admin Handlers - This will register all the standard admin
1124 <requestHandler name="/admin/"
1125 class="solr.admin.AdminHandlers" />
1126 <!-- This single handler is equivalent to the following... -->
1128 <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1129 <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1130 <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1131 <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1132 <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1133 <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1135 <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1136 register the ShowFileRequestHandler using:
1139 <requestHandler name="/admin/file"
1140 class="solr.admin.ShowFileRequestHandler" >
1141 <lst name="invariants">
1142 <str name="hidden">synonyms.txt</str>
1143 <str name="hidden">anotherfile.txt</str>
1148 <!-- ping/healthcheck -->
1149 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1150 <lst name="invariants">
1151 <str name="q">solrpingquery</str>
1153 <lst name="defaults">
1154 <str name="echoParams">all</str>
1156 <!-- An optional feature of the PingRequestHandler is to configure the
1157 handler with a "healthcheckFile" which can be used to enable/disable
1158 the PingRequestHandler.
1159 relative paths are resolved against the data dir
1161 <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1164 <!-- Echo the request contents back to the client -->
1165 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1166 <lst name="defaults">
1167 <str name="echoParams">explicit</str>
1168 <str name="echoHandler">true</str>
1172 <!-- Solr Replication
1174 The SolrReplicationHandler supports replicating indexes from a
1175 "master" used for indexing and "slaves" used for queries.
1177 http://wiki.apache.org/solr/SolrReplication
1179 It is also necessary for SolrCloud to function (in Cloud mode, the
1180 replication handler is used to bulk transfer segments when nodes
1181 are added or need to recover).
1183 https://wiki.apache.org/solr/SolrCloud/
1185 <requestHandler name="/replication" class="solr.ReplicationHandler" >
1187 To enable simple master/slave replication, uncomment one of the
1188 sections below, depending on whether this solr instance should be
1189 the "master" or a "slave". If this instance is a "slave" you will
1190 also need to fill in the masterUrl to point to a real machine.
1194 <str name="replicateAfter">commit</str>
1195 <str name="replicateAfter">startup</str>
1196 <str name="confFiles">schema.xml,stopwords.txt</str>
1201 <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1202 <str name="pollInterval">00:00:60</str>
1207 <!-- Search Components
1209 Search components are registered to SolrCore and used by
1210 instances of SearchHandler (which can access them by name)
1212 By default, the following components are available:
1214 <searchComponent name="query" class="solr.QueryComponent" />
1215 <searchComponent name="facet" class="solr.FacetComponent" />
1216 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1217 <searchComponent name="highlight" class="solr.HighlightComponent" />
1218 <searchComponent name="stats" class="solr.StatsComponent" />
1219 <searchComponent name="debug" class="solr.DebugComponent" />
1221 Default configuration in a requestHandler would look like:
1223 <arr name="components">
1227 <str>highlight</str>
1232 If you register a searchComponent to one of the standard names,
1233 that will be used instead of the default.
1235 To insert components before or after the 'standard' components, use:
1237 <arr name="first-components">
1238 <str>myFirstComponentName</str>
1241 <arr name="last-components">
1242 <str>myLastComponentName</str>
1245 NOTE: The component registered with the name "debug" will
1246 always be executed after the "last-components"
1252 The spell check component can return a list of alternative spelling
1255 http://wiki.apache.org/solr/SpellCheckComponent
1257 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1259 <str name="queryAnalyzerFieldType">text_general</str>
1261 <!-- Multiple "Spell Checkers" can be declared and used by this
1265 <!-- a spellchecker built from a field of the main index -->
1266 <lst name="spellchecker">
1267 <str name="name">default</str>
1268 <str name="field">text</str>
1269 <str name="classname">solr.DirectSolrSpellChecker</str>
1270 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1271 <str name="distanceMeasure">internal</str>
1272 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1273 <float name="accuracy">0.5</float>
1274 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1275 <int name="maxEdits">2</int>
1276 <!-- the minimum shared prefix when enumerating terms -->
1277 <int name="minPrefix">1</int>
1278 <!-- maximum number of inspections per result. -->
1279 <int name="maxInspections">5</int>
1280 <!-- minimum length of a query term to be considered for correction -->
1281 <int name="minQueryLength">4</int>
1282 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1283 <float name="maxQueryFrequency">0.01</float>
1284 <!-- uncomment this to require suggestions to occur in 1% of the documents
1285 <float name="thresholdTokenFrequency">.01</float>
1289 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1290 <lst name="spellchecker">
1291 <str name="name">wordbreak</str>
1292 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1293 <str name="field">name</str>
1294 <str name="combineWords">true</str>
1295 <str name="breakWords">true</str>
1296 <int name="maxChanges">10</int>
1299 <!-- a spellchecker that uses a different distance measure -->
1301 <lst name="spellchecker">
1302 <str name="name">jarowinkler</str>
1303 <str name="field">spell</str>
1304 <str name="classname">solr.DirectSolrSpellChecker</str>
1305 <str name="distanceMeasure">
1306 org.apache.lucene.search.spell.JaroWinklerDistance
1311 <!-- a spellchecker that use an alternate comparator
1313 comparatorClass be one of:
1315 2. freq (Frequency first, then score)
1316 3. A fully qualified class name
1319 <lst name="spellchecker">
1320 <str name="name">freq</str>
1321 <str name="field">lowerfilt</str>
1322 <str name="classname">solr.DirectSolrSpellChecker</str>
1323 <str name="comparatorClass">freq</str>
1326 <!-- A spellchecker that reads the list of words from a file -->
1328 <lst name="spellchecker">
1329 <str name="classname">solr.FileBasedSpellChecker</str>
1330 <str name="name">file</str>
1331 <str name="sourceLocation">spellings.txt</str>
1332 <str name="characterEncoding">UTF-8</str>
1333 <str name="spellcheckIndexDir">spellcheckerFile</str>
1338 <!-- A request handler for demonstrating the spellcheck component.
1340 NOTE: This is purely as an example. The whole purpose of the
1341 SpellCheckComponent is to hook it into the request handler that
1342 handles your normal user queries so that a separate request is
1343 not needed to get suggestions.
1345 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1346 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1348 See http://wiki.apache.org/solr/SpellCheckComponent for details
1349 on the request parameters.
1351 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1352 <lst name="defaults">
1353 <str name="df">text</str>
1354 <!-- Solr will use suggestions from both the 'default' spellchecker
1355 and from the 'wordbreak' spellchecker and combine them.
1356 collations (re-written queries) can include a combination of
1357 corrections from both spellcheckers -->
1358 <str name="spellcheck.dictionary">default</str>
1359 <str name="spellcheck.dictionary">wordbreak</str>
1360 <str name="spellcheck">on</str>
1361 <str name="spellcheck.extendedResults">true</str>
1362 <str name="spellcheck.count">10</str>
1363 <str name="spellcheck.alternativeTermCount">5</str>
1364 <str name="spellcheck.maxResultsForSuggest">5</str>
1365 <str name="spellcheck.collate">true</str>
1366 <str name="spellcheck.collateExtendedResults">true</str>
1367 <str name="spellcheck.maxCollationTries">10</str>
1368 <str name="spellcheck.maxCollations">5</str>
1370 <arr name="last-components">
1371 <str>spellcheck</str>
1375 <!-- Term Vector Component
1377 http://wiki.apache.org/solr/TermVectorComponent
1379 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1381 <!-- A request handler for demonstrating the term vector component
1383 This is purely as an example.
1385 In reality you will likely want to add the component to your
1386 already specified request handlers.
1388 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1389 <lst name="defaults">
1390 <str name="df">text</str>
1391 <bool name="tv">true</bool>
1393 <arr name="last-components">
1394 <str>tvComponent</str>
1398 <!-- Clustering Component
1400 http://wiki.apache.org/solr/ClusteringComponent
1402 You'll need to set the solr.clustering.enabled system property
1403 when running solr to run with clustering enabled:
1405 java -Dsolr.clustering.enabled=true -jar start.jar
1408 <searchComponent name="clustering"
1409 enable="${solr.clustering.enabled:false}"
1410 class="solr.clustering.ClusteringComponent" >
1411 <!-- Declare an engine -->
1413 <!-- The name, only one can be named "default" -->
1414 <str name="name">default</str>
1416 <!-- Class name of Carrot2 clustering algorithm.
1418 Currently available algorithms are:
1420 * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1421 * org.carrot2.clustering.stc.STCClusteringAlgorithm
1422 * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1424 See http://project.carrot2.org/algorithms.html for the
1425 algorithm's characteristics.
1427 <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1429 <!-- Overriding values for Carrot2 default algorithm attributes.
1431 For a description of all available attributes, see:
1432 http://download.carrot2.org/stable/manual/#chapter.components.
1433 Use attribute key as name attribute of str elements
1434 below. These can be further overridden for individual
1435 requests by specifying attribute key as request parameter
1436 name and attribute value as parameter value.
1438 <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1440 <!-- Location of Carrot2 lexical resources.
1442 A directory from which to load Carrot2-specific stop words
1443 and stop labels. Absolute or relative to Solr config directory.
1444 If a specific resource (e.g. stopwords.en) is present in the
1445 specified dir, it will completely override the corresponding
1446 default one that ships with Carrot2.
1448 For an overview of Carrot2 lexical resources, see:
1449 http://download.carrot2.org/head/manual/#chapter.lexical-resources
1451 <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1453 <!-- The language to assume for the documents.
1455 For a list of allowed values, see:
1456 http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1458 <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1461 <str name="name">stc</str>
1462 <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1466 <!-- A request handler for demonstrating the clustering component
1468 This is purely as an example.
1470 In reality you will likely want to add the component to your
1471 already specified request handlers.
1473 <requestHandler name="/clustering"
1475 enable="${solr.clustering.enabled:false}"
1476 class="solr.SearchHandler">
1477 <lst name="defaults">
1478 <bool name="clustering">true</bool>
1479 <str name="clustering.engine">default</str>
1480 <bool name="clustering.results">true</bool>
1481 <!-- The title field -->
1482 <str name="carrot.title">name</str>
1483 <str name="carrot.url">id</str>
1484 <!-- The field to cluster on -->
1485 <str name="carrot.snippet">features</str>
1486 <!-- produce summaries -->
1487 <bool name="carrot.produceSummary">true</bool>
1488 <!-- the maximum number of labels per cluster -->
1489 <!--<int name="carrot.numDescriptions">5</int>-->
1490 <!-- produce sub clusters -->
1491 <bool name="carrot.outputSubClusters">false</bool>
1493 <str name="defType">edismax</str>
1495 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1497 <str name="q.alt">*:*</str>
1498 <str name="rows">10</str>
1499 <str name="fl">*,score</str>
1501 <arr name="last-components">
1502 <str>clustering</str>
1506 <!-- Terms Component
1508 http://wiki.apache.org/solr/TermsComponent
1510 A component to return terms and document frequency of those
1513 <searchComponent name="terms" class="solr.TermsComponent"/>
1515 <!-- A request handler for demonstrating the terms component -->
1516 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1517 <lst name="defaults">
1518 <bool name="terms">true</bool>
1519 <bool name="distrib">false</bool>
1521 <arr name="components">
1527 <!-- Query Elevation Component
1529 http://wiki.apache.org/solr/QueryElevationComponent
1531 a search component that enables you to configure the top
1532 results for a given query regardless of the normal lucene
1535 <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1536 <!-- pick a fieldType to analyze queries -->
1537 <str name="queryFieldType">string</str>
1538 <str name="config-file">elevate.xml</str>
1541 <!-- A request handler for demonstrating the elevator component -->
1542 <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1543 <lst name="defaults">
1544 <str name="echoParams">explicit</str>
1545 <str name="df">text</str>
1547 <arr name="last-components">
1552 <!-- Highlighting Component
1554 http://wiki.apache.org/solr/HighlightingParameters
1556 <searchComponent class="solr.HighlightComponent" name="highlight">
1558 <!-- Configure the standard fragmenter -->
1559 <!-- This could most likely be commented out in the "default" case -->
1560 <fragmenter name="gap"
1562 class="solr.highlight.GapFragmenter">
1563 <lst name="defaults">
1564 <int name="hl.fragsize">100</int>
1568 <!-- A regular-expression-based fragmenter
1569 (for sentence extraction)
1571 <fragmenter name="regex"
1572 class="solr.highlight.RegexFragmenter">
1573 <lst name="defaults">
1574 <!-- slightly smaller fragsizes work better because of slop -->
1575 <int name="hl.fragsize">70</int>
1576 <!-- allow 50% slop on fragment sizes -->
1577 <float name="hl.regex.slop">0.5</float>
1578 <!-- a basic sentence pattern -->
1579 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
1583 <!-- Configure the standard formatter -->
1584 <formatter name="html"
1586 class="solr.highlight.HtmlFormatter">
1587 <lst name="defaults">
1588 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1589 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1593 <!-- Configure the standard encoder -->
1594 <encoder name="html"
1595 class="solr.highlight.HtmlEncoder" />
1597 <!-- Configure the standard fragListBuilder -->
1598 <fragListBuilder name="simple"
1599 class="solr.highlight.SimpleFragListBuilder"/>
1601 <!-- Configure the single fragListBuilder -->
1602 <fragListBuilder name="single"
1603 class="solr.highlight.SingleFragListBuilder"/>
1605 <!-- Configure the weighted fragListBuilder -->
1606 <fragListBuilder name="weighted"
1608 class="solr.highlight.WeightedFragListBuilder"/>
1610 <!-- default tag FragmentsBuilder -->
1611 <fragmentsBuilder name="default"
1613 class="solr.highlight.ScoreOrderFragmentsBuilder">
1615 <lst name="defaults">
1616 <str name="hl.multiValuedSeparatorChar">/</str>
1621 <!-- multi-colored tag FragmentsBuilder -->
1622 <fragmentsBuilder name="colored"
1623 class="solr.highlight.ScoreOrderFragmentsBuilder">
1624 <lst name="defaults">
1625 <str name="hl.tag.pre"><![CDATA[
1626 <b style="background:yellow">,<b style="background:lawgreen">,
1627 <b style="background:aquamarine">,<b style="background:magenta">,
1628 <b style="background:palegreen">,<b style="background:coral">,
1629 <b style="background:wheat">,<b style="background:khaki">,
1630 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1631 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1635 <boundaryScanner name="default"
1637 class="solr.highlight.SimpleBoundaryScanner">
1638 <lst name="defaults">
1639 <str name="hl.bs.maxScan">10</str>
1640 <str name="hl.bs.chars">.,!? 	 </str>
1644 <boundaryScanner name="breakIterator"
1645 class="solr.highlight.BreakIteratorBoundaryScanner">
1646 <lst name="defaults">
1647 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1648 <str name="hl.bs.type">WORD</str>
1649 <!-- language and country are used when constructing Locale object. -->
1650 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1651 <str name="hl.bs.language">en</str>
1652 <str name="hl.bs.country">US</str>
1658 <!-- Update Processors
1660 Chains of Update Processor Factories for dealing with Update
1661 Requests can be declared, and then used by name in Update
1664 http://wiki.apache.org/solr/UpdateRequestProcessor
1669 An example dedup update processor that creates the "id" field
1670 on the fly based on the hash code of some other fields. This
1671 example has overwriteDupes set to false since we are using the
1672 id field as the signatureField and Solr will maintain
1673 uniqueness based on that anyway.
1677 <updateRequestProcessorChain name="dedupe">
1678 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1679 <bool name="enabled">true</bool>
1680 <str name="signatureField">id</str>
1681 <bool name="overwriteDupes">false</bool>
1682 <str name="fields">name,features,cat</str>
1683 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1685 <processor class="solr.LogUpdateProcessorFactory" />
1686 <processor class="solr.RunUpdateProcessorFactory" />
1687 </updateRequestProcessorChain>
1690 <!-- Language identification
1692 This example update chain identifies the language of the incoming
1693 documents using the langid contrib. The detected language is
1694 written to field language_s. No field name mapping is done.
1695 The fields used for detection are text, title, subject and description,
1696 making this example suitable for detecting languages form full-text
1697 rich documents injected via ExtractingRequestHandler.
1698 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1701 <updateRequestProcessorChain name="langid">
1702 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1703 <str name="langid.fl">text,title,subject,description</str>
1704 <str name="langid.langField">language_s</str>
1705 <str name="langid.fallback">en</str>
1707 <processor class="solr.LogUpdateProcessorFactory" />
1708 <processor class="solr.RunUpdateProcessorFactory" />
1709 </updateRequestProcessorChain>
1712 <!-- Script update processor
1714 This example hooks in an update processor implemented using JavaScript.
1716 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1719 <updateRequestProcessorChain name="script">
1720 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1721 <str name="script">update-script.js</str>
1723 <str name="config_param">example config parameter</str>
1726 <processor class="solr.RunUpdateProcessorFactory" />
1727 </updateRequestProcessorChain>
1730 <!-- Response Writers
1732 http://wiki.apache.org/solr/QueryResponseWriter
1734 Request responses will be written using the writer specified by
1735 the 'wt' request parameter matching the name of a registered
1738 The "default" writer is the default and will be used if 'wt' is
1739 not specified in the request.
1741 <!-- The following response writers are implicitly configured unless
1745 <queryResponseWriter name="xml"
1747 class="solr.XMLResponseWriter" />
1748 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1749 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1750 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1751 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1752 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1753 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1754 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1757 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1758 <!-- For the purposes of the tutorial, JSON responses are written as
1759 plain text so that they are easy to read in *any* browser.
1760 If you expect a MIME type of "application/json" just remove this override.
1762 <str name="content-type">text/plain; charset=UTF-8</str>
1763 </queryResponseWriter>
1766 Custom response writers can be declared as needed...
1768 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1771 <!-- XSLT response writer transforms the XML output by any xslt file found
1772 in Solr's conf/xslt directory. Changes to xslt files are checked for
1773 every xsltCacheLifetimeSeconds.
1775 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1776 <int name="xsltCacheLifetimeSeconds">5</int>
1777 </queryResponseWriter>
1781 http://wiki.apache.org/solr/SolrQuerySyntax
1783 Multiple QParserPlugins can be registered by name, and then
1784 used in either the "defType" param for the QueryComponent (used
1785 by SearchHandler) or in LocalParams
1787 <!-- example of registering a query parser -->
1789 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1792 <!-- Function Parsers
1794 http://wiki.apache.org/solr/FunctionQuery
1796 Multiple ValueSourceParsers can be registered by name, and then
1797 used as function names when using the "func" QParser.
1799 <!-- example of registering a custom function parser -->
1801 <valueSourceParser name="myfunc"
1802 class="com.mycompany.MyValueSourceParser" />
1806 <!-- Document Transformers
1807 http://wiki.apache.org/solr/DocTransformers
1810 Could be something like:
1811 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1812 <int name="connection">jdbc://....</int>
1815 To add a constant value to all docs, use:
1816 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1817 <int name="value">5</int>
1820 If you want the user to still be able to change it with _value:something_ use this:
1821 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1822 <double name="defaultValue">5</double>
1825 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1826 EditorialMarkerFactory will do exactly that:
1827 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1831 <!-- Legacy config for the admin interface -->
1833 <defaultQuery>*:*</defaultQuery>