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>6.0.1</luceneMatchVersion>
40 <!-- <lib/> directives can be used to instruct Solr to load any 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 If a 'dir' option (with or without a regex) is used and nothing
68 is found that matches, a warning will be logged.
70 The examples below can be used to load some solr-contribs along
71 with their external dependencies.
73 <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
74 <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
76 <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
77 <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
79 <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
80 <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
82 <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
83 <!-- browse-resources must come before solr-velocity JAR in order to override localized resources -->
84 <lib path="${solr.install.dir:../../../..}/example/files/browse-resources"/>
85 <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
86 <!-- an exact 'path' can be used instead of a 'dir' to specify a
87 specific jar file. This will cause a serious error to be logged
88 if it can't be loaded.
91 <lib path="../a-jar-that-does-not-exist.jar" />
96 Used to specify an alternate directory to hold all index data
97 other than the default ./data under the Solr home. If
98 replication is in use, this should match the replication
101 <dataDir>${solr.data.dir:}</dataDir>
103 <schemaFactory class="ClassicIndexSchemaFactory"/>
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 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123 Index Config - These settings control low-level behavior of indexing
124 Most example settings here show the default value, but are commented
125 out, to more easily see where customizations have been made.
127 Note: This replaces <indexDefaults> and <mainIndex> from older versions
128 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
130 <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
131 LimitTokenCountFilterFactory in your fieldType definition. E.g.
132 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
134 <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
135 <!-- <writeLockTimeout>1000</writeLockTimeout> -->
137 <!-- Expert: Enabling compound file will use less files for the index,
138 using fewer file descriptors on the expense of performance decrease.
139 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
140 <!-- <useCompoundFile>false</useCompoundFile> -->
142 <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
143 indexing for buffering added documents and deletions before they are
144 flushed to the Directory.
145 maxBufferedDocs sets a limit on the number of documents buffered
147 If both ramBufferSizeMB and maxBufferedDocs is set, then
148 Lucene will flush based on whichever limit is hit first. -->
149 <!-- <ramBufferSizeMB>32</ramBufferSizeMB> -->
150 <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
152 <!-- Expert: Merge Policy
153 The Merge Policy in Lucene controls how merging of segments is done.
154 The default since Solr/Lucene 3.3 is TieredMergePolicy.
155 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
156 Even older versions of Lucene used LogDocMergePolicy.
159 <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
160 <int name="maxMergeAtOnce">10</int>
161 <int name="segmentsPerTier">10</int>
166 The merge factor controls how many segments will get merged at a time.
167 For TieredMergePolicy, mergeFactor is a convenience parameter which
168 will set both MaxMergeAtOnce and SegmentsPerTier at once.
169 For LogByteSizeMergePolicy, mergeFactor decides how many new segments
170 will be allowed before they are merged into one.
171 Default is 10 for both merge policies.
174 <mergeFactor>10</mergeFactor>
177 <!-- Expert: Merge Scheduler
178 The Merge Scheduler in Lucene controls how merges are
179 performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
180 can perform merges in the background using separate threads.
181 The SerialMergeScheduler (Lucene 2.2 default) does not.
184 <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
189 This option specifies which Lucene LockFactory implementation
192 single = SingleInstanceLockFactory - suggested for a
193 read-only index or when there is no possibility of
194 another process trying to modify the index.
195 native = NativeFSLockFactory - uses OS native file locking.
196 Do not use when multiple solr webapps in the same
197 JVM are attempting to share a single index.
198 simple = SimpleFSLockFactory - uses a plain file for locking
200 Defaults: 'native' is default for Solr3.6 and later, otherwise
201 'simple' is the default
203 More details on the nuances of each LockFactory...
204 http://wiki.apache.org/lucene-java/AvailableLockFactories
206 <!-- <lockType>native</lockType> -->
208 <!-- Unlock On Startup
210 If true, unlock any held write or commit locks on startup.
211 This defeats the locking mechanism that allows multiple
212 processes to safely access a lucene index, and should be used
213 with care. Default is "false".
215 This is not needed if lock type is 'none' or 'single'
218 <unlockOnStartup>false</unlockOnStartup>
221 <!-- Expert: Controls how often Lucene loads terms into memory
222 Default is 128 and is likely good for most everyone.
224 <!-- <termIndexInterval>128</termIndexInterval> -->
226 <!-- If true, IndexReaders will be reopened (often more efficient)
227 instead of closed and then opened. Default: true
230 <reopenReaders>true</reopenReaders>
233 <!-- Commit Deletion Policy
235 Custom deletion policies can be specified here. The class must
236 implement org.apache.lucene.index.IndexDeletionPolicy.
238 http://lucene.apache.org/java/3_5_0/api/core/org/apache/lucene/index/IndexDeletionPolicy.html
240 The default Solr IndexDeletionPolicy implementation supports
241 deleting index commit points on number of commits, age of
242 commit point and optimized status.
244 The latest commit point should always be preserved regardless
248 <deletionPolicy class="solr.SolrDeletionPolicy">
250 <!-- The number of commit points to be kept -->
251 <!-- <str name="maxCommitsToKeep">1</str> -->
252 <!-- The number of optimized commit points to be kept -->
253 <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
255 Delete all commit points once they have reached the given age.
256 Supports DateMathParser syntax e.g.
259 <str name="maxCommitAge">30MINUTES</str>
260 <str name="maxCommitAge">1DAY</str>
266 <!-- Lucene Infostream
268 To aid in advanced debugging, Lucene provides an "InfoStream"
269 of detailed information when indexing.
271 Setting The value to true will instruct the underlying Lucene
272 IndexWriter to write its debugging info the specified file
274 <!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
280 This example enables JMX if and only if an existing MBeanServer
281 is found, use this if you want to configure JMX through JVM
282 parameters. Remove this to disable exposing Solr configuration
283 and statistics to JMX.
285 For more details see http://wiki.apache.org/solr/SolrJmx
288 <!-- If you want to connect to a particular server, specify the
291 <!-- <jmx agentId="myAgent" /> -->
292 <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
293 <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
296 <!-- The default high-performance update handler -->
297 <updateHandler class="solr.DirectUpdateHandler2">
299 <!-- Enables a transaction log, used for real-time get, durability, and
300 and solr cloud replica recovery. The log can grow as big as
301 uncommitted changes to the index, so use of a hard autoCommit
302 is recommended (see below).
303 "dir" - the target directory for transaction logs, defaults to the
304 solr data directory. -->
306 <str name="dir">${solr.ulog.dir:}</str>
311 Perform a hard commit automatically under certain conditions.
312 Instead of enabling autoCommit, consider using "commitWithin"
313 when adding documents.
315 http://wiki.apache.org/solr/UpdateXmlMessages
317 maxDocs - Maximum number of documents to add since the last
318 commit before automatically triggering a new commit.
320 maxTime - Maximum amount of time in ms that is allowed to pass
321 since a document was added before automaticly
322 triggering a new commit.
323 openSearcher - if false, the commit causes recent index changes
324 to be flushed to stable storage, but does not cause a new
325 searcher to be opened to make those changes visible.
328 <maxTime>15000</maxTime>
329 <openSearcher>false</openSearcher>
332 <!-- softAutoCommit is like autoCommit except it causes a
333 'soft' commit which only ensures that changes are visible
334 but does not ensure that data is synced to disk. This is
335 faster and more near-realtime friendly than a hard commit.
339 <maxTime>1000</maxTime>
343 <!-- Update Related Event Listeners
345 Various IndexWriter related events can trigger Listeners to
348 postCommit - fired after every commit or optimize command
349 postOptimize - fired after every optimize command
351 <!-- The RunExecutableListener executes an external command from a
352 hook such as postCommit or postOptimize.
354 exe - the name of the executable to run
355 dir - dir to use as the current working directory. (default=".")
356 wait - the calling thread waits until the executable returns.
358 args - the arguments to pass to the program. (default is none)
359 env - environment variables to set. (default is none)
361 <!-- This example shows how RunExecutableListener could be used
362 with the script based replication...
363 http://wiki.apache.org/solr/CollectionDistribution
366 <listener event="postCommit" class="solr.RunExecutableListener">
367 <str name="exe">solr/bin/snapshooter</str>
368 <str name="dir">.</str>
369 <bool name="wait">true</bool>
370 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
371 <arr name="env"> <str>MYVAR=val1</str> </arr>
377 <!-- IndexReaderFactory
379 Use the following format to specify a custom IndexReaderFactory,
380 which allows for alternate IndexReader implementations.
382 ** Experimental Feature **
384 Please note - Using a custom IndexReaderFactory may prevent
385 certain other features from working. The API to
386 IndexReaderFactory may change without warning or may even be
387 removed from future releases if the problems cannot be
391 ** Features that may not work with custom IndexReaderFactory **
393 The ReplicationHandler assumes a disk-resident index. Using a
394 custom IndexReader implementation may cause incompatibility
395 with ReplicationHandler and may cause replication to not work
396 correctly. See SOLR-1366 for details.
400 <indexReaderFactory name="IndexReaderFactory" class="package.class">
401 <str name="someArg">Some Value</str>
402 </indexReaderFactory >
404 <!-- By explicitly declaring the Factory, the termIndexDivisor can
408 <indexReaderFactory name="IndexReaderFactory"
409 class="solr.StandardIndexReaderFactory">
410 <int name="setTermIndexDivisor">12</int>
411 </indexReaderFactory >
414 <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
415 Query section - these settings control query time things like caches
416 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
418 <!-- Max Boolean Clauses
420 Maximum number of clauses in each BooleanQuery, an exception
421 is thrown if exceeded.
425 This option actually modifies a global Lucene property that
426 will affect all SolrCores. If multiple solrconfig.xml files
427 disagree on this property, the value at any given moment will
428 be based on the last SolrCore to be initialized.
431 <maxBooleanClauses>1024</maxBooleanClauses>
434 <!-- Solr Internal Query Caches
436 There are two implementations of cache available for Solr,
437 LRUCache, based on a synchronized LinkedHashMap, and
438 FastLRUCache, based on a ConcurrentHashMap.
440 FastLRUCache has faster gets and slower puts in single
441 threaded operation and thus is generally faster than LRUCache
442 when the hit ratio of the cache is high (> 75%), and may be
443 faster under other scenarios on multi-cpu systems.
448 Cache used by SolrIndexSearcher for filters (DocSets),
449 unordered sets of *all* documents that match a query. When a
450 new searcher is opened, its caches may be prepopulated or
451 "autowarmed" using data from caches in the old searcher.
452 autowarmCount is the number of items to prepopulate. For
453 LRUCache, the autowarmed items will be the most recently
457 class - the SolrCache implementation LRUCache or
458 (LRUCache or FastLRUCache)
459 size - the maximum number of entries in the cache
460 initialSize - the initial capacity (number of entries) of
461 the cache. (see java.util.HashMap)
462 autowarmCount - the number of entries to prepopulate from
465 <filterCache class="solr.FastLRUCache"
470 <!-- Query Result Cache
472 Caches results of searches - ordered lists of document ids
473 (DocList) based on a query, a sort, and the range of documents requested.
475 <queryResultCache class="solr.LRUCache"
482 Caches Lucene Document objects (the stored fields for each
483 document). Since Lucene internal document ids are transient,
484 this cache will not be autowarmed.
486 <documentCache class="solr.LRUCache"
491 <!-- Field Value Cache
493 Cache used to hold field values that are quickly accessible
494 by document id. The fieldValueCache is created by default
495 even if not configured here.
498 <fieldValueCache class="solr.FastLRUCache"
506 Example of a generic cache. These caches may be accessed by
507 name through SolrIndexSearcher.getCache(),cacheLookup(), and
508 cacheInsert(). The purpose is to enable easy caching of
509 user/application level data. The regenerator argument should
510 be specified as an implementation of solr.CacheRegenerator
511 if autowarming is desired.
514 <cache name="myUserCache"
515 class="solr.LRUCache"
519 regenerator="com.mycompany.MyRegenerator"
524 <!-- Lazy Field Loading
526 If true, stored fields that are not requested will be loaded
527 lazily. This can result in a significant speed improvement
528 if the usual case is to not load all stored fields,
529 especially if the skipped fields are large compressed text
532 <enableLazyFieldLoading>true</enableLazyFieldLoading>
534 <!-- Use Filter For Sorted Query
536 A possible optimization that attempts to use a filter to
537 satisfy a search. If the requested sort does not include
538 score, then the filterCache will be checked for a filter
539 matching the query. If found, the filter will be used as the
540 source of document ids, and then the sort will be applied to
543 For most situations, this will not be useful unless you
544 frequently get the same search repeatedly with different sort
545 options, and none of them ever use "score"
548 <useFilterForSortedQuery>true</useFilterForSortedQuery>
551 <!-- Result Window Size
553 An optimization for use with the queryResultCache. When a search
554 is requested, a superset of the requested number of document ids
555 are collected. For example, if a search for a particular query
556 requests matching documents 10 through 19, and queryWindowSize is 50,
557 then documents 0 through 49 will be collected and cached. Any further
558 requests in that range can be satisfied via the cache.
560 <queryResultWindowSize>20</queryResultWindowSize>
562 <!-- Maximum number of documents to cache for any entry in the
565 <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
567 <!-- Query Related Event Listeners
569 Various IndexSearcher related events can trigger Listeners to
572 newSearcher - fired whenever a new searcher is being prepared
573 and there is a current searcher handling requests (aka
574 registered). It can be used to prime certain caches to
575 prevent long request times for certain requests.
577 firstSearcher - fired whenever a new searcher is being
578 prepared but there is no current registered searcher to handle
579 requests or to gain autowarming data from.
583 <!-- QuerySenderListener takes an array of NamedList and executes a
584 local query request for each NamedList in sequence.
586 <listener event="newSearcher" class="solr.QuerySenderListener">
589 <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
590 <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
594 <listener event="firstSearcher" class="solr.QuerySenderListener">
597 <str name="q">static firstSearcher warming in solrconfig.xml</str>
602 <!-- Use Cold Searcher
604 If a search request comes in and there is no current
605 registered searcher, then immediately register the still
606 warming searcher and use it. If "false" then all requests
607 will block until the first searcher is done warming.
609 <useColdSearcher>false</useColdSearcher>
611 <!-- Max Warming Searchers
613 Maximum number of searchers that may be warming in the
614 background concurrently. An error is returned if this limit
617 Recommend values of 1-2 for read-only slaves, higher for
618 masters w/o cache warming.
620 <maxWarmingSearchers>2</maxWarmingSearchers>
625 <!-- Request Dispatcher
627 This section contains instructions for how the SolrDispatchFilter
628 should behave when processing requests for this SolrCore.
630 handleSelect is a legacy option that affects the behavior of requests
631 such as /select?qt=XXX
633 handleSelect="true" will cause the SolrDispatchFilter to process
634 the request and dispatch the query to a handler specified by the
635 "qt" param, assuming "/select" isn't already registered.
637 handleSelect="false" will cause the SolrDispatchFilter to
638 ignore "/select" requests, resulting in a 404 unless a handler
639 is explicitly registered with the name "/select"
641 handleSelect="true" is not recommended for new users, but is the default
642 for backwards compatibility
644 <requestDispatcher handleSelect="false" >
647 These settings indicate how Solr Requests may be parsed, and
648 what restrictions may be placed on the ContentStreams from
651 enableRemoteStreaming - enables use of the stream.file
652 and stream.url parameters for specifying remote streams.
654 multipartUploadLimitInKB - specifies the max size of
655 Multipart File Uploads that Solr will allow in a Request.
658 The settings below authorize Solr to fetch remote files, You
659 should make sure your system has some authentication before
660 using enableRemoteStreaming="true"
663 <requestParsers enableRemoteStreaming="true"
664 multipartUploadLimitInKB="2048000" />
668 Set HTTP caching related parameters (for proxy caches and clients).
670 The options below instruct Solr not to output any HTTP Caching
673 <httpCaching never304="true" />
674 <!-- If you include a <cacheControl> directive, it will be used to
675 generate a Cache-Control header (as well as an Expires header
676 if the value contains "max-age=")
678 By default, no Cache-Control header is generated.
680 You can use the <cacheControl> option even if you have set
684 <httpCaching never304="true" >
685 <cacheControl>max-age=30, public</cacheControl>
688 <!-- To enable Solr to respond with automatically generated HTTP
689 Caching headers, and to response to Cache Validation requests
690 correctly, set the value of never304="false"
692 This will cause Solr to generate Last-Modified and ETag
693 headers based on the properties of the Index.
695 The following options can also be specified to affect the
696 values of these headers...
698 lastModFrom - the default value is "openTime" which means the
699 Last-Modified value (and validation against If-Modified-Since
700 requests) will all be relative to when the current Searcher
701 was opened. You can change it to lastModFrom="dirLastMod" if
702 you want the value to exactly correspond to when the physical
703 index was last modified.
705 etagSeed="..." is an option you can change to force the ETag
706 header (and validation against If-None-Match requests) to be
707 different even if the index has not changed (ie: when making
708 significant changes to your config file)
710 (lastModifiedFrom and etagSeed are both ignored if you use
711 the never304="true" option)
714 <httpCaching lastModifiedFrom="openTime"
716 <cacheControl>max-age=30, public</cacheControl>
721 <!-- Request Handlers
723 http://wiki.apache.org/solr/SolrRequestHandler
725 Incoming queries will be dispatched to a specific handler by name
726 based on the path specified in the request.
728 Legacy behavior: If the request path uses "/select" but no Request
729 Handler has that name, and if handleSelect="true" has been specified in
730 the requestDispatcher, then the Request Handler is dispatched based on
731 the qt parameter. Handlers without a leading '/' are accessed this way
732 like so: http://host/app/[core/]select?qt=name If no qt is
733 given, then the requestHandler that declares default="true" will be
734 used or the one named "standard".
736 If a Request Handler is declared with startup="lazy", then it will
737 not be initialized until the first request that uses it.
742 http://wiki.apache.org/solr/SearchHandler
744 For processing Search Queries, the primary Request Handler
745 provided with Solr is "SearchHandler" It delegates to a sequent
746 of SearchComponents (see below) and supports distributed
747 queries across multiple shards
749 <requestHandler name="/select" class="solr.SearchHandler">
750 <!-- default values for query parameters can be specified, these
751 will be overridden by parameters in the request
753 <lst name="defaults">
754 <str name="echoParams">explicit</str>
755 <int name="rows">50</int>
756 <str name="df">text</str>
758 <!-- In addition to defaults, "appends" params can be specified
759 to identify values which should be appended to the list of
760 multi-val params from the query (or the existing "defaults").
762 <!-- In this example, the param "fq=instock:true" would be appended to
763 any query time fq params the user may specify, as a mechanism for
764 partitioning the index, independent of any user selected filtering
765 that may also be desired (perhaps as a result of faceted searching).
767 NOTE: there is *absolutely* nothing a client can do to prevent these
768 "appends" values from being used, so don't use this mechanism
769 unless you are sure you always want it.
773 <str name="fq">inStock:true</str>
776 <!-- "invariants" are a way of letting the Solr maintainer lock down
777 the options available to Solr clients. Any params values
778 specified here are used regardless of what values may be specified
779 in either the query, the "defaults", or the "appends" params.
781 In this example, the facet.field and facet.query params would
782 be fixed, limiting the facets clients can use. Faceting is
783 not turned on by default - but if the client does specify
784 facet=true in the request, these are the only facets they
785 will be able to see counts for; regardless of what other
786 facet.field or facet.query params they may specify.
788 NOTE: there is *absolutely* nothing a client can do to prevent these
789 "invariants" values from being used, so don't use this mechanism
790 unless you are sure you always want it.
793 <lst name="invariants">
794 <str name="facet.field">cat</str>
795 <str name="facet.field">manu_exact</str>
796 <str name="facet.query">price:[* TO 500]</str>
797 <str name="facet.query">price:[500 TO *]</str>
800 <!-- If the default list of SearchComponents is not desired, that
801 list can either be overridden completely, or components can be
802 prepended or appended to the default list. (see below)
805 <arr name="components">
806 <str>nameOfCustomComponent1</str>
807 <str>nameOfCustomComponent2</str>
812 <!-- A request handler that returns indented JSON by default -->
813 <requestHandler name="/query" class="solr.SearchHandler">
814 <lst name="defaults">
815 <str name="echoParams">explicit</str>
816 <str name="wt">json</str>
817 <str name="indent">true</str>
818 <str name="df">text</str>
823 <!-- realtime get handler, guaranteed to return the latest stored fields of
824 any document, without the need to commit or open a new searcher. The
825 current implementation relies on the updateLog feature being enabled. -->
826 <requestHandler name="/get" class="solr.RealTimeGetHandler">
827 <lst name="defaults">
828 <str name="omitHeader">true</str>
829 <str name="wt">json</str>
830 <str name="indent">true</str>
835 <!-- A Robust Example
837 This example SearchHandler declaration shows off usage of the
838 SearchHandler with many defaults declared
840 Note that multiple instances of the same Request Handler
841 (SearchHandler) can be registered multiple times with different
842 names (and different init parameters)
844 <requestHandler name="/browse" class="solr.SearchHandler">
845 <lst name="defaults">
846 <str name="echoParams">explicit</str>
848 <!-- VelocityResponseWriter settings -->
849 <str name="wt">velocity</str>
850 <str name="v.template">browse</str>
851 <str name="v.layout">layout</str>
852 <str name="title">Solritas</str>
854 <!-- Query settings -->
855 <str name="defType">edismax</str>
857 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
858 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
860 <str name="df">text</str>
861 <str name="mm">100%</str>
862 <str name="q.alt">*:*</str>
863 <str name="rows">10</str>
864 <str name="fl">*,score</str>
867 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
868 title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
870 <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
871 <int name="mlt.count">3</int>
873 <!-- Faceting defaults -->
874 <str name="facet">on</str>
875 <str name="facet.field">cat</str>
876 <str name="facet.field">manu_exact</str>
877 <str name="facet.field">content_type</str>
878 <str name="facet.field">author_s</str>
879 <str name="facet.query">ipod</str>
880 <str name="facet.query">GB</str>
881 <str name="facet.mincount">1</str>
882 <str name="facet.pivot">cat,inStock</str>
883 <str name="facet.range.other">after</str>
884 <str name="facet.range">price</str>
885 <int name="f.price.facet.range.start">0</int>
886 <int name="f.price.facet.range.end">600</int>
887 <int name="f.price.facet.range.gap">50</int>
888 <str name="facet.range">popularity</str>
889 <int name="f.popularity.facet.range.start">0</int>
890 <int name="f.popularity.facet.range.end">10</int>
891 <int name="f.popularity.facet.range.gap">3</int>
892 <str name="facet.range">manufacturedate_dt</str>
893 <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
894 <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
895 <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
896 <str name="f.manufacturedate_dt.facet.range.other">before</str>
897 <str name="f.manufacturedate_dt.facet.range.other">after</str>
899 <!-- Highlighting defaults -->
900 <str name="hl">on</str>
901 <str name="hl.fl">content features title name</str>
902 <str name="hl.encoder">html</str>
903 <str name="hl.simple.pre"><b></str>
904 <str name="hl.simple.post"></b></str>
905 <str name="f.title.hl.fragsize">0</str>
906 <str name="f.title.hl.alternateField">title</str>
907 <str name="f.name.hl.fragsize">0</str>
908 <str name="f.name.hl.alternateField">name</str>
909 <str name="f.content.hl.snippets">3</str>
910 <str name="f.content.hl.fragsize">200</str>
911 <str name="f.content.hl.alternateField">content</str>
912 <str name="f.content.hl.maxAlternateFieldLength">750</str>
914 <!-- Spell checking defaults -->
915 <str name="spellcheck">on</str>
916 <str name="spellcheck.extendedResults">false</str>
917 <str name="spellcheck.count">5</str>
918 <str name="spellcheck.alternativeTermCount">2</str>
919 <str name="spellcheck.maxResultsForSuggest">5</str>
920 <str name="spellcheck.collate">true</str>
921 <str name="spellcheck.collateExtendedResults">true</str>
922 <str name="spellcheck.maxCollationTries">5</str>
923 <str name="spellcheck.maxCollations">3</str>
926 <!-- append spellchecking to our list of components -->
927 <arr name="last-components">
928 <str>spellcheck</str>
933 <!-- Update Request Handler.
935 http://wiki.apache.org/solr/UpdateXmlMessages
937 The canonical Request Handler for Modifying the Index through
938 commands specified using XML, JSON, CSV, or JAVABIN
940 Note: Since solr1.1 requestHandlers requires a valid content
941 type header if posted in the body. For example, curl now
942 requires: -H 'Content-type:text/xml; charset=utf-8'
944 To override the request content type and force a specific
945 Content-type, use the request parameter:
946 ?update.contentType=text/csv
948 This handler will pick a response format to match the input
949 if the 'wt' parameter is not explicit
951 <requestHandler name="/update" class="solr.UpdateRequestHandler">
952 <!-- See below for information on defining
953 updateRequestProcessorChains that can be used by name
954 on each Update Request
957 <lst name="defaults">
958 <str name="update.chain">dedupe</str>
964 <!-- Solr Cell Update Request Handler
966 http://wiki.apache.org/solr/ExtractingRequestHandler
969 <requestHandler name="/update/extract"
971 class="solr.extraction.ExtractingRequestHandler" >
972 <lst name="defaults">
973 <str name="lowernames">true</str>
974 <str name="uprefix">ignored_</str>
976 <!-- capture link hrefs but ignore div attributes -->
977 <str name="captureAttr">true</str>
978 <str name="fmap.a">links</str>
979 <str name="fmap.div">ignored_</str>
984 <!-- Field Analysis Request Handler
986 RequestHandler that provides much the same functionality as
987 analysis.jsp. Provides the ability to specify multiple field
988 types and field names in the same request and outputs
989 index-time and query-time analysis for each of them.
991 Request parameters are:
992 analysis.fieldname - field name whose analyzers are to be used
994 analysis.fieldtype - field type whose analyzers are to be used
995 analysis.fieldvalue - text for index-time analysis
996 q (or analysis.q) - text for query time analysis
997 analysis.showmatch (true|false) - When set to true and when
998 query analysis is performed, the produced tokens of the
999 field value analysis will be marked as "matched" for every
1000 token that is produces by the query analysis
1002 <requestHandler name="/analysis/field"
1004 class="solr.FieldAnalysisRequestHandler" />
1007 <!-- Document Analysis Handler
1009 http://wiki.apache.org/solr/AnalysisRequestHandler
1011 An analysis handler that provides a breakdown of the analysis
1012 process of provided documents. This handler expects a (single)
1013 content stream with the following format:
1017 <field name="id">1</field>
1018 <field name="name">The Name</field>
1019 <field name="text">The Text Value</field>
1026 Note: Each document must contain a field which serves as the
1027 unique key. This key is used in the returned response to associate
1028 an analysis breakdown to the analyzed document.
1030 Like the FieldAnalysisRequestHandler, this handler also supports
1031 query analysis by sending either an "analysis.query" or "q"
1032 request parameter that holds the query text to be analyzed. It
1033 also supports the "analysis.showmatch" parameter which when set to
1034 true, all field tokens that match the query tokens will be marked
1037 <requestHandler name="/analysis/document"
1038 class="solr.DocumentAnalysisRequestHandler"
1041 <!-- Echo the request contents back to the client -->
1042 <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1043 <lst name="defaults">
1044 <str name="echoParams">explicit</str>
1045 <str name="echoHandler">true</str>
1049 <!-- Search Components
1051 Search components are registered to SolrCore and used by
1052 instances of SearchHandler (which can access them by name)
1054 By default, the following components are available:
1056 <searchComponent name="query" class="solr.QueryComponent" />
1057 <searchComponent name="facet" class="solr.FacetComponent" />
1058 <searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
1059 <searchComponent name="highlight" class="solr.HighlightComponent" />
1060 <searchComponent name="stats" class="solr.StatsComponent" />
1061 <searchComponent name="debug" class="solr.DebugComponent" />
1063 Default configuration in a requestHandler would look like:
1065 <arr name="components">
1069 <str>highlight</str>
1074 If you register a searchComponent to one of the standard names,
1075 that will be used instead of the default.
1077 To insert components before or after the 'standard' components, use:
1079 <arr name="first-components">
1080 <str>myFirstComponentName</str>
1083 <arr name="last-components">
1084 <str>myLastComponentName</str>
1087 NOTE: The component registered with the name "debug" will
1088 always be executed after the "last-components"
1094 The spell check component can return a list of alternative spelling
1097 http://wiki.apache.org/solr/SpellCheckComponent
1099 <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1101 <str name="queryAnalyzerFieldType">textSpell</str>
1103 <!-- Multiple "Spell Checkers" can be declared and used by this
1107 <!-- a spellchecker built from a field of the main index -->
1108 <lst name="spellchecker">
1109 <str name="name">default</str>
1110 <str name="field">name</str>
1111 <str name="classname">solr.DirectSolrSpellChecker</str>
1112 <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1113 <str name="distanceMeasure">internal</str>
1114 <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1115 <float name="accuracy">0.5</float>
1116 <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1117 <int name="maxEdits">2</int>
1118 <!-- the minimum shared prefix when enumerating terms -->
1119 <int name="minPrefix">1</int>
1120 <!-- maximum number of inspections per result. -->
1121 <int name="maxInspections">5</int>
1122 <!-- minimum length of a query term to be considered for correction -->
1123 <int name="minQueryLength">4</int>
1124 <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1125 <float name="maxQueryFrequency">0.01</float>
1126 <!-- uncomment this to require suggestions to occur in 1% of the documents
1127 <float name="thresholdTokenFrequency">.01</float>
1131 <!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
1132 <lst name="spellchecker">
1133 <str name="name">wordbreak</str>
1134 <str name="classname">solr.WordBreakSolrSpellChecker</str>
1135 <str name="field">name</str>
1136 <str name="combineWords">true</str>
1137 <str name="breakWords">true</str>
1138 <int name="maxChanges">10</int>
1141 <!-- a spellchecker that uses a different distance measure -->
1143 <lst name="spellchecker">
1144 <str name="name">jarowinkler</str>
1145 <str name="field">spell</str>
1146 <str name="classname">solr.DirectSolrSpellChecker</str>
1147 <str name="distanceMeasure">
1148 org.apache.lucene.search.spell.JaroWinklerDistance
1153 <!-- a spellchecker that use an alternate comparator
1155 comparatorClass be one of:
1157 2. freq (Frequency first, then score)
1158 3. A fully qualified class name
1161 <lst name="spellchecker">
1162 <str name="name">freq</str>
1163 <str name="field">lowerfilt</str>
1164 <str name="classname">solr.DirectSolrSpellChecker</str>
1165 <str name="comparatorClass">freq</str>
1168 <!-- A spellchecker that reads the list of words from a file -->
1170 <lst name="spellchecker">
1171 <str name="classname">solr.FileBasedSpellChecker</str>
1172 <str name="name">file</str>
1173 <str name="sourceLocation">spellings.txt</str>
1174 <str name="characterEncoding">UTF-8</str>
1175 <str name="spellcheckIndexDir">spellcheckerFile</str>
1180 <!-- A request handler for demonstrating the spellcheck component.
1182 NOTE: This is purely as an example. The whole purpose of the
1183 SpellCheckComponent is to hook it into the request handler that
1184 handles your normal user queries so that a separate request is
1185 not needed to get suggestions.
1187 IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1188 NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1190 See http://wiki.apache.org/solr/SpellCheckComponent for details
1191 on the request parameters.
1193 <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1194 <lst name="defaults">
1195 <str name="df">text</str>
1196 <!-- Solr will use suggestions from both the 'default' spellchecker
1197 and from the 'wordbreak' spellchecker and combine them.
1198 collations (re-written queries) can include a combination of
1199 corrections from both spellcheckers -->
1200 <str name="spellcheck.dictionary">default</str>
1201 <str name="spellcheck.dictionary">wordbreak</str>
1202 <str name="spellcheck">on</str>
1203 <str name="spellcheck.extendedResults">true</str>
1204 <str name="spellcheck.count">10</str>
1205 <str name="spellcheck.alternativeTermCount">5</str>
1206 <str name="spellcheck.maxResultsForSuggest">5</str>
1207 <str name="spellcheck.collate">true</str>
1208 <str name="spellcheck.collateExtendedResults">true</str>
1209 <str name="spellcheck.maxCollationTries">10</str>
1210 <str name="spellcheck.maxCollations">5</str>
1212 <arr name="last-components">
1213 <str>spellcheck</str>
1217 <!-- Term Vector Component
1219 http://wiki.apache.org/solr/TermVectorComponent
1221 <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1223 <!-- A request handler for demonstrating the term vector component
1225 This is purely as an example.
1227 In reality you will likely want to add the component to your
1228 already specified request handlers.
1230 <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1231 <lst name="defaults">
1232 <str name="df">text</str>
1233 <bool name="tv">true</bool>
1235 <arr name="last-components">
1236 <str>tvComponent</str>
1240 <!-- Clustering Component. (Omitted here. See the default Solr example for a typical configuration.) -->
1242 <!-- Terms Component
1244 http://wiki.apache.org/solr/TermsComponent
1246 A component to return terms and document frequency of those
1249 <searchComponent name="terms" class="solr.TermsComponent"/>
1251 <!-- A request handler for demonstrating the terms component -->
1252 <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1253 <lst name="defaults">
1254 <bool name="terms">true</bool>
1255 <bool name="distrib">false</bool>
1257 <arr name="components">
1263 <!-- Query Elevation Component
1265 http://wiki.apache.org/solr/QueryElevationComponent
1267 a search component that enables you to configure the top
1268 results for a given query regardless of the normal lucene
1271 <!-- <searchComponent name="elevator" class="solr.QueryElevationComponent" >-->
1272 <!-- pick a fieldType to analyze queries -->
1273 <!--<str name="queryFieldType">string</str>
1274 <str name="config-file">elevate.xml</str>
1275 </searchComponent>-->
1277 <!-- A request handler for demonstrating the elevator component -->
1278 <!-- <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1279 <lst name="defaults">
1280 <str name="echoParams">explicit</str>
1281 <str name="df">text</str>
1283 <arr name="last-components">
1286 </requestHandler>-->
1288 <!-- Highlighting Component
1290 http://wiki.apache.org/solr/HighlightingParameters
1292 <searchComponent class="solr.HighlightComponent" name="highlight">
1294 <!-- Configure the standard fragmenter -->
1295 <!-- This could most likely be commented out in the "default" case -->
1296 <fragmenter name="gap"
1298 class="solr.highlight.GapFragmenter">
1299 <lst name="defaults">
1300 <int name="hl.fragsize">100</int>
1304 <!-- A regular-expression-based fragmenter
1305 (for sentence extraction)
1307 <fragmenter name="regex"
1308 class="solr.highlight.RegexFragmenter">
1309 <lst name="defaults">
1310 <!-- slightly smaller fragsizes work better because of slop -->
1311 <int name="hl.fragsize">70</int>
1312 <!-- allow 50% slop on fragment sizes -->
1313 <float name="hl.regex.slop">0.5</float>
1314 <!-- a basic sentence pattern -->
1315 <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
1319 <!-- Configure the standard formatter -->
1320 <formatter name="html"
1322 class="solr.highlight.HtmlFormatter">
1323 <lst name="defaults">
1324 <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1325 <str name="hl.simple.post"><![CDATA[</em>]]></str>
1329 <!-- Configure the standard encoder -->
1330 <encoder name="html"
1331 class="solr.highlight.HtmlEncoder" />
1333 <!-- Configure the standard fragListBuilder -->
1334 <fragListBuilder name="simple"
1335 class="solr.highlight.SimpleFragListBuilder"/>
1337 <!-- Configure the single fragListBuilder -->
1338 <fragListBuilder name="single"
1339 class="solr.highlight.SingleFragListBuilder"/>
1341 <!-- Configure the weighted fragListBuilder -->
1342 <fragListBuilder name="weighted"
1344 class="solr.highlight.WeightedFragListBuilder"/>
1346 <!-- default tag FragmentsBuilder -->
1347 <fragmentsBuilder name="default"
1349 class="solr.highlight.ScoreOrderFragmentsBuilder">
1351 <lst name="defaults">
1352 <str name="hl.multiValuedSeparatorChar">/</str>
1357 <!-- multi-colored tag FragmentsBuilder -->
1358 <fragmentsBuilder name="colored"
1359 class="solr.highlight.ScoreOrderFragmentsBuilder">
1360 <lst name="defaults">
1361 <str name="hl.tag.pre"><![CDATA[
1362 <b style="background:yellow">,<b style="background:lawgreen">,
1363 <b style="background:aquamarine">,<b style="background:magenta">,
1364 <b style="background:palegreen">,<b style="background:coral">,
1365 <b style="background:wheat">,<b style="background:khaki">,
1366 <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1367 <str name="hl.tag.post"><![CDATA[</b>]]></str>
1371 <boundaryScanner name="default"
1373 class="solr.highlight.SimpleBoundaryScanner">
1374 <lst name="defaults">
1375 <str name="hl.bs.maxScan">10</str>
1376 <str name="hl.bs.chars">.,!? 	 </str>
1380 <boundaryScanner name="breakIterator"
1381 class="solr.highlight.BreakIteratorBoundaryScanner">
1382 <lst name="defaults">
1383 <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1384 <str name="hl.bs.type">WORD</str>
1385 <!-- language and country are used when constructing Locale object. -->
1386 <!-- And the Locale object will be used when getting instance of BreakIterator -->
1387 <str name="hl.bs.language">en</str>
1388 <str name="hl.bs.country">US</str>
1394 <!-- Update Processors
1396 Chains of Update Processor Factories for dealing with Update
1397 Requests can be declared, and then used by name in Update
1400 http://wiki.apache.org/solr/UpdateRequestProcessor
1405 An example dedup update processor that creates the "id" field
1406 on the fly based on the hash code of some other fields. This
1407 example has overwriteDupes set to false since we are using the
1408 id field as the signatureField and Solr will maintain
1409 uniqueness based on that anyway.
1413 <updateRequestProcessorChain name="dedupe">
1414 <processor class="solr.processor.SignatureUpdateProcessorFactory">
1415 <bool name="enabled">true</bool>
1416 <str name="signatureField">id</str>
1417 <bool name="overwriteDupes">false</bool>
1418 <str name="fields">name,features,cat</str>
1419 <str name="signatureClass">solr.processor.Lookup3Signature</str>
1421 <processor class="solr.LogUpdateProcessorFactory" />
1422 <processor class="solr.RunUpdateProcessorFactory" />
1423 </updateRequestProcessorChain>
1426 <!-- Language identification
1428 This example update chain identifies the language of the incoming
1429 documents using the langid contrib. The detected language is
1430 written to field language_s. No field name mapping is done.
1431 The fields used for detection are text, title, subject and description,
1432 making this example suitable for detecting languages form full-text
1433 rich documents injected via ExtractingRequestHandler.
1434 See more about langId at http://wiki.apache.org/solr/LanguageDetection
1437 <updateRequestProcessorChain name="langid">
1438 <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1439 <str name="langid.fl">text,title,subject,description</str>
1440 <str name="langid.langField">language_s</str>
1441 <str name="langid.fallback">en</str>
1443 <processor class="solr.LogUpdateProcessorFactory" />
1444 <processor class="solr.RunUpdateProcessorFactory" />
1445 </updateRequestProcessorChain>
1448 <!-- Script update processor
1450 This example hooks in an update processor implemented using JavaScript.
1452 See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1455 <updateRequestProcessorChain name="script">
1456 <processor class="solr.StatelessScriptUpdateProcessorFactory">
1457 <str name="script">update-script.js</str>
1459 <str name="config_param">example config parameter</str>
1462 <processor class="solr.RunUpdateProcessorFactory" />
1463 </updateRequestProcessorChain>
1466 <!-- Response Writers
1468 http://wiki.apache.org/solr/QueryResponseWriter
1470 Request responses will be written using the writer specified by
1471 the 'wt' request parameter matching the name of a registered
1474 The "default" writer is the default and will be used if 'wt' is
1475 not specified in the request.
1477 <!-- The following response writers are implicitly configured unless
1481 <queryResponseWriter name="xml"
1483 class="solr.XMLResponseWriter" />
1484 <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1485 <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1486 <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1487 <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1488 <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1489 <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1490 <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1493 <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1494 <!-- For the purposes of the tutorial, JSON responses are written as
1495 plain text so that they are easy to read in *any* browser.
1496 If you expect a MIME type of "application/json" just remove this override.
1498 <str name="content-type">text/plain; charset=UTF-8</str>
1499 </queryResponseWriter>
1502 Custom response writers can be declared as needed...
1504 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy">
1505 <str name="template.base.dir">${velocity.template.base.dir:}</str>
1506 </queryResponseWriter>
1508 <!-- XSLT response writer transforms the XML output by any xslt file found
1509 in Solr's conf/xslt directory. Changes to xslt files are checked for
1510 every xsltCacheLifetimeSeconds.
1512 <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1513 <int name="xsltCacheLifetimeSeconds">5</int>
1514 </queryResponseWriter>
1518 http://wiki.apache.org/solr/SolrQuerySyntax
1520 Multiple QParserPlugins can be registered by name, and then
1521 used in either the "defType" param for the QueryComponent (used
1522 by SearchHandler) or in LocalParams
1524 <!-- example of registering a query parser -->
1526 <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1529 <!-- Function Parsers
1531 http://wiki.apache.org/solr/FunctionQuery
1533 Multiple ValueSourceParsers can be registered by name, and then
1534 used as function names when using the "func" QParser.
1536 <!-- example of registering a custom function parser -->
1538 <valueSourceParser name="myfunc"
1539 class="com.mycompany.MyValueSourceParser" />
1543 <!-- Document Transformers
1544 http://wiki.apache.org/solr/DocTransformers
1547 Could be something like:
1548 <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1549 <int name="connection">jdbc://....</int>
1552 To add a constant value to all docs, use:
1553 <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1554 <int name="value">5</int>
1557 If you want the user to still be able to change it with _value:something_ use this:
1558 <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1559 <double name="defaultValue">5</double>
1562 If you are using the QueryElevationComponent, you may wish to mark documents that get boosted. The
1563 EditorialMarkerFactory will do exactly that:
1564 <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />