2007-05-09 18:40:27 -04:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2006-11-09 18:13:58 -05:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<config>
|
2007-04-26 19:37:44 -04:00
|
|
|
<!-- Set this to 'false' if you want solr to continue working after it has
|
|
|
|
encountered an severe configuration error. In a production environment,
|
|
|
|
you may want solr to keep working even if one handler is mis-configured.
|
|
|
|
|
|
|
|
You may also set this to false using by setting the system property:
|
|
|
|
-Dsolr.abortOnConfigurationError=false
|
|
|
|
-->
|
|
|
|
<abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<!-- Used to specify an alternate directory to hold all index data
|
2006-05-21 17:55:12 -04:00
|
|
|
other than the default ./data under the Solr home.
|
2006-02-11 16:35:33 -05:00
|
|
|
If replication is in use, this should match the replication configuration. -->
|
2007-06-04 23:13:31 -04:00
|
|
|
<dataDir>${solr.data.dir:./solr/data}</dataDir>
|
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<indexDefaults>
|
|
|
|
<!-- Values here affect all index writers and act as a default unless overridden. -->
|
|
|
|
<useCompoundFile>false</useCompoundFile>
|
2008-03-05 15:23:36 -05:00
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
<mergeFactor>10</mergeFactor>
|
2008-03-05 15:23:36 -05:00
|
|
|
<!--
|
|
|
|
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
|
|
|
|
|
|
|
-->
|
|
|
|
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
|
|
|
<!-- Tell Lucene when to flush documents to disk.
|
|
|
|
Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
|
|
|
|
|
|
|
|
If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
|
|
|
|
|
|
|
|
-->
|
|
|
|
<ramBufferSizeMB>32</ramBufferSizeMB>
|
2006-02-11 16:35:33 -05:00
|
|
|
<maxMergeDocs>2147483647</maxMergeDocs>
|
|
|
|
<maxFieldLength>10000</maxFieldLength>
|
|
|
|
<writeLockTimeout>1000</writeLockTimeout>
|
|
|
|
<commitLockTimeout>10000</commitLockTimeout>
|
2008-03-05 15:23:36 -05:00
|
|
|
|
|
|
|
<!--
|
|
|
|
Expert: Turn on Lucene's auto commit capability.
|
2008-09-03 14:27:33 -04:00
|
|
|
This causes intermediate segment flushes to write a new lucene
|
|
|
|
index descriptor, enabling it to be opened by an external
|
|
|
|
IndexReader.
|
2008-03-05 15:23:36 -05:00
|
|
|
NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
|
|
|
|
-->
|
|
|
|
<!--<luceneAutoCommit>false</luceneAutoCommit>-->
|
|
|
|
<!--
|
|
|
|
Expert:
|
|
|
|
The Merge Policy in Lucene controls how merging is handled by Lucene. The default in 2.3 is the LogByteSizeMergePolicy, previous
|
|
|
|
versions used LogDocMergePolicy.
|
|
|
|
|
|
|
|
LogByteSizeMergePolicy chooses segments to merge based on their size. The Lucene 2.2 default, LogDocMergePolicy chose when
|
|
|
|
to merge based on number of documents
|
|
|
|
|
|
|
|
Other implementations of MergePolicy must have a no-argument constructor
|
|
|
|
-->
|
|
|
|
<!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Expert:
|
|
|
|
The Merge Scheduler in Lucene controls how merges are performed. The ConcurrentMergeScheduler (Lucene 2.3 default)
|
|
|
|
can perform merges in the background using separate threads. The SerialMergeScheduler (Lucene 2.2 default) does not.
|
|
|
|
-->
|
|
|
|
<!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
|
|
|
|
|
2009-07-06 15:31:37 -04:00
|
|
|
<!--
|
|
|
|
To aid in advanced debugging, you may turn on IndexWriter debug logging. Uncommenting this and setting to true
|
|
|
|
will set the file that the underlying Lucene IndexWriter will write its debug infostream to.
|
|
|
|
-->
|
|
|
|
<!-- <infoStream file="/path/file">false</infoStream> -->
|
|
|
|
|
2007-07-13 14:48:50 -04:00
|
|
|
<!--
|
2008-08-09 22:09:02 -04:00
|
|
|
This option specifies which Lucene LockFactory implementation to use.
|
2007-07-13 14:48:50 -04:00
|
|
|
|
2008-08-09 16:34:35 -04:00
|
|
|
single = SingleInstanceLockFactory - suggested for a read-only index
|
2008-08-09 22:09:02 -04:00
|
|
|
or when there is no possibility of another process trying
|
2008-08-09 16:34:35 -04:00
|
|
|
to modify the index.
|
2007-07-13 14:48:50 -04:00
|
|
|
native = NativeFSLockFactory
|
|
|
|
simple = SimpleFSLockFactory
|
|
|
|
|
2008-08-09 22:09:02 -04:00
|
|
|
(For backwards compatibility with Solr 1.2, 'simple' is the default
|
2008-08-09 16:34:35 -04:00
|
|
|
if not specified.)
|
2007-07-13 14:48:50 -04:00
|
|
|
-->
|
|
|
|
<lockType>single</lockType>
|
2006-02-11 16:35:33 -05:00
|
|
|
</indexDefaults>
|
|
|
|
|
|
|
|
<mainIndex>
|
|
|
|
<!-- options specific to the main on-disk lucene index -->
|
|
|
|
<useCompoundFile>false</useCompoundFile>
|
2008-03-05 15:23:36 -05:00
|
|
|
<ramBufferSizeMB>32</ramBufferSizeMB>
|
2006-02-11 16:35:33 -05:00
|
|
|
<mergeFactor>10</mergeFactor>
|
2008-03-05 15:23:36 -05:00
|
|
|
<!-- Deprecated -->
|
|
|
|
<!--<maxBufferedDocs>1000</maxBufferedDocs>-->
|
2006-02-11 16:35:33 -05:00
|
|
|
<maxMergeDocs>2147483647</maxMergeDocs>
|
|
|
|
<maxFieldLength>10000</maxFieldLength>
|
|
|
|
|
|
|
|
<!-- If true, unlock any held write or commit locks on startup.
|
|
|
|
This defeats the locking mechanism that allows multiple
|
|
|
|
processes to safely access a lucene index, and should be
|
2007-07-13 14:48:50 -04:00
|
|
|
used with care.
|
|
|
|
This is not needed if lock type is 'none' or 'single'
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
<unlockOnStartup>false</unlockOnStartup>
|
2009-06-04 08:17:31 -04:00
|
|
|
|
|
|
|
<!-- If true, IndexReaders will be reopened (often more efficient) instead
|
|
|
|
of closed and then opened.
|
|
|
|
-->
|
|
|
|
<reopenReaders>true</reopenReaders>
|
|
|
|
|
2008-09-28 23:37:41 -04:00
|
|
|
<!--
|
|
|
|
Custom deletion policies can specified here. The class must
|
|
|
|
implement org.apache.lucene.index.IndexDeletionPolicy.
|
|
|
|
|
|
|
|
http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
|
|
|
|
|
|
|
|
The standard Solr IndexDeletionPolicy implementation supports deleting
|
|
|
|
index commit points on number of commits, age of commit point and
|
|
|
|
optimized status.
|
|
|
|
|
|
|
|
The latest commit point should always be preserved regardless
|
|
|
|
of the criteria.
|
|
|
|
-->
|
|
|
|
<deletionPolicy class="solr.SolrDeletionPolicy">
|
|
|
|
<!-- Keep only optimized commit points -->
|
|
|
|
<str name="keepOptimizedOnly">false</str>
|
|
|
|
<!-- The maximum number of commit points to be kept -->
|
|
|
|
<str name="maxCommitsToKeep">1</str>
|
|
|
|
<!--
|
|
|
|
Delete all commit points once they have reached the given age.
|
|
|
|
Supports DateMathParser syntax e.g.
|
|
|
|
|
|
|
|
<str name="maxCommitAge">30MINUTES</str>
|
|
|
|
<str name="maxCommitAge">1DAY</str>
|
|
|
|
-->
|
|
|
|
</deletionPolicy>
|
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
</mainIndex>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-07-29 14:13:57 -04:00
|
|
|
<!-- Enables JMX if and only if an existing MBeanServer is found, use
|
|
|
|
this if you want to configure JMX through JVM parameters. Remove
|
|
|
|
this to disable exposing Solr configuration and statistics to JMX.
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-07-29 14:13:57 -04:00
|
|
|
If you want to connect to a particular server, specify the agentId
|
|
|
|
e.g. <jmx agentId="myAgent" />
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-07-29 14:13:57 -04:00
|
|
|
If you want to start a new MBeanServer, specify the serviceUrl
|
2008-09-20 10:33:02 -04:00
|
|
|
e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-07-29 14:13:57 -04:00
|
|
|
For more details see http://wiki.apache.org/solr/SolrJmx
|
|
|
|
-->
|
|
|
|
<jmx />
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<!-- the default high-performance update handler -->
|
|
|
|
<updateHandler class="solr.DirectUpdateHandler2">
|
|
|
|
|
2006-12-06 14:40:18 -05:00
|
|
|
<!-- A prefix of "solr." for class names is an alias that
|
|
|
|
causes solr to search appropriate packages, including
|
|
|
|
org.apache.solr.(search|update|request|core|analysis)
|
|
|
|
-->
|
|
|
|
|
2007-09-04 19:05:39 -04:00
|
|
|
<!-- Perform a <commit/> automatically under certain conditions:
|
|
|
|
maxDocs - number of updates since last commit is greater than this
|
|
|
|
maxTime - oldest uncommited update (in ms) is this long ago
|
2006-11-08 19:43:54 -05:00
|
|
|
<autoCommit>
|
|
|
|
<maxDocs>10000</maxDocs>
|
2007-09-04 19:05:39 -04:00
|
|
|
<maxTime>1000</maxTime>
|
2006-11-08 19:43:54 -05:00
|
|
|
</autoCommit>
|
|
|
|
-->
|
|
|
|
|
2009-06-18 20:40:42 -04:00
|
|
|
|
|
|
|
<!-- The RunExecutableListener executes an external command from a
|
|
|
|
hook such as postCommit or postOptimize.
|
2006-02-11 16:35:33 -05:00
|
|
|
exe - the name of the executable to run
|
|
|
|
dir - dir to use as the current working directory. default="."
|
|
|
|
wait - the calling thread waits until the executable returns. default="true"
|
|
|
|
args - the arguments to pass to the program. default=nothing
|
|
|
|
env - environment variables to set. default=nothing
|
|
|
|
-->
|
2006-03-31 16:25:20 -05:00
|
|
|
<!-- A postCommit event is fired after every commit or optimize command
|
2006-02-11 16:35:33 -05:00
|
|
|
<listener event="postCommit" class="solr.RunExecutableListener">
|
2007-08-14 21:36:44 -04:00
|
|
|
<str name="exe">solr/bin/snapshooter</str>
|
|
|
|
<str name="dir">.</str>
|
2006-02-11 16:35:33 -05:00
|
|
|
<bool name="wait">true</bool>
|
|
|
|
<arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
|
|
|
|
<arr name="env"> <str>MYVAR=val1</str> </arr>
|
|
|
|
</listener>
|
|
|
|
-->
|
2009-06-18 20:40:42 -04:00
|
|
|
<!-- A postOptimize event is fired only after every optimize command
|
2006-03-31 16:25:20 -05:00
|
|
|
<listener event="postOptimize" class="solr.RunExecutableListener">
|
|
|
|
<str name="exe">snapshooter</str>
|
|
|
|
<str name="dir">solr/bin</str>
|
|
|
|
<bool name="wait">true</bool>
|
|
|
|
</listener>
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
</updateHandler>
|
2009-06-08 10:56:31 -04:00
|
|
|
|
|
|
|
<!-- Use the following format to specify a custom IndexReaderFactory - allows for alternate
|
|
|
|
IndexReader implementations.
|
|
|
|
<indexReaderFactory name="IndexReaderFactory" class="package.class">
|
|
|
|
Parameters as required by the implementation
|
|
|
|
</indexReaderFactory >
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
<query>
|
|
|
|
<!-- Maximum number of clauses in a boolean query... can affect
|
|
|
|
range or prefix queries that expand to big boolean
|
|
|
|
queries. An exception is thrown if exceeded. -->
|
|
|
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
|
|
|
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-11-03 09:32:58 -05:00
|
|
|
<!-- There are two implementations of cache available for Solr,
|
|
|
|
LRUCache, based on a synchronized LinkedHashMap, and
|
|
|
|
FastLRUCache, based on a ConcurrentHashMap. FastLRUCache has faster gets
|
|
|
|
and slower puts in single threaded operation and thus is generally faster
|
|
|
|
than LRUCache when the hit ratio of the cache is high (> 75%), and may be
|
|
|
|
faster under other scenarios on multi-cpu systems. -->
|
2006-02-11 16:35:33 -05:00
|
|
|
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
|
|
|
|
unordered sets of *all* documents that match a query.
|
|
|
|
When a new searcher is opened, its caches may be prepopulated
|
|
|
|
or "autowarmed" using data from caches in the old searcher.
|
|
|
|
autowarmCount is the number of items to prepopulate. For LRUCache,
|
2006-09-19 10:05:35 -04:00
|
|
|
the autowarmed items will be the most recently accessed items.
|
|
|
|
Parameters:
|
2008-11-03 09:32:58 -05:00
|
|
|
class - the SolrCache implementation LRUCache or FastLRUCache
|
2006-09-19 10:05:35 -04:00
|
|
|
size - the maximum number of entries in the cache
|
|
|
|
initialSize - the initial capacity (number of entries) of
|
|
|
|
the cache. (seel java.util.HashMap)
|
|
|
|
autowarmCount - the number of entries to prepopulate from
|
|
|
|
and old cache.
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
<filterCache
|
2008-11-03 09:32:58 -05:00
|
|
|
class="solr.FastLRUCache"
|
2006-02-11 16:35:33 -05:00
|
|
|
size="512"
|
|
|
|
initialSize="512"
|
2008-09-03 14:27:33 -04:00
|
|
|
autowarmCount="128"/>
|
2006-02-11 16:35:33 -05:00
|
|
|
|
2008-12-07 16:11:55 -05:00
|
|
|
<!-- Cache used to hold field values that are quickly accessible
|
|
|
|
by document id. The fieldValueCache is created by default
|
|
|
|
even if not configured here.
|
|
|
|
<fieldValueCache
|
|
|
|
class="solr.FastLRUCache"
|
|
|
|
size="512"
|
|
|
|
autowarmCount="128"
|
|
|
|
showItems="32"
|
|
|
|
/>
|
|
|
|
-->
|
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
<!-- queryResultCache caches results of searches - ordered lists of
|
|
|
|
document ids (DocList) based on a query, a sort, and the range
|
|
|
|
of documents requested. -->
|
|
|
|
<queryResultCache
|
|
|
|
class="solr.LRUCache"
|
|
|
|
size="512"
|
|
|
|
initialSize="512"
|
2008-09-03 14:27:33 -04:00
|
|
|
autowarmCount="32"/>
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<!-- documentCache caches Lucene Document objects (the stored fields for each document).
|
|
|
|
Since Lucene internal document ids are transient, this cache will not be autowarmed. -->
|
|
|
|
<documentCache
|
|
|
|
class="solr.LRUCache"
|
|
|
|
size="512"
|
|
|
|
initialSize="512"
|
|
|
|
autowarmCount="0"/>
|
|
|
|
|
2006-11-27 17:40:21 -05:00
|
|
|
<!-- If true, stored fields that are not requested will be loaded lazily.
|
2007-05-28 15:13:36 -04:00
|
|
|
|
|
|
|
This can result in a significant speed improvement if the usual case is to
|
|
|
|
not load all stored fields, especially if the skipped fields are large compressed
|
|
|
|
text fields.
|
2006-11-27 17:40:21 -05:00
|
|
|
-->
|
2007-05-28 15:13:36 -04:00
|
|
|
<enableLazyFieldLoading>true</enableLazyFieldLoading>
|
2006-11-27 17:40:21 -05:00
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
<!-- Example of a generic cache. These caches may be accessed by name
|
|
|
|
through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
|
|
|
|
The purpose is to enable easy caching of user/application level data.
|
|
|
|
The regenerator argument should be specified as an implementation
|
|
|
|
of solr.search.CacheRegenerator if autowarming is desired. -->
|
|
|
|
<!--
|
|
|
|
<cache name="myUserCache"
|
|
|
|
class="solr.LRUCache"
|
|
|
|
size="4096"
|
|
|
|
initialSize="1024"
|
|
|
|
autowarmCount="1024"
|
|
|
|
regenerator="org.mycompany.mypackage.MyRegenerator"
|
|
|
|
/>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- An optimization that attempts to use a filter to satisfy a search.
|
|
|
|
If the requested sort does not include score, then the filterCache
|
|
|
|
will be checked for a filter matching the query. If found, the filter
|
|
|
|
will be used as the source of document ids, and then the sort will be
|
2006-12-11 16:50:41 -05:00
|
|
|
applied to that.
|
2006-02-11 16:35:33 -05:00
|
|
|
<useFilterForSortedQuery>true</useFilterForSortedQuery>
|
2006-12-11 16:50:41 -05:00
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<!-- An optimization for use with the queryResultCache. When a search
|
|
|
|
is requested, a superset of the requested number of document ids
|
2006-08-02 10:21:09 -04:00
|
|
|
are collected. For example, if a search for a particular query
|
2006-02-11 16:35:33 -05:00
|
|
|
requests matching documents 10 through 19, and queryWindowSize is 50,
|
2007-07-09 11:45:30 -04:00
|
|
|
then documents 0 through 49 will be collected and cached. Any further
|
2006-02-11 16:35:33 -05:00
|
|
|
requests in that range can be satisfied via the cache. -->
|
2007-07-09 11:45:30 -04:00
|
|
|
<queryResultWindowSize>50</queryResultWindowSize>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-07-09 11:45:30 -04:00
|
|
|
<!-- Maximum number of documents to cache for any entry in the
|
|
|
|
queryResultCache. -->
|
|
|
|
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
2006-02-11 16:35:33 -05:00
|
|
|
|
|
|
|
<!-- a newSearcher event is fired whenever a new searcher is being prepared
|
|
|
|
and there is a current searcher handling requests (aka registered). -->
|
|
|
|
<!-- QuerySenderListener takes an array of NamedList and executes a
|
|
|
|
local query request for each NamedList in sequence. -->
|
|
|
|
<listener event="newSearcher" class="solr.QuerySenderListener">
|
|
|
|
<arr name="queries">
|
|
|
|
<lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
|
|
|
<lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
2008-03-22 19:27:08 -04:00
|
|
|
<lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
|
2006-02-11 16:35:33 -05:00
|
|
|
</arr>
|
|
|
|
</listener>
|
|
|
|
|
|
|
|
<!-- a firstSearcher event is fired whenever a new searcher is being
|
|
|
|
prepared but there is no current registered searcher to handle
|
|
|
|
requests or to gain autowarming data from. -->
|
|
|
|
<listener event="firstSearcher" class="solr.QuerySenderListener">
|
|
|
|
<arr name="queries">
|
|
|
|
<lst> <str name="q">fast_warm</str> <str name="start">0</str> <str name="rows">10</str> </lst>
|
2008-03-22 19:27:08 -04:00
|
|
|
<lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst>
|
2006-02-11 16:35:33 -05:00
|
|
|
</arr>
|
|
|
|
</listener>
|
|
|
|
|
2006-12-06 14:40:18 -05:00
|
|
|
<!-- If a search request comes in and there is no current registered searcher,
|
|
|
|
then immediately register the still warming searcher and use it. If
|
|
|
|
"false" then all requests will block until the first searcher is done
|
|
|
|
warming. -->
|
|
|
|
<useColdSearcher>false</useColdSearcher>
|
|
|
|
|
2007-01-12 17:00:08 -05:00
|
|
|
<!-- Maximum number of searchers that may be warming in the background
|
|
|
|
concurrently. An error is returned if this limit is exceeded. Recommend
|
|
|
|
1-2 for read-only slaves, higher for masters w/o cache warming. -->
|
2008-09-03 14:27:33 -04:00
|
|
|
<maxWarmingSearchers>2</maxWarmingSearchers>
|
2007-01-12 17:00:08 -05:00
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
</query>
|
|
|
|
|
2007-04-29 16:47:23 -04:00
|
|
|
<!--
|
|
|
|
Let the dispatch filter handler /select?qt=XXX
|
|
|
|
handleSelect=true will use consistent error handling for /select and /update
|
|
|
|
handleSelect=false will use solr1.1 style error formatting
|
|
|
|
-->
|
|
|
|
<requestDispatcher handleSelect="true" >
|
|
|
|
<!--Make sure your system has some authentication before enabling remote streaming! -->
|
2009-02-10 18:21:57 -05:00
|
|
|
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" />
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-02-21 17:44:19 -05:00
|
|
|
<!-- Set HTTP caching related parameters (for proxy caches and clients).
|
|
|
|
|
|
|
|
To get the behaviour of Solr 1.2 (ie: no caching related headers)
|
|
|
|
use the never304="true" option and do not specify a value for
|
|
|
|
<cacheControl>
|
|
|
|
-->
|
|
|
|
<!-- <httpCaching never304="true"> -->
|
|
|
|
<httpCaching lastModifiedFrom="openTime"
|
|
|
|
etagSeed="Solr">
|
|
|
|
<!-- lastModFrom="openTime" is the default, the Last-Modified value
|
|
|
|
(and validation against If-Modified-Since requests) will all be
|
|
|
|
relative to when the current Searcher was opened.
|
|
|
|
You can change it to lastModFrom="dirLastMod" if you want the
|
|
|
|
value to exactly corrispond to when the physical index was last
|
|
|
|
modified.
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-02-21 17:44:19 -05:00
|
|
|
etagSeed="..." is an option you can change to force the ETag
|
|
|
|
header (and validation against If-None-Match requests) to be
|
|
|
|
differnet even if the index has not changed (ie: when making
|
|
|
|
significant changes to your config file)
|
|
|
|
|
|
|
|
lastModifiedFrom and etagSeed are both ignored if you use the
|
|
|
|
never304="true" option.
|
|
|
|
-->
|
|
|
|
<!-- If you include a <cacheControl> directive, it will be used to
|
|
|
|
generate a Cache-Control header, as well as an Expires header
|
|
|
|
if the value contains "max-age="
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-02-21 17:44:19 -05:00
|
|
|
By default, no Cache-Control header is generated.
|
|
|
|
|
|
|
|
You can use the <cacheControl> option even if you have set
|
|
|
|
never304="true"
|
|
|
|
-->
|
|
|
|
<!-- <cacheControl>max-age=30, public</cacheControl> -->
|
|
|
|
</httpCaching>
|
2007-04-29 16:47:23 -04:00
|
|
|
</requestDispatcher>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
|
|
|
|
2006-02-11 16:35:33 -05:00
|
|
|
<!-- requestHandler plugins... incoming queries will be dispatched to the
|
2007-07-03 14:33:38 -04:00
|
|
|
correct handler based on the path or the qt (query type) param.
|
|
|
|
Names starting with a '/' are accessed with the a path equal to the
|
|
|
|
registered name. Names without a leading '/' are accessed with:
|
|
|
|
http://host/app/select?qt=name
|
2007-10-02 10:57:34 -04:00
|
|
|
If no qt is defined, the requestHandler that declares default="true"
|
2007-07-03 14:33:38 -04:00
|
|
|
will be used.
|
2006-02-11 16:35:33 -05:00
|
|
|
-->
|
2008-09-03 14:27:33 -04:00
|
|
|
<requestHandler name="standard" class="solr.SearchHandler" default="true">
|
2006-12-14 08:20:15 -05:00
|
|
|
<!-- default values for query parameters -->
|
2006-08-23 15:34:57 -04:00
|
|
|
<lst name="defaults">
|
2006-12-14 08:20:15 -05:00
|
|
|
<str name="echoParams">explicit</str>
|
2008-09-28 23:37:41 -04:00
|
|
|
<!--
|
2006-08-23 15:34:57 -04:00
|
|
|
<int name="rows">10</int>
|
|
|
|
<str name="fl">*</str>
|
|
|
|
<str name="version">2.1</str>
|
2006-12-14 08:20:15 -05:00
|
|
|
-->
|
|
|
|
</lst>
|
2006-08-23 15:34:57 -04:00
|
|
|
</requestHandler>
|
2006-02-11 16:35:33 -05:00
|
|
|
|
2008-11-25 09:19:14 -05:00
|
|
|
<!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
|
2008-10-21 05:44:43 -04:00
|
|
|
<!--Master config-->
|
|
|
|
<!--
|
|
|
|
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
|
|
|
<lst name="master">
|
|
|
|
<str name="replicateAfter">commit</str>
|
|
|
|
<str name="confFiles">schema.xml,stopwords.txt</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
|
|
|
-->
|
|
|
|
<!-- Slave config-->
|
|
|
|
<!--
|
2008-11-25 09:19:14 -05:00
|
|
|
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
2008-10-21 05:44:43 -04:00
|
|
|
<lst name="slave">
|
2008-11-25 09:19:14 -05:00
|
|
|
<str name="masterUrl">http://localhost:8983/solr/replication</str>
|
2008-10-21 05:44:43 -04:00
|
|
|
<str name="pollInterval">00:00:60</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
|
|
|
-->
|
2007-11-12 14:39:01 -05:00
|
|
|
|
2006-12-06 14:40:18 -05:00
|
|
|
<!-- DisMaxRequestHandler allows easy searching across multiple fields
|
2008-09-03 14:27:33 -04:00
|
|
|
for simple user-entered phrases. It's implementation is now
|
|
|
|
just the standard SearchHandler with a default query type
|
|
|
|
of "dismax".
|
2006-12-06 14:40:18 -05:00
|
|
|
see http://wiki.apache.org/solr/DisMaxRequestHandler
|
2006-05-20 18:17:21 -04:00
|
|
|
-->
|
2008-09-03 14:27:33 -04:00
|
|
|
<requestHandler name="dismax" class="solr.SearchHandler" >
|
2006-09-06 15:29:08 -04:00
|
|
|
<lst name="defaults">
|
2008-09-03 14:27:33 -04:00
|
|
|
<str name="defType">dismax</str>
|
2006-12-14 08:20:15 -05:00
|
|
|
<str name="echoParams">explicit</str>
|
2006-05-20 18:17:21 -04:00
|
|
|
<float name="tie">0.01</float>
|
|
|
|
<str name="qf">
|
|
|
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
|
|
|
</str>
|
|
|
|
<str name="pf">
|
|
|
|
text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
|
|
|
|
</str>
|
|
|
|
<str name="bf">
|
2007-10-02 10:13:46 -04:00
|
|
|
ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
|
2006-05-20 18:17:21 -04:00
|
|
|
</str>
|
|
|
|
<str name="fl">
|
|
|
|
id,name,price,score
|
|
|
|
</str>
|
|
|
|
<str name="mm">
|
|
|
|
2<-1 5<-2 6<90%
|
|
|
|
</str>
|
|
|
|
<int name="ps">100</int>
|
2007-02-21 19:22:10 -05:00
|
|
|
<str name="q.alt">*:*</str>
|
2008-09-28 23:37:41 -04:00
|
|
|
<!-- example highlighter config, enable per-query with hl=true -->
|
2007-10-12 15:32:07 -04:00
|
|
|
<str name="hl.fl">text features name</str>
|
|
|
|
<!-- for this field, we want no fragmenting, just highlighting -->
|
|
|
|
<str name="f.name.hl.fragsize">0</str>
|
|
|
|
<!-- instructs Solr to return the field itself if no query terms are
|
|
|
|
found -->
|
|
|
|
<str name="f.name.hl.alternateField">name</str>
|
|
|
|
<str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
|
2006-09-06 15:29:08 -04:00
|
|
|
</lst>
|
2006-02-11 16:35:33 -05:00
|
|
|
</requestHandler>
|
2006-12-06 14:40:18 -05:00
|
|
|
|
2006-05-20 18:17:21 -04:00
|
|
|
<!-- Note how you can register the same handler multiple times with
|
|
|
|
different names (and different init parameters)
|
|
|
|
-->
|
2008-09-03 14:27:33 -04:00
|
|
|
<requestHandler name="partitioned" class="solr.SearchHandler" >
|
2006-09-12 18:50:06 -04:00
|
|
|
<lst name="defaults">
|
2008-09-03 14:27:33 -04:00
|
|
|
<str name="defType">dismax</str>
|
2006-12-14 08:20:15 -05:00
|
|
|
<str name="echoParams">explicit</str>
|
2006-09-12 18:50:06 -04:00
|
|
|
<str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
|
|
|
|
<str name="mm">2<-1 5<-2 6<90%</str>
|
2006-11-20 20:55:05 -05:00
|
|
|
<!-- This is an example of using Date Math to specify a constantly
|
|
|
|
moving date range in a config...
|
|
|
|
-->
|
|
|
|
<str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
|
2006-09-12 18:50:06 -04:00
|
|
|
</lst>
|
|
|
|
<!-- In addition to defaults, "appends" params can be specified
|
|
|
|
to identify values which should be appended to the list of
|
|
|
|
multi-val params from the query (or the existing "defaults").
|
|
|
|
|
|
|
|
In this example, the param "fq=instock:true" will be appended to
|
|
|
|
any query time fq params the user may specify, as a mechanism for
|
|
|
|
partitioning the index, independent of any user selected filtering
|
|
|
|
that may also be desired (perhaps as a result of faceted searching).
|
|
|
|
|
|
|
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
|
|
|
"appends" values from being used, so don't use this mechanism
|
|
|
|
unless you are sure you always want it.
|
|
|
|
-->
|
|
|
|
<lst name="appends">
|
|
|
|
<str name="fq">inStock:true</str>
|
|
|
|
</lst>
|
|
|
|
<!-- "invariants" are a way of letting the Solr maintainer lock down
|
|
|
|
the options available to Solr clients. Any params values
|
|
|
|
specified here are used regardless of what values may be specified
|
|
|
|
in either the query, the "defaults", or the "appends" params.
|
|
|
|
|
|
|
|
In this example, the facet.field and facet.query params are fixed,
|
|
|
|
limiting the facets clients can use. Faceting is not turned on by
|
|
|
|
default - but if the client does specify facet=true in the request,
|
|
|
|
these are the only facets they will be able to see counts for;
|
|
|
|
regardless of what other facet.field or facet.query params they
|
|
|
|
may specify.
|
|
|
|
|
|
|
|
NOTE: there is *absolutely* nothing a client can do to prevent these
|
|
|
|
"invariants" values from being used, so don't use this mechanism
|
|
|
|
unless you are sure you always want it.
|
|
|
|
-->
|
|
|
|
<lst name="invariants">
|
|
|
|
<str name="facet.field">cat</str>
|
|
|
|
<str name="facet.field">manu_exact</str>
|
|
|
|
<str name="facet.query">price:[* TO 500]</str>
|
|
|
|
<str name="facet.query">price:[500 TO *]</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-03-16 15:28:47 -04:00
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
<!--
|
|
|
|
Search components are registered to SolrCore and used by Search Handlers
|
|
|
|
|
|
|
|
By default, the following components are avaliable:
|
|
|
|
|
|
|
|
<searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
|
|
|
|
<searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
|
|
|
|
<searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
|
|
|
|
<searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
|
2008-10-18 16:19:53 -04:00
|
|
|
<searchComponent name="stats" class="org.apache.solr.handler.component.StatsComponent" />
|
2008-09-03 14:27:33 -04:00
|
|
|
<searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" />
|
2008-10-18 16:19:53 -04:00
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
Default configuration in a requestHandler would look like:
|
|
|
|
<arr name="components">
|
|
|
|
<str>query</str>
|
|
|
|
<str>facet</str>
|
|
|
|
<str>mlt</str>
|
|
|
|
<str>highlight</str>
|
2008-10-18 16:19:53 -04:00
|
|
|
<str>stats</str>
|
2008-09-03 14:27:33 -04:00
|
|
|
<str>debug</str>
|
|
|
|
</arr>
|
2007-03-16 15:28:47 -04:00
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
If you register a searchComponent to one of the standard names, that will be used instead.
|
2008-09-26 16:01:03 -04:00
|
|
|
To insert components before or after the 'standard' components, use:
|
2008-09-03 14:27:33 -04:00
|
|
|
|
|
|
|
<arr name="first-components">
|
|
|
|
<str>myFirstComponentName</str>
|
|
|
|
</arr>
|
|
|
|
|
|
|
|
<arr name="last-components">
|
|
|
|
<str>myLastComponentName</str>
|
|
|
|
</arr>
|
|
|
|
-->
|
2008-06-19 09:46:54 -04:00
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
<!-- The spell check component can return a list of alternative spelling
|
|
|
|
suggestions. -->
|
2008-08-14 02:50:48 -04:00
|
|
|
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
|
2008-06-30 14:03:23 -04:00
|
|
|
|
2008-06-19 09:46:54 -04:00
|
|
|
<str name="queryAnalyzerFieldType">textSpell</str>
|
|
|
|
|
|
|
|
<lst name="spellchecker">
|
|
|
|
<str name="name">default</str>
|
|
|
|
<str name="field">spell</str>
|
2008-06-23 19:59:12 -04:00
|
|
|
<str name="spellcheckIndexDir">./spellchecker1</str>
|
2008-06-19 09:46:54 -04:00
|
|
|
|
|
|
|
</lst>
|
|
|
|
<lst name="spellchecker">
|
|
|
|
<str name="name">jarowinkler</str>
|
|
|
|
<str name="field">spell</str>
|
|
|
|
<!-- Use a different Distance Measure -->
|
|
|
|
<str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
|
2008-06-23 19:59:12 -04:00
|
|
|
<str name="spellcheckIndexDir">./spellchecker2</str>
|
2008-06-19 09:46:54 -04:00
|
|
|
|
|
|
|
</lst>
|
|
|
|
|
2008-06-23 19:59:12 -04:00
|
|
|
<lst name="spellchecker">
|
2008-06-19 09:46:54 -04:00
|
|
|
<str name="classname">solr.FileBasedSpellChecker</str>
|
2008-06-23 19:59:12 -04:00
|
|
|
<str name="name">file</str>
|
2008-06-19 09:46:54 -04:00
|
|
|
<str name="sourceLocation">spellings.txt</str>
|
|
|
|
<str name="characterEncoding">UTF-8</str>
|
2008-08-22 12:57:50 -04:00
|
|
|
<str name="spellcheckIndexDir">./spellcheckerFile</str>
|
2008-06-23 19:59:12 -04:00
|
|
|
</lst>
|
2008-06-19 09:46:54 -04:00
|
|
|
</searchComponent>
|
|
|
|
|
2008-12-10 11:01:14 -05:00
|
|
|
<!-- A request handler utilizing the spellcheck component.
|
|
|
|
################################################################################################
|
|
|
|
NOTE: This is purely as an example. The whole purpose of the SpellCheckComponent is to hook it into
|
|
|
|
the request handler that handles (i.e. the standard or dismax SearchHandler)
|
|
|
|
queries such that a separate request is not needed to get suggestions.
|
|
|
|
|
|
|
|
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
|
|
|
################################################################################################
|
|
|
|
-->
|
2008-08-14 02:50:48 -04:00
|
|
|
<requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
|
2008-06-30 14:03:23 -04:00
|
|
|
<lst name="defaults">
|
|
|
|
<!-- omp = Only More Popular -->
|
|
|
|
<str name="spellcheck.onlyMorePopular">false</str>
|
|
|
|
<!-- exr = Extended Results -->
|
|
|
|
<str name="spellcheck.extendedResults">false</str>
|
|
|
|
<!-- The number of suggestions to return -->
|
|
|
|
<str name="spellcheck.count">1</str>
|
|
|
|
</lst>
|
2008-06-19 09:46:54 -04:00
|
|
|
<arr name="last-components">
|
|
|
|
<str>spellcheck</str>
|
|
|
|
</arr>
|
|
|
|
</requestHandler>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-10-23 11:49:18 -04:00
|
|
|
<searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
|
|
|
|
<!-- A Req Handler for working with the tvComponent. This is purely as an example.
|
|
|
|
You will likely want to add the component to your already specified request handlers. -->
|
|
|
|
<requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
|
|
|
|
<lst name="defaults">
|
|
|
|
<bool name="tv">true</bool>
|
|
|
|
</lst>
|
|
|
|
<arr name="last-components">
|
|
|
|
<str>tvComponent</str>
|
|
|
|
</arr>
|
|
|
|
</requestHandler>
|
|
|
|
|
2009-07-14 11:53:05 -04:00
|
|
|
<requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" startup="lazy">
|
2008-12-12 10:18:24 -05:00
|
|
|
<lst name="defaults">
|
2009-07-14 11:53:05 -04:00
|
|
|
<str name="uprefix">ignored_</str>
|
|
|
|
<str name="map.content">text</str>
|
2008-12-12 10:18:24 -05:00
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
|
|
|
|
|
|
|
|
2009-05-09 09:01:29 -04:00
|
|
|
<!-- A component to return terms and document frequency of those terms.
|
|
|
|
This component does not yet support distributed search. -->
|
|
|
|
<searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
|
2008-10-23 11:49:18 -04:00
|
|
|
|
2009-05-09 09:01:29 -04:00
|
|
|
<requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
|
|
|
|
<lst name="defaults">
|
|
|
|
<bool name="terms">true</bool>
|
|
|
|
</lst>
|
2008-11-28 08:30:02 -05:00
|
|
|
<arr name="components">
|
2009-05-09 09:01:29 -04:00
|
|
|
<str>termsComponent</str>
|
2008-11-28 08:30:02 -05:00
|
|
|
</arr>
|
|
|
|
</requestHandler>
|
|
|
|
|
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
<!-- a search component that enables you to configure the top results for
|
|
|
|
a given query regardless of the normal lucene scoring.-->
|
2008-08-14 02:50:48 -04:00
|
|
|
<searchComponent name="elevator" class="solr.QueryElevationComponent" >
|
2008-01-18 00:30:21 -05:00
|
|
|
<!-- pick a fieldType to analyze queries -->
|
|
|
|
<str name="queryFieldType">string</str>
|
|
|
|
<str name="config-file">elevate.xml</str>
|
|
|
|
</searchComponent>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-09-03 14:27:33 -04:00
|
|
|
<!-- a request handler utilizing the elevator component -->
|
2008-08-14 02:50:48 -04:00
|
|
|
<requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
|
2008-01-18 00:30:21 -05:00
|
|
|
<lst name="defaults">
|
|
|
|
<str name="echoParams">explicit</str>
|
|
|
|
</lst>
|
|
|
|
<arr name="last-components">
|
|
|
|
<str>elevator</str>
|
|
|
|
</arr>
|
|
|
|
</requestHandler>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-01-18 00:30:21 -05:00
|
|
|
|
2007-04-28 13:47:35 -04:00
|
|
|
<!-- Update request handler.
|
2008-09-28 23:37:41 -04:00
|
|
|
|
|
|
|
Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
|
2007-04-28 13:47:35 -04:00
|
|
|
the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
|
|
|
|
The response format differs from solr1.1 formatting and returns a standard error code.
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-04-28 13:47:35 -04:00
|
|
|
To enable solr1.1 behavior, remove the /update handler or change its path
|
2007-01-29 15:33:21 -05:00
|
|
|
-->
|
2008-07-25 20:20:44 -04:00
|
|
|
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
|
2007-01-29 15:33:21 -05:00
|
|
|
|
2009-01-15 15:20:59 -05:00
|
|
|
|
|
|
|
<requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
|
|
|
|
|
2008-02-19 23:06:33 -05:00
|
|
|
<!--
|
2009-04-22 04:53:28 -04:00
|
|
|
Analysis request handler. Since Solr 1.3. Use to return how a document is analyzed. Useful
|
|
|
|
for debugging and as a token server for other types of applications.
|
|
|
|
|
|
|
|
This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
|
|
|
|
|
|
|
|
<requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
|
|
|
|
(single) content stream with the following format:
|
|
|
|
|
|
|
|
<docs>
|
|
|
|
<doc>
|
|
|
|
<field name="id">1</field>
|
|
|
|
<field name="name">The Name</field>
|
|
|
|
<field name="text">The Text Value</field>
|
|
|
|
<doc>
|
|
|
|
<doc>...</doc>
|
|
|
|
<doc>...</doc>
|
|
|
|
...
|
|
|
|
</docs>
|
|
|
|
|
|
|
|
Note: Each document must contain a field which serves as the unique key. This key is used in the returned
|
|
|
|
response to assoicate an analysis breakdown to the analyzed document.
|
|
|
|
|
|
|
|
Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
|
|
|
|
sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
|
|
|
|
supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
|
|
|
|
tokens will be marked as a "match".
|
|
|
|
-->
|
|
|
|
<requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler" />
|
|
|
|
|
|
|
|
<!--
|
|
|
|
RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
|
|
|
|
to specify multiple field types and field names in the same request and outputs index-time and
|
|
|
|
query-time analysis for each of them.
|
|
|
|
|
|
|
|
Request parameters are:
|
|
|
|
analysis.fieldname - The field name whose analyzers are to be used
|
|
|
|
analysis.fieldtype - The field type whose analyzers are to be used
|
|
|
|
analysis.fieldvalue - The text for index-time analysis
|
|
|
|
q (or analysis.q) - The text for query time analysis
|
|
|
|
analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
|
|
|
|
tokens of the field value analysis will be marked as "matched" for every
|
|
|
|
token that is produces by the query analysis
|
2008-02-19 23:06:33 -05:00
|
|
|
-->
|
2009-04-22 04:53:28 -04:00
|
|
|
<requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler" />
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2008-02-19 23:06:33 -05:00
|
|
|
|
2007-03-30 12:59:58 -04:00
|
|
|
<!-- CSV update handler, loaded on demand -->
|
2007-04-28 13:47:35 -04:00
|
|
|
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
|
|
|
|
|
2007-03-30 12:59:58 -04:00
|
|
|
|
2007-12-29 12:40:41 -05:00
|
|
|
<!--
|
|
|
|
Admin Handlers - This will register all the standard admin RequestHandlers. Adding
|
2008-09-17 14:07:01 -04:00
|
|
|
this single handler is equivalent to registering:
|
2007-12-29 12:40:41 -05:00
|
|
|
|
2007-04-27 01:56:07 -04:00
|
|
|
<requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
|
|
|
<requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
|
|
|
<requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
|
|
|
<requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
|
|
|
<requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
2008-01-02 12:15:30 -05:00
|
|
|
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
2007-04-27 01:56:07 -04:00
|
|
|
|
2008-01-02 12:15:30 -05:00
|
|
|
If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
|
|
|
<requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
|
|
|
<lst name="invariants">
|
|
|
|
<str name="hidden">synonyms.txt</str>
|
|
|
|
<str name="hidden">anotherfile.txt</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
2007-12-29 12:40:41 -05:00
|
|
|
-->
|
|
|
|
<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-11-09 14:24:18 -05:00
|
|
|
<!-- ping/healthcheck -->
|
|
|
|
<requestHandler name="/admin/ping" class="PingRequestHandler">
|
|
|
|
<lst name="defaults">
|
|
|
|
<str name="qt">standard</str>
|
|
|
|
<str name="q">solrpingquery</str>
|
|
|
|
<str name="echoParams">all</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-04-28 13:47:35 -04:00
|
|
|
<!-- Echo the request contents back to the client -->
|
|
|
|
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
|
|
|
<lst name="defaults">
|
|
|
|
<str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
|
|
|
|
<str name="echoHandler">true</str>
|
|
|
|
</lst>
|
|
|
|
</requestHandler>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-07-03 02:14:07 -04:00
|
|
|
<highlighting>
|
|
|
|
<!-- Configure the standard fragmenter -->
|
2007-07-20 01:34:23 -04:00
|
|
|
<!-- This could most likely be commented out in the "default" case -->
|
2007-07-03 02:14:07 -04:00
|
|
|
<fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
|
|
|
|
<lst name="defaults">
|
|
|
|
<int name="hl.fragsize">100</int>
|
|
|
|
</lst>
|
|
|
|
</fragmenter>
|
2007-07-20 01:34:23 -04:00
|
|
|
|
|
|
|
<!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
|
2007-07-03 02:14:07 -04:00
|
|
|
<fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
|
|
|
|
<lst name="defaults">
|
2007-07-20 01:34:23 -04:00
|
|
|
<!-- slightly smaller fragsizes work better because of slop -->
|
|
|
|
<int name="hl.fragsize">70</int>
|
|
|
|
<!-- allow 50% slop on fragment sizes -->
|
2008-09-28 23:37:41 -04:00
|
|
|
<float name="hl.regex.slop">0.5</float>
|
2007-07-20 01:34:23 -04:00
|
|
|
<!-- a basic sentence pattern -->
|
|
|
|
<str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
2007-07-03 02:14:07 -04:00
|
|
|
</lst>
|
|
|
|
</fragmenter>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2007-07-03 02:14:07 -04:00
|
|
|
<!-- Configure the standard formatter -->
|
|
|
|
<formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
|
|
|
|
<lst name="defaults">
|
|
|
|
<str name="hl.simple.pre"><![CDATA[<em>]]></str>
|
|
|
|
<str name="hl.simple.post"><![CDATA[</em>]]></str>
|
|
|
|
</lst>
|
|
|
|
</formatter>
|
|
|
|
</highlighting>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2009-02-10 18:21:57 -05:00
|
|
|
<!-- An example dedup update processor that creates the "id" field on the fly
|
|
|
|
based on the hash code of some other fields. This example has overwriteDupes
|
|
|
|
set to false since we are using the id field as the signatureField and Solr
|
|
|
|
will maintain uniqueness based on that anyway. -->
|
|
|
|
<!--
|
|
|
|
<updateRequestProcessorChain name="dedupe">
|
|
|
|
<processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
|
|
|
|
<bool name="enabled">true</bool>
|
|
|
|
<str name="signatureField">id</str>
|
|
|
|
<bool name="overwriteDupes">false</bool>
|
|
|
|
<str name="fields">name,features,cat</str>
|
|
|
|
<str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
|
|
|
|
</processor>
|
|
|
|
<processor class="solr.LogUpdateProcessorFactory" />
|
|
|
|
<processor class="solr.RunUpdateProcessorFactory" />
|
|
|
|
</updateRequestProcessorChain>
|
|
|
|
-->
|
|
|
|
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2006-05-26 01:44:02 -04:00
|
|
|
<!-- queryResponseWriter plugins... query responses will be written using the
|
|
|
|
writer specified by the 'wt' request parameter matching the name of a registered
|
|
|
|
writer.
|
2007-07-03 14:33:38 -04:00
|
|
|
The "default" writer is the default and will be used if 'wt' is not specified
|
2006-08-02 10:21:09 -04:00
|
|
|
in the request. XMLResponseWriter will be used if nothing is specified here.
|
2006-07-19 18:00:28 -04:00
|
|
|
The json, python, and ruby writers are also available by default.
|
2006-05-26 01:44:02 -04:00
|
|
|
|
2007-07-03 14:33:38 -04:00
|
|
|
<queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
|
2006-07-18 14:27:20 -04:00
|
|
|
<queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
|
|
|
|
<queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
|
|
|
|
<queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
|
2007-08-10 23:32:02 -04:00
|
|
|
<queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
|
|
|
|
<queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
|
2006-07-18 14:27:20 -04:00
|
|
|
|
2006-07-19 18:00:28 -04:00
|
|
|
<queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
|
|
|
|
-->
|
|
|
|
|
2006-12-06 14:40:18 -05:00
|
|
|
<!-- XSLT response writer transforms the XML output by any xslt file found
|
|
|
|
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
|
|
|
every xsltCacheLifetimeSeconds.
|
2006-10-18 13:53:08 -04:00
|
|
|
-->
|
2006-12-06 14:40:18 -05:00
|
|
|
<queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
|
|
|
|
<int name="xsltCacheLifetimeSeconds">5</int>
|
2008-09-28 23:37:41 -04:00
|
|
|
</queryResponseWriter>
|
2008-09-03 14:27:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
<!-- example of registering a query parser
|
|
|
|
<queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- example of registering a custom function parser
|
|
|
|
<valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
|
|
|
|
-->
|
2008-09-28 23:37:41 -04:00
|
|
|
|
|
|
|
<!-- config for the admin interface -->
|
2006-02-11 16:35:33 -05:00
|
|
|
<admin>
|
|
|
|
<defaultQuery>solr</defaultQuery>
|
2008-09-28 23:37:41 -04:00
|
|
|
|
2006-02-23 22:51:40 -05:00
|
|
|
<!-- configure a healthcheck file for servers behind a loadbalancer
|
|
|
|
<healthcheck type="file">server-enabled</healthcheck>
|
|
|
|
-->
|
2006-02-11 16:35:33 -05:00
|
|
|
</admin>
|
|
|
|
|
|
|
|
</config>
|