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_40</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 If a "./lib" directory exists in your instanceDir, all files
49 found in it are included as if you had used the following
55 <!-- A 'dir' option by itself adds any files found in the directory
56 to the classpath, this is useful for including all jars in a
60 <lib dir="../add-everything-found-in-this-dir-to-the-classpath" />
63 <!-- When a 'regex' is specified in addition to a 'dir', only the
64 files in that directory which completely match the regex
65 (anchored on both ends) will be included.
67 <lib dir="../../../dist/" regex="apache-solr-cell-\d.*\.jar" />
68 <lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
70 <lib dir="../../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
71 <lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
73 <lib dir="../../../dist/" regex="apache-solr-langid-\d.*\.jar" />
74 <lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
76 <lib dir="../../../dist/" regex="apache-solr-velocity-\d.*\.jar" />
77 <lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
79 <!-- If a 'dir' option (with or without a regex) is used and nothing
80 is found that matches, it will be ignored
82 <lib dir="/total/crap/dir/ignored" />
84 <!-- an exact 'path' can be used instead of a 'dir' to specify a
85 specific file. This will cause a serious error to be logged if
89 <lib path="../a-jar-that-does-not-exist.jar" />
94 Used to specify an alternate directory to hold all index data
95 other than the default ./data under the Solr home. If
96 replication is in use, this should match the replication
99 <dataDir>${solr.data.dir:}</dataDir>
102 <!-- The DirectoryFactory to use for indexes.
104 solr.StandardDirectoryFactory is filesystem
105 based and tries to pick the best implementation for the current
106 JVM and platform. solr.NRTCachingDirectoryFactory, the default,
107 wraps solr.StandardDirectoryFactory and caches small files in memory
108 for better NRT performance.
110 One can force a particular implementation via solr.MMapDirectoryFactory,
111 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
113 solr.RAMDirectoryFactory is memory based, not
114 persistent, and doesn't work with replication.
116 <directoryFactory name="DirectoryFactory"
117 class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
119 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120 Index Config - These settings control low-level behavior of indexing
121 Most example settings here show the default value, but are commented
122 out, to more easily see where customizations have been made.
124 Note: This replaces <indexDefaults> and <mainIndex> from older versions
125 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
127 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
128 LimitTokenCountFilterFactory in your fieldType definition. E.g.
129 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
131 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
132 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
134 <!-- Expert: Enabling compound file will use less files for the index,
135 using fewer file descriptors on the expense of performance decrease.
136 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
137 <!-- <useCompoundFile>false</useCompoundFile> -->
139 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
140 indexing for buffering added documents and deletions before they are
141 flushed to the Directory.
142 maxBufferedDocs sets a limit on the number of documents buffered
144 If both ramBufferSizeMB and maxBufferedDocs is set, then
145 Lucene will flush based on whichever limit is hit first. -->
146 <!-- <ramBufferSizeMB>32</ramBufferSizeMB> -->
147 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
149 <!-- Expert: Merge Policy
150 The Merge Policy in Lucene controls how merging of segments is done.
151 The default since Solr/Lucene 3.3 is TieredMergePolicy.
152 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
153 Even older versions of Lucene used LogDocMergePolicy.
156 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
157 <int name="maxMergeAtOnce">10</int>
158 <int name="segmentsPerTier">10</int>
163 The merge factor controls how many segments will get merged at a time.
164 For TieredMergePolicy, mergeFactor is a convenience parameter which
165 will set both MaxMergeAtOnce and SegmentsPerTier at once.
166 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
167 will be allowed before they are merged into one.
168 Default is 10 for both merge policies.
171 <mergeFactor>10</mergeFactor>
174 <!-- Expert: Merge Scheduler
175 The Merge Scheduler in Lucene controls how merges are
176 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
177 can perform merges in the background using separate threads.
178 The SerialMergeScheduler (Lucene 2.2 default) does not.
181 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
186 This option specifies which Lucene LockFactory implementation
189 single = SingleInstanceLockFactory - suggested for a
190 read-only index or when there is no possibility of
191 another process trying to modify the index.
192 native = NativeFSLockFactory - uses OS native file locking.
193 Do not use when multiple solr webapps in the same
194 JVM are attempting to share a single index.
195 simple = SimpleFSLockFactory - uses a plain file for locking
197 Defaults: 'native' is default for Solr3.6 and later, otherwise
198 'simple' is the default
200 More details on the nuances of each LockFactory...
201 http://wiki.apache.org/lucene-java/AvailableLockFactories
203 <!-- <lockType>native</lockType> -->
205 <!-- Unlock On Startup
207 If true, unlock any held write or commit locks on startup.
208 This defeats the locking mechanism that allows multiple
209 processes to safely access a lucene index, and should be used
210 with care. Default is "false".
212 This is not needed if lock type is 'none' or 'single'
215 <unlockOnStartup>false</unlockOnStartup>
218 <!-- Expert: Controls how often Lucene loads terms into memory
219 Default is 128 and is likely good for most everyone.
221 <!-- <termIndexInterval>128</termIndexInterval> -->
223 <!-- If true, IndexReaders will be reopened (often more efficient)
224 instead of closed and then opened. Default: true
227 <reopenReaders>true</reopenReaders>
230 <!-- Commit Deletion Policy
232 Custom deletion policies can be specified here. The class must
233 implement org.apache.lucene.index.IndexDeletionPolicy.
235 http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/index/IndexDeletionPolicy.html
237 The default Solr IndexDeletionPolicy implementation supports
238 deleting index commit points on number of commits, age of
239 commit point and optimized status.
241 The latest commit point should always be preserved regardless
245 <deletionPolicy class="solr.SolrDeletionPolicy">
247 <!-- The number of commit points to be kept -->
248 <!-- <str name="maxCommitsToKeep">1</str> -->
249 <!-- The number of optimized commit points to be kept -->
250 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
252 Delete all commit points once they have reached the given age.
253 Supports DateMathParser syntax e.g.
256 <str name="maxCommitAge">30MINUTES</str>
257 <str name="maxCommitAge">1DAY</str>
263 <!-- Lucene Infostream
265 To aid in advanced debugging, Lucene provides an "InfoStream"
266 of detailed information when indexing.
268 Setting The value to true will instruct the underlying Lucene
269 IndexWriter to write its debugging info the specified file
271 <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
277 This example enables JMX if and only if an existing MBeanServer
278 is found, use this if you want to configure JMX through JVM
279 parameters. Remove this to disable exposing Solr configuration
280 and statistics to JMX.
282 For more details see http://wiki.apache.org/solr/SolrJmx
285 <!-- If you want to connect to a particular server, specify the
288 <!-- <jmx agentId="myAgent" /> -->
289 <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
290 <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
293 <!-- The default high-performance update handler -->
294 <updateHandler class="solr.DirectUpdateHandler2">
298 Perform a hard commit automatically under certain conditions.
299 Instead of enabling autoCommit, consider using "commitWithin"
300 when adding documents.
302 http://wiki.apache.org/solr/UpdateXmlMessages
304 maxDocs - Maximum number of documents to add since the last
305 commit before automatically triggering a new commit.
307 maxTime - Maximum amount of time in ms that is allowed to pass
308 since a document was added before automaticly
309 triggering a new commit.
310 openSearcher - if false, the commit causes recent index changes
311 to be flushed to stable storage, but does not cause a new
312 searcher to be opened to make those changes visible.
315 <maxTime>15000</maxTime>
316 <openSearcher>false</openSearcher>
319 <!-- softAutoCommit is like autoCommit except it causes a
320 'soft' commit which only ensures that changes are visible
321 but does not ensure that data is synced to disk. This is
322 faster and more near-realtime friendly than a hard commit.
326 <maxTime>1000</maxTime>
330 <!-- Update Related Event Listeners
332 Various IndexWriter related events can trigger Listeners to
335 postCommit - fired after every commit or optimize command
336 postOptimize - fired after every optimize command
338 <!-- The RunExecutableListener executes an external command from a
339 hook such as postCommit or postOptimize.
341 exe - the name of the executable to run
342 dir - dir to use as the current working directory. (default=".")
343 wait - the calling thread waits until the executable returns.
345 args - the arguments to pass to the program. (default is none)
346 env - environment variables to set. (default is none)
348 <!-- This example shows how RunExecutableListener could be used
349 with the script based replication...
350 http://wiki.apache.org/solr/CollectionDistribution
353 <listener event="postCommit" class="solr.RunExecutableListener">
354 <str name="exe">solr/bin/snapshooter</str>
355 <str name="dir">.</str>
356 <bool name="wait">true</bool>
357 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
358 <arr name="env"> <str>MYVAR=val1</str> </arr>
362 <!-- Enables a transaction log, currently used for real-time get.
363 "dir" - the target directory for transaction logs, defaults to the
364 solr data directory. -->
366 <str name="dir">${solr.data.dir:}</str>
372 <!-- IndexReaderFactory
374 Use the following format to specify a custom IndexReaderFactory,
375 which allows for alternate IndexReader implementations.
377 ** Experimental Feature **
379 Please note - Using a custom IndexReaderFactory may prevent
380 certain other features from working. The API to
381 IndexReaderFactory may change without warning or may even be
382 removed from future releases if the problems cannot be
386 ** Features that may not work with custom IndexReaderFactory **
388 The ReplicationHandler assumes a disk-resident index. Using a
389 custom IndexReader implementation may cause incompatibility
390 with ReplicationHandler and may cause replication to not work
391 correctly. See SOLR-1366 for details.
395 <indexReaderFactory name="IndexReaderFactory" class="package.class">
396 <str name="someArg">Some Value</str>
397 </indexReaderFactory >
399 <!-- By explicitly declaring the Factory, the termIndexDivisor can
403 <indexReaderFactory name="IndexReaderFactory"
404 class="solr.StandardIndexReaderFactory">
405 <int name="setTermIndexDivisor">12</int>
406 </indexReaderFactory >
409 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
410 Query section - these settings control query time things like caches
411 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
413 <!-- Max Boolean Clauses
415 Maximum number of clauses in each BooleanQuery, an exception
416 is thrown if exceeded.
420 This option actually modifies a global Lucene property that
421 will affect all SolrCores. If multiple solrconfig.xml files
422 disagree on this property, the value at any given moment will
423 be based on the last SolrCore to be initialized.
426 <maxBooleanClauses>1024</maxBooleanClauses>
429 <!-- Solr Internal Query Caches
431 There are two implementations of cache available for Solr,
432 LRUCache, based on a synchronized LinkedHashMap, and
433 FastLRUCache, based on a ConcurrentHashMap.
435 FastLRUCache has faster gets and slower puts in single
436 threaded operation and thus is generally faster than LRUCache
437 when the hit ratio of the cache is high (> 75%), and may be
438 faster under other scenarios on multi-cpu systems.
443 Cache used by SolrIndexSearcher for filters (DocSets),
444 unordered sets of *all* documents that match a query. When a
445 new searcher is opened, its caches may be prepopulated or
446 "autowarmed" using data from caches in the old searcher.
447 autowarmCount is the number of items to prepopulate. For
448 LRUCache, the autowarmed items will be the most recently
452 class - the SolrCache implementation LRUCache or
453 (LRUCache or FastLRUCache)
454 size - the maximum number of entries in the cache
455 initialSize - the initial capacity (number of entries) of
456 the cache. (see java.util.HashMap)
457 autowarmCount - the number of entries to prepopulate from
460 <filterCache class="solr.FastLRUCache"
465 <!-- Query Result Cache
467 Caches results of searches - ordered lists of document ids
468 (DocList) based on a query, a sort, and the range of documents requested.
470 <queryResultCache class="solr.LRUCache"
477 Caches Lucene Document objects (the stored fields for each
478 document). Since Lucene internal document ids are transient,
479 this cache will not be autowarmed.
481 <documentCache class="solr.LRUCache"
486 <!-- Field Value Cache
488 Cache used to hold field values that are quickly accessible
489 by document id. The fieldValueCache is created by default
490 even if not configured here.
493 <fieldValueCache class="solr.FastLRUCache"
501 Example of a generic cache. These caches may be accessed by
502 name through SolrIndexSearcher.getCache(),cacheLookup(), and
503 cacheInsert(). The purpose is to enable easy caching of
504 user/application level data. The regenerator argument should
505 be specified as an implementation of solr.CacheRegenerator
506 if autowarming is desired.
509 <cache name="myUserCache"
510 class="solr.LRUCache"
514 regenerator="com.mycompany.MyRegenerator"
519 <!-- Lazy Field Loading
521 If true, stored fields that are not requested will be loaded
522 lazily. This can result in a significant speed improvement
523 if the usual case is to not load all stored fields,
524 especially if the skipped fields are large compressed text
527 <enableLazyFieldLoading>true</enableLazyFieldLoading>
529 <!-- Use Filter For Sorted Query
531 A possible optimization that attempts to use a filter to
532 satisfy a search. If the requested sort does not include
533 score, then the filterCache will be checked for a filter
534 matching the query. If found, the filter will be used as the
535 source of document ids, and then the sort will be applied to
538 For most situations, this will not be useful unless you
539 frequently get the same search repeatedly with different sort
540 options, and none of them ever use "score"
543 <useFilterForSortedQuery>true</useFilterForSortedQuery>
546 <!-- Result Window Size
548 An optimization for use with the queryResultCache. When a search
549 is requested, a superset of the requested number of document ids
550 are collected. For example, if a search for a particular query
551 requests matching documents 10 through 19, and queryWindowSize is 50,
552 then documents 0 through 49 will be collected and cached. Any further
553 requests in that range can be satisfied via the cache.
555 <queryResultWindowSize>20</queryResultWindowSize>
557 <!-- Maximum number of documents to cache for any entry in the
560 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
562 <!-- Query Related Event Listeners
564 Various IndexSearcher related events can trigger Listeners to
567 newSearcher - fired whenever a new searcher is being prepared
568 and there is a current searcher handling requests (aka
569 registered). It can be used to prime certain caches to
570 prevent long request times for certain requests.
572 firstSearcher - fired whenever a new searcher is being
573 prepared but there is no current registered searcher to handle
574 requests or to gain autowarming data from.
578 <!-- QuerySenderListener takes an array of NamedList and executes a
579 local query request for each NamedList in sequence.
581 <listener event="newSearcher" class="solr.QuerySenderListener">
584 <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
585 <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
589 <listener event="firstSearcher" class="solr.QuerySenderListener">
592 <str name="q">static firstSearcher warming in solrconfig.xml</str>
597 <!-- Use Cold Searcher
599 If a search request comes in and there is no current
600 registered searcher, then immediately register the still
601 warming searcher and use it. If "false" then all requests
602 will block until the first searcher is done warming.
604 <useColdSearcher>false</useColdSearcher>
606 <!-- Max Warming Searchers
608 Maximum number of searchers that may be warming in the
609 background concurrently. An error is returned if this limit
612 Recommend values of 1-2 for read-only slaves, higher for
613 masters w/o cache warming.
615 <maxWarmingSearchers>2</maxWarmingSearchers>
620 <!-- Request Dispatcher
622 This section contains instructions for how the SolrDispatchFilter
623 should behave when processing requests for this SolrCore.
625 handleSelect is a legacy option that affects the behavior of requests
626 such as /select?qt=XXX
628 handleSelect="true" will cause the SolrDispatchFilter to process
629 the request and dispatch the query to a handler specified by the
630 "qt" param, assuming "/select" isn't already registered.
632 handleSelect="false" will cause the SolrDispatchFilter to
633 ignore "/select" requests, resulting in a 404 unless a handler
634 is explicitly registered with the name "/select"
636 handleSelect="true" is not recommended for new users, but is the default
637 for backwards compatibility
639 <requestDispatcher handleSelect="false" >
642 These settings indicate how Solr Requests may be parsed, and
643 what restrictions may be placed on the ContentStreams from
646 enableRemoteStreaming - enables use of the stream.file
647 and stream.url parameters for specifying remote streams.
649 multipartUploadLimitInKB - specifies the max size of
650 Multipart File Uploads that Solr will allow in a Request.
653 The settings below authorize Solr to fetch remote files, You
654 should make sure your system has some authentication before
655 using enableRemoteStreaming="true"
658 <requestParsers enableRemoteStreaming="true"
659 multipartUploadLimitInKB="2048000" />
663 Set HTTP caching related parameters (for proxy caches and clients).
665 The options below instruct Solr not to output any HTTP Caching
668 <httpCaching never304="true" />
669 <!-- If you include a <cacheControl> directive, it will be used to
670 generate a Cache-Control header (as well as an Expires header
671 if the value contains "max-age=")
673 By default, no Cache-Control header is generated.
675 You can use the <cacheControl> option even if you have set
679 <httpCaching never304="true" >
680 <cacheControl>max-age=30, public</cacheControl>
683 <!-- To enable Solr to respond with automatically generated HTTP
684 Caching headers, and to response to Cache Validation requests
685 correctly, set the value of never304="false"
687 This will cause Solr to generate Last-Modified and ETag
688 headers based on the properties of the Index.
690 The following options can also be specified to affect the
691 values of these headers...
693 lastModFrom - the default value is "openTime" which means the
694 Last-Modified value (and validation against If-Modified-Since
695 requests) will all be relative to when the current Searcher
696 was opened. You can change it to lastModFrom="dirLastMod" if
697 you want the value to exactly correspond to when the physical
698 index was last modified.
700 etagSeed="..." is an option you can change to force the ETag
701 header (and validation against If-None-Match requests) to be
702 different even if the index has not changed (ie: when making
703 significant changes to your config file)
705 (lastModifiedFrom and etagSeed are both ignored if you use
706 the never304="true" option)
709 <httpCaching lastModifiedFrom="openTime"
711 <cacheControl>max-age=30, public</cacheControl>
716 <!-- Request Handlers
718 http://wiki.apache.org/solr/SolrRequestHandler
720 Incoming queries will be dispatched to a specific handler by name
721 based on the path specified in the request.
723 Legacy behavior: If the request path uses "/select" but no Request
724 Handler has that name, and if handleSelect="true" has been specified in
725 the requestDispatcher, then the Request Handler is dispatched based on
726 the qt parameter. Handlers without a leading '/' are accessed this way
727 like so: http://host/app/[core/]select?qt=name If no qt is
728 given, then the requestHandler that declares default="true" will be
729 used or the one named "standard".
731 If a Request Handler is declared with startup="lazy", then it will
732 not be initialized until the first request that uses it.
737 http://wiki.apache.org/solr/SearchHandler
739 For processing Search Queries, the primary Request Handler
740 provided with Solr is "SearchHandler" It delegates to a sequent
741 of SearchComponents (see below) and supports distributed
742 queries across multiple shards
744 <requestHandler name="/select" class="solr.SearchHandler">
745 <!-- default values for query parameters can be specified, these
746 will be overridden by parameters in the request
748 <lst name="defaults">
749 <str name="echoParams">explicit</str>
750 <str name="defType">edismax</str>
764 <int name="rows">50</int>
765 <int name="qs">2</int>
767 <!-- In addition to defaults, "appends" params can be specified
768 to identify values which should be appended to the list of
769 multi-val params from the query (or the existing "defaults").
771 <!-- In this example, the param "fq=instock:true" would be appended to
772 any query time fq params the user may specify, as a mechanism for
773 partitioning the index, independent of any user selected filtering
774 that may also be desired (perhaps as a result of faceted searching).
776 NOTE: there is *absolutely* nothing a client can do to prevent these
777 "appends" values from being used, so don't use this mechanism
778 unless you are sure you always want it.
782 <str name="fq">inStock:true</str>
785 <!-- "invariants" are a way of letting the Solr maintainer lock down
786 the options available to Solr clients. Any params values
787 specified here are used regardless of what values may be specified
788 in either the query, the "defaults", or the "appends" params.
790 In this example, the facet.field and facet.query params would
791 be fixed, limiting the facets clients can use. Faceting is
792 not turned on by default - but if the client does specify
793 facet=true in the request, these are the only facets they
794 will be able to see counts for; regardless of what other
795 facet.field or facet.query params they may specify.
797 NOTE: there is *absolutely* nothing a client can do to prevent these
798 "invariants" values from being used, so don't use this mechanism
799 unless you are sure you always want it.
802 <lst name="invariants">
803 <str name="facet.field">cat</str>
804 <str name="facet.field">manu_exact</str>
805 <str name="facet.query">price:[* TO 500]</str>
806 <str name="facet.query">price:[500 TO *]</str>
809 <!-- If the default list of SearchComponents is not desired, that
810 list can either be overridden completely, or components can be
811 prepended or appended to the default list. (see below)
814 <arr name="components">
815 <str>nameOfCustomComponent1</str>
816 <str>nameOfCustomComponent2</str>
821 <!-- A request handler that returns indented JSON by default -->
822 <requestHandler name="/query" class="solr.SearchHandler">
823 <lst name="defaults">
824 <str name="echoParams">explicit</str>
825 <str name="wt">json</str>
826 <str name="indent">true</str>
827 <str name="df">body_pl</str>
832 <!-- realtime get handler, guaranteed to return the latest stored fields of
833 any document, without the need to commit or open a new searcher. The
834 current implementation relies on the updateLog feature being enabled. -->
835 <requestHandler name="/get" class="solr.RealTimeGetHandler">
836 <lst name="defaults">
837 <str name="omitHeader">true</str>
838 <str name="wt">json</str>
839 <str name="indent">true</str>
844 <!-- A Robust Example
846 This example SearchHandler declaration shows off usage of the
847 SearchHandler with many defaults declared
849 Note that multiple instances of the same Request Handler
850 (SearchHandler) can be registered multiple times with different
851 names (and different init parameters)
853 <requestHandler name="/browse" class="solr.SearchHandler">
854 <lst name="defaults">
855 <str name="echoParams">explicit</str>
857 <!-- VelocityResponseWriter settings -->
858 <str name="wt">velocity</str>
859 <str name="v.template">browse</str>
860 <str name="v.layout">layout</str>
861 <str name="title">Solritas</str>
863 <!-- Query settings -->
864 <str name="defType">edismax</str>
866 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
867 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
869 <str name="df">text</str>
870 <str name="mm">100%</str>
871 <str name="q.alt">*:*</str>
872 <str name="rows">10</str>
873 <str name="fl">*,score</str>
876 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
877 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
879 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
880 <int name="mlt.count">3</int>
882 <!-- Faceting defaults -->
883 <str name="facet">on</str>
884 <str name="facet.field">cat</str>
885 <str name="facet.field">manu_exact</str>
886 <str name="facet.field">content_type</str>
887 <str name="facet.field">author_s</str>
888 <str name="facet.query">ipod</str>
889 <str name="facet.query">GB</str>
890 <str name="facet.mincount">1</str>
891 <str name="facet.pivot">cat,inStock</str>
892 <str name="facet.range.other">after</str>
893 <str name="facet.range">price</str>
894 <int name="f.price.facet.range.start">0</int>
895 <int name="f.price.facet.range.end">600</int>
896 <int name="f.price.facet.range.gap">50</int>
897 <str name="facet.range">popularity</str>
898 <int name="f.popularity.facet.range.start">0</int>
899 <int name="f.popularity.facet.range.end">10</int>
900 <int name="f.popularity.facet.range.gap">3</int>
901 <str name="facet.range">manufacturedate_dt</str>
902 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
903 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
904 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
905 <str name="f.manufacturedate_dt.facet.range.other">before</str>
906 <str name="f.manufacturedate_dt.facet.range.other">after</str>
908 <!-- Highlighting defaults -->
909 <str name="hl">on</str>
910 <str name="hl.fl">content features title name</str>
911 <str name="hl.encoder">html</str>
912 <str name="hl.simple.pre"><b></str>
913 <str name="hl.simple.post"></b></str>
914 <str name="f.title.hl.fragsize">0</str>
915 <str name="f.title.hl.alternateField">title</str>
916 <str name="f.name.hl.fragsize">0</str>
917 <str name="f.name.hl.alternateField">name</str>
918 <str name="f.content.hl.snippets">3</str>
919 <str name="f.content.hl.fragsize">200</str>
920 <str name="f.content.hl.alternateField">content</str>
921 <str name="f.content.hl.maxAlternateFieldLength">750</str>
923 <!-- Spell checking defaults -->
924 <str name="spellcheck">on</str>
925 <str name="spellcheck.extendedResults">false</str>
926 <str name="spellcheck.count">5</str>
927 <str name="spellcheck.alternativeTermCount">2</str>
928 <str name="spellcheck.maxResultsForSuggest">5</str>
929 <str name="spellcheck.collate">true</str>
930 <str name="spellcheck.collateExtendedResults">true</str>
931 <str name="spellcheck.maxCollationTries">5</str>
932 <str name="spellcheck.maxCollations">3</str>
935 <!-- append spellchecking to our list of components -->
936 <arr name="last-components">
937 <str>spellcheck</str>
942 <!-- Update Request Handler.
944 http://wiki.apache.org/solr/UpdateXmlMessages
946 The canonical Request Handler for Modifying the Index through
947 commands specified using XML, JSON, CSV, or JAVABIN
949 Note: Since solr1.1 requestHandlers requires a valid content
950 type header if posted in the body. For example, curl now
951 requires: -H 'Content-type:text/xml; charset=utf-8'
953 To override the request content type and force a specific
954 Content-type, use the request parameter:
955 ?update.contentType=text/csv
957 This handler will pick a response format to match the input
958 if the 'wt' parameter is not explicit
960 <requestHandler name="/update" class="solr.UpdateRequestHandler">
961 <!-- See below for information on defining
962 updateRequestProcessorChains that can be used by name
963 on each Update Request
966 <lst name="defaults">
967 <str name="update.chain">dedupe</str>
973 <!-- Solr Cell Update Request Handler
975 http://wiki.apache.org/solr/ExtractingRequestHandler
978 <requestHandler name="/update/extract"
980 class="solr.extraction.ExtractingRequestHandler" >
981 <lst name="defaults">
982 <str name="lowernames">true</str>
983 <str name="uprefix">ignored_</str>
985 <!-- capture link hrefs but ignore div attributes -->
986 <str name="captureAttr">true</str>
987 <str name="fmap.a">links</str>
988 <str name="fmap.div">ignored_</str>
993 <!-- Field Analysis Request Handler
995 RequestHandler that provides much the same functionality as
996 analysis.jsp. Provides the ability to specify multiple field
997 types and field names in the same request and outputs
998 index-time and query-time analysis for each of them.
1000 Request parameters are:
1001 analysis.fieldname - field name whose analyzers are to be used
1003 analysis.fieldtype - field type whose analyzers are to be used
1004 analysis.fieldvalue - text for index-time analysis
1005 q (or analysis.q) - text for query time analysis
1006 analysis.showmatch (true|false) - When set to true and when
1007 query analysis is performed, the produced tokens of the
1008 field value analysis will be marked as "matched" for every
1009 token that is produces by the query analysis
1011 <requestHandler name="/analysis/field"
1013 class="solr.FieldAnalysisRequestHandler" />
1016 <!-- Document Analysis Handler
1018 http://wiki.apache.org/solr/AnalysisRequestHandler
1020 An analysis handler that provides a breakdown of the analysis
1021 process of provided documents. This handler expects a (single)
1022 content stream with the following format:
1026 <field name="id">1</field>
1027 <field name="name">The Name</field>
1028 <field name="text">The Text Value</field>
1035 Note: Each document must contain a field which serves as the
1036 unique key. This key is used in the returned response to associate
1037 an analysis breakdown to the analyzed document.
1039 Like the FieldAnalysisRequestHandler, this handler also supports
1040 query analysis by sending either an "analysis.query" or "q"
1041 request parameter that holds the query text to be analyzed. It
1042 also supports the "analysis.showmatch" parameter which when set to
1043 true, all field tokens that match the query tokens will be marked
1046 <requestHandler name="/analysis/document"
1047 class="solr.DocumentAnalysisRequestHandler"
1052 Admin Handlers - This will register all the standard admin
1055 <requestHandler name="/admin/"
1056 class="solr.admin.AdminHandlers" />
1057 <!-- This single handler is equivalent to the following... -->
1059 <requestHandler name="/admin/luke" class="solr.admin.LukeRequestHandler" />
1060 <requestHandler name="/admin/system" class="solr.admin.SystemInfoHandler" />
1061 <requestHandler name="/admin/plugins" class="solr.admin.PluginInfoHandler" />
1062 <requestHandler name="/admin/threads" class="solr.admin.ThreadDumpHandler" />
1063 <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1064 <requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
1066 <!-- If you wish to hide files under ${solr.home}/conf, explicitly
1067 register the ShowFileRequestHandler using:
1070 <requestHandler name="/admin/file"
1071 class="solr.admin.ShowFileRequestHandler" >
1072 <lst name="invariants">
1073 <str name="hidden">synonyms.txt</str>
1074 <str name="hidden">anotherfile.txt</str>
1079 <!-- ping/healthcheck -->
1080 <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1081 <lst name="invariants">
1082 <str name="q">solrpingquery</str>
1084 <lst name="defaults">
1085 <str name="echoParams">all</str>
1087 <!-- An optional feature of the PingRequestHandler is to configure the
1088 handler with a "healthcheckFile" which can be used to enable/disable
1089 the PingRequestHandler.
1090 relative paths are resolved against the data dir
1092 <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1095 <!-- Echo the request contents back to the client -->
1096 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1097 <lst name="defaults">
1098 <str name="echoParams">explicit</str>
1099 <str name="echoHandler">true</str>
1103 <!-- Solr Replication
1105 The SolrReplicationHandler supports replicating indexes from a
1106 "master" used for indexing and "slaves" used for queries.
1108 http://wiki.apache.org/solr/SolrReplication
1110 In the example below, remove the <lst name="master"> section if
1111 this is just a slave and remove the <lst name="slave"> section
1112 if this is just a master.
1115 <requestHandler name="/replication" class="solr.ReplicationHandler" >
1117 <str name="replicateAfter">commit</str>
1118 <str name="replicateAfter">startup</str>
1119 <str name="confFiles">schema.xml,stopwords.txt</str>
1122 <str name="masterUrl">http://localhost:8983/solr</str>
1123 <str name="pollInterval">00:00:60</str>
1128 <!-- Solr Replication for SolrCloud Recovery
1130 This is the config need for SolrCloud's recovery replication.
1132 <requestHandler name="/replication" class="solr.ReplicationHandler" startup="lazy" />
1135 <!-- Search Components
1137 Search components are registered to SolrCore and used by
1138 instances of SearchHandler (which can access them by name)
1140 By default, the following components are available:
1142 <searchComponent name="query" class="solr.QueryComponent" />
1143 <searchComponent name="facet" class="solr.FacetComponent" />
1144 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1145 <searchComponent name="highlight" class="solr.HighlightComponent" />
1146 <searchComponent name="stats" class="solr.StatsComponent" />
1147 <searchComponent name="debug" class="solr.DebugComponent" />
1149 Default configuration in a requestHandler would look like:
1151 <arr name="components">
1155 <str>highlight</str>
1160 If you register a searchComponent to one of the standard names,
1161 that will be used instead of the default.
1163 To insert components before or after the 'standard' components, use:
1165 <arr name="first-components">
1166 <str>myFirstComponentName</str>
1169 <arr name="last-components">
1170 <str>myLastComponentName</str>
1173 NOTE: The component registered with the name "debug" will
1174 always be executed after the "last-components"
1180 The spell check component can return a list of alternative spelling
1183 http://wiki.apache.org/solr/SpellCheckComponent
1185 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1187 <str name="queryAnalyzerFieldType">textSpell</str>
1189 <!-- Multiple "Spell Checkers" can be declared and used by this
1193 <!-- a spellchecker built from a field of the main index -->
1194 <lst name="spellchecker">
1195 <str name="name">default</str>
1196 <str name="field">name</str>
1197 <str name="classname">solr.DirectSolrSpellChecker</str>
1198 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1199 <str name="distanceMeasure">internal</str>
1200 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1201 <float name="accuracy">0.5</float>
1202 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1203 <int name="maxEdits">2</int>
1204 <!-- the minimum shared prefix when enumerating terms -->
1205 <int name="minPrefix">1</int>
1206 <!-- maximum number of inspections per result. -->
1207 <int name="maxInspections">5</int>
1208 <!-- minimum length of a query term to be considered for correction -->
1209 <int name="minQueryLength">4</int>
1210 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1211 <float name="maxQueryFrequency">0.01</float>
1212 <!-- uncomment this to require suggestions to occur in 1% of the documents
1213 <float name="thresholdTokenFrequency">.01</float>
1217 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1218 <lst name="spellchecker">
1219 <str name="name">wordbreak</str>
1220 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1221 <str name="field">name</str>
1222 <str name="combineWords">true</str>
1223 <str name="breakWords">true</str>
1224 <int name="maxChanges">10</int>
1227 <!-- a spellchecker that uses a different distance measure -->
1229 <lst name="spellchecker">
1230 <str name="name">jarowinkler</str>
1231 <str name="field">spell</str>
1232 <str name="classname">solr.DirectSolrSpellChecker</str>
1233 <str name="distanceMeasure">
1234 org.apache.lucene.search.spell.JaroWinklerDistance
1239 <!-- a spellchecker that use an alternate comparator
1241 comparatorClass be one of:
1243 2. freq (Frequency first, then score)
1244 3. A fully qualified class name
1247 <lst name="spellchecker">
1248 <str name="name">freq</str>
1249 <str name="field">lowerfilt</str>
1250 <str name="classname">solr.DirectSolrSpellChecker</str>
1251 <str name="comparatorClass">freq</str>
1254 <!-- A spellchecker that reads the list of words from a file -->
1256 <lst name="spellchecker">
1257 <str name="classname">solr.FileBasedSpellChecker</str>
1258 <str name="name">file</str>
1259 <str name="sourceLocation">spellings.txt</str>
1260 <str name="characterEncoding">UTF-8</str>
1261 <str name="spellcheckIndexDir">spellcheckerFile</str>
1266 <!-- A request handler for demonstrating the spellcheck component.
1268 NOTE: This is purely as an example. The whole purpose of the
1269 SpellCheckComponent is to hook it into the request handler that
1270 handles your normal user queries so that a separate request is
1271 not needed to get suggestions.
1273 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1274 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1276 See http://wiki.apache.org/solr/SpellCheckComponent for details
1277 on the request parameters.
1279 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1280 <lst name="defaults">
1281 <str name="df">body_pl</str>
1282 <!-- Solr will use suggestions from both the 'default' spellchecker
1283 and from the 'wordbreak' spellchecker and combine them.
1284 collations (re-written queries) can include a combination of
1285 corrections from both spellcheckers -->
1286 <str name="spellcheck.dictionary">default</str>
1287 <str name="spellcheck.dictionary">wordbreak</str>
1288 <str name="spellcheck">on</str>
1289 <str name="spellcheck.extendedResults">true</str>
1290 <str name="spellcheck.count">10</str>
1291 <str name="spellcheck.alternativeTermCount">5</str>
1292 <str name="spellcheck.maxResultsForSuggest">5</str>
1293 <str name="spellcheck.collate">true</str>
1294 <str name="spellcheck.collateExtendedResults">true</str>
1295 <str name="spellcheck.maxCollationTries">10</str>
1296 <str name="spellcheck.maxCollations">5</str>
1298 <arr name="last-components">
1299 <str>spellcheck</str>
1303 <!-- Term Vector Component
1305 http://wiki.apache.org/solr/TermVectorComponent
1307 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1309 <!-- A request handler for demonstrating the term vector component
1311 This is purely as an example.
1313 In reality you will likely want to add the component to your
1314 already specified request handlers.
1316 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1317 <lst name="defaults">
1318 <str name="df">body_pl</str>
1319 <bool name="tv">true</bool>
1321 <arr name="last-components">
1322 <str>tvComponent</str>
1326 <!-- Clustering Component
1328 http://wiki.apache.org/solr/ClusteringComponent
1330 You'll need to set the solr.cluster.enabled system property
1331 when running solr to run with clustering enabled:
1333 java -Dsolr.clustering.enabled=true -jar start.jar
1336 <searchComponent name="clustering"
1337 enable="${solr.clustering.enabled:false}"
1338 class="solr.clustering.ClusteringComponent" >
1339 <!-- Declare an engine -->
1341 <!-- The name, only one can be named "default" -->
1342 <str name="name">default</str>
1344 <!-- Class name of Carrot2 clustering algorithm.
1346 Currently available algorithms are:
1348 * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1349 * org.carrot2.clustering.stc.STCClusteringAlgorithm
1350 * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1352 See http://project.carrot2.org/algorithms.html for the
1353 algorithm's characteristics.
1355 <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1357 <!-- Overriding values for Carrot2 default algorithm attributes.
1359 For a description of all available attributes, see:
1360 http://download.carrot2.org/stable/manual/#chapter.components.
1361 Use attribute key as name attribute of str elements
1362 below. These can be further overridden for individual
1363 requests by specifying attribute key as request parameter
1364 name and attribute value as parameter value.
1366 <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
1368 <!-- Location of Carrot2 lexical resources.
1370 A directory from which to load Carrot2-specific stop words
1371 and stop labels. Absolute or relative to Solr config directory.
1372 If a specific resource (e.g. stopwords.en) is present in the
1373 specified dir, it will completely override the corresponding
1374 default one that ships with Carrot2.
1376 For an overview of Carrot2 lexical resources, see:
1377 http://download.carrot2.org/head/manual/#chapter.lexical-resources
1379 <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1381 <!-- The language to assume for the documents.
1383 For a list of allowed values, see:
1384 http://download.carrot2.org/stable/manual/#section.attribute.lingo.MultilingualClustering.defaultLanguage
1386 <str name="MultilingualClustering.defaultLanguage">ENGLISH</str>
1389 <str name="name">stc</str>
1390 <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1394 <!-- A request handler for demonstrating the clustering component
1396 This is purely as an example.
1398 In reality you will likely want to add the component to your
1399 already specified request handlers.
1401 <requestHandler name="/clustering"
1403 enable="${solr.clustering.enabled:false}"
1404 class="solr.SearchHandler">
1405 <lst name="defaults">
1406 <bool name="clustering">true</bool>
1407 <str name="clustering.engine">default</str>
1408 <bool name="clustering.results">true</bool>
1409 <!-- The title field -->
1410 <str name="carrot.title">name</str>
1411 <str name="carrot.url">id</str>
1412 <!-- The field to cluster on -->
1413 <str name="carrot.snippet">features</str>
1414 <!-- produce summaries -->
1415 <bool name="carrot.produceSummary">true</bool>
1416 <!-- the maximum number of labels per cluster -->
1417 <!--<int name="carrot.numDescriptions">5</int>-->
1418 <!-- produce sub clusters -->
1419 <bool name="carrot.outputSubClusters">false</bool>
1421 <str name="defType">edismax</str>
1423 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1425 <str name="q.alt">*:*</str>
1426 <str name="rows">10</str>
1427 <str name="fl">*,score</str>
1429 <arr name="last-components">
1430 <str>clustering</str>
1434 <!-- Terms Component
1436 http://wiki.apache.org/solr/TermsComponent
1438 A component to return terms and document frequency of those
1441 <searchComponent name="terms" class="solr.TermsComponent"/>
1443 <!-- A request handler for demonstrating the terms component -->
1444 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1445 <lst name="defaults">
1446 <bool name="terms">true</bool>
1448 <arr name="components">
1454 <!-- Query Elevation Component
1456 http://wiki.apache.org/solr/QueryElevationComponent
1458 a search component that enables you to configure the top
1459 results for a given query regardless of the normal lucene
1462 <!-- <searchComponent name="elevator" class="solr.QueryElevationComponent" >-->
1463 <!-- pick a fieldType to analyze queries -->
1464 <!--<str name="queryFieldType">string</str>
1465 <str name="config-file">elevate.xml</str>
1466 </searchComponent>-->
1468 <!-- A request handler for demonstrating the elevator component -->
1469 <!-- <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1470 <lst name="defaults">
1471 <str name="echoParams">explicit</str>
1472 <str name="df">text</str>
1474 <arr name="last-components">
1477 </requestHandler>-->
1479 <!-- Highlighting Component
1481 http://wiki.apache.org/solr/HighlightingParameters
1483 <searchComponent class="solr.HighlightComponent" name="highlight">
1485 <!-- Configure the standard fragmenter -->
1486 <!-- This could most likely be commented out in the "default" case -->
1487 <fragmenter name="gap"
1489 class="solr.highlight.GapFragmenter">
1490 <lst name="defaults">
1491 <int name="hl.fragsize">100</int>
1495 <!-- A regular-expression-based fragmenter
1496 (for sentence extraction)
1498 <fragmenter name="regex"
1499 class="solr.highlight.RegexFragmenter">
1500 <lst name="defaults">
1501 <!-- slightly smaller fragsizes work better because of slop -->
1502 <int name="hl.fragsize">70</int>
1503 <!-- allow 50% slop on fragment sizes -->
1504 <float name="hl.regex.slop">0.5</float>
1505 <!-- a basic sentence pattern -->
1506 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
1510 <!-- Configure the standard formatter -->
1511 <formatter name="html"
1513 class="solr.highlight.HtmlFormatter">
1514 <lst name="defaults">
1515 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1516 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1520 <!-- Configure the standard encoder -->
1521 <encoder name="html"
1522 class="solr.highlight.HtmlEncoder" />
1524 <!-- Configure the standard fragListBuilder -->
1525 <fragListBuilder name="simple"
1526 class="solr.highlight.SimpleFragListBuilder"/>
1528 <!-- Configure the single fragListBuilder -->
1529 <fragListBuilder name="single"
1530 class="solr.highlight.SingleFragListBuilder"/>
1532 <!-- Configure the weighted fragListBuilder -->
1533 <fragListBuilder name="weighted"
1535 class="solr.highlight.WeightedFragListBuilder"/>
1537 <!-- default tag FragmentsBuilder -->
1538 <fragmentsBuilder name="default"
1540 class="solr.highlight.ScoreOrderFragmentsBuilder">
1542 <lst name="defaults">
1543 <str name="hl.multiValuedSeparatorChar">/</str>
1548 <!-- multi-colored tag FragmentsBuilder -->
1549 <fragmentsBuilder name="colored"
1550 class="solr.highlight.ScoreOrderFragmentsBuilder">
1551 <lst name="defaults">
1552 <str name="hl.tag.pre"><![CDATA[
1553 <b style="background:yellow">,<b style="background:lawgreen">,
1554 <b style="background:aquamarine">,<b style="background:magenta">,
1555 <b style="background:palegreen">,<b style="background:coral">,
1556 <b style="background:wheat">,<b style="background:khaki">,
1557 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1558 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1562 <boundaryScanner name="default"
1564 class="solr.highlight.SimpleBoundaryScanner">
1565 <lst name="defaults">
1566 <str name="hl.bs.maxScan">10</str>
1567 <str name="hl.bs.chars">.,!? 	 </str>
1571 <boundaryScanner name="breakIterator"
1572 class="solr.highlight.BreakIteratorBoundaryScanner">
1573 <lst name="defaults">
1574 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1575 <str name="hl.bs.type">WORD</str>
1576 <!-- language and country are used when constructing Locale object. -->
1577 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1578 <str name="hl.bs.language">en</str>
1579 <str name="hl.bs.country">US</str>
1585 <!-- Update Processors
1587 Chains of Update Processor Factories for dealing with Update
1588 Requests can be declared, and then used by name in Update
1591 http://wiki.apache.org/solr/UpdateRequestProcessor
1596 An example dedup update processor that creates the "id" field
1597 on the fly based on the hash code of some other fields. This
1598 example has overwriteDupes set to false since we are using the
1599 id field as the signatureField and Solr will maintain
1600 uniqueness based on that anyway.
1604 <updateRequestProcessorChain name="dedupe">
1605 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1606 <bool name="enabled">true</bool>
1607 <str name="signatureField">id</str>
1608 <bool name="overwriteDupes">false</bool>
1609 <str name="fields">name,features,cat</str>
1610 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1612 <processor class="solr.LogUpdateProcessorFactory" />
1613 <processor class="solr.RunUpdateProcessorFactory" />
1614 </updateRequestProcessorChain>
1617 <!-- Language identification
1619 This example update chain identifies the language of the incoming
1620 documents using the langid contrib. The detected language is
1621 written to field language_s. No field name mapping is done.
1622 The fields used for detection are text, title, subject and description,
1623 making this example suitable for detecting languages form full-text
1624 rich documents injected via ExtractingRequestHandler.
1625 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1628 <updateRequestProcessorChain name="langid">
1629 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1630 <str name="langid.fl">text,title,subject,description</str>
1631 <str name="langid.langField">language_s</str>
1632 <str name="langid.fallback">en</str>
1634 <processor class="solr.LogUpdateProcessorFactory" />
1635 <processor class="solr.RunUpdateProcessorFactory" />
1636 </updateRequestProcessorChain>
1639 <!-- Script update processor
1641 This example hooks in an update processor implemented using JavaScript.
1643 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1646 <updateRequestProcessorChain name="script">
1647 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1648 <str name="script">update-script.js</str>
1650 <str name="config_param">example config parameter</str>
1653 <processor class="solr.RunUpdateProcessorFactory" />
1654 </updateRequestProcessorChain>
1657 <!-- Response Writers
1659 http://wiki.apache.org/solr/QueryResponseWriter
1661 Request responses will be written using the writer specified by
1662 the 'wt' request parameter matching the name of a registered
1665 The "default" writer is the default and will be used if 'wt' is
1666 not specified in the request.
1668 <!-- The following response writers are implicitly configured unless
1672 <queryResponseWriter name="xml"
1674 class="solr.XMLResponseWriter" />
1675 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1676 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1677 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1678 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1679 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1680 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1683 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1684 <!-- For the purposes of the tutorial, JSON responses are written as
1685 plain text so that they are easy to read in *any* browser.
1686 If you expect a MIME type of "application/json" just remove this override.
1688 <str name="content-type">text/plain; charset=UTF-8</str>
1689 </queryResponseWriter>
1692 Custom response writers can be declared as needed...
1694 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1697 <!-- XSLT response writer transforms the XML output by any xslt file found
1698 in Solr's conf/xslt directory. Changes to xslt files are checked for
1699 every xsltCacheLifetimeSeconds.
1701 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1702 <int name="xsltCacheLifetimeSeconds">5</int>
1703 </queryResponseWriter>
1707 http://wiki.apache.org/solr/SolrQuerySyntax
1709 Multiple QParserPlugins can be registered by name, and then
1710 used in either the "defType" param for the QueryComponent (used
1711 by SearchHandler) or in LocalParams
1713 <!-- example of registering a query parser -->
1715 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1718 <!-- Function Parsers
1720 http://wiki.apache.org/solr/FunctionQuery
1722 Multiple ValueSourceParsers can be registered by name, and then
1723 used as function names when using the "func" QParser.
1725 <!-- example of registering a custom function parser -->
1727 <valueSourceParser name="myfunc"
1728 class="com.mycompany.MyValueSourceParser" />
1732 <!-- Document Transformers
1733 http://wiki.apache.org/solr/DocTransformers
1736 Could be something like:
1737 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1738 <int name="connection">jdbc://....</int>
1741 To add a constant value to all docs, use:
1742 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1743 <int name="value">5</int>
1746 If you want the user to still be able to change it with _value:something_ use this:
1747 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1748 <double name="defaultValue">5</double>
1751 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1752 EditorialMarkerFactory will do exactly that:
1753 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1757 <!-- Legacy config for the admin interface -->
1759 <defaultQuery>*:*</defaultQuery>