mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
NEW Ensure commits are visible to seachers (fixes #274)
This is required in situations where autoCommit.openSearcher is set to "false", and you don't want to rely on core restarts to make committed index updates available to new searches. It's already configured like this in the Common Web Platform environments, so this change will mainly affect other environments (such as Silverstripe Platform). To opt out of this new behaviour, set up a custom solrconfig.xml. More details in https://github.com/silverstripe/silverstripe-fulltextsearch/issues/274
This commit is contained in:
parent
4be5de76a5
commit
8876a47f0d
@ -16,9 +16,9 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
For more details about configurations options that may appear in
|
For more details about configurations options that may appear in
|
||||||
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
this file, see http://wiki.apache.org/solr/SolrConfigXml.
|
||||||
-->
|
-->
|
||||||
<config>
|
<config>
|
||||||
<!-- In all configuration below, a prefix of "solr." for class names
|
<!-- In all configuration below, a prefix of "solr." for class names
|
||||||
@ -46,19 +46,19 @@
|
|||||||
instanceDir.
|
instanceDir.
|
||||||
|
|
||||||
Please note that <lib/> directives are processed in the order
|
Please note that <lib/> directives are processed in the order
|
||||||
that they appear in your solrconfig.xml file, and are "stacked"
|
that they appear in your solrconfig.xml file, and are "stacked"
|
||||||
on top of each other when building a ClassLoader - so if you have
|
on top of each other when building a ClassLoader - so if you have
|
||||||
plugin jars with dependencies on other jars, the "lower level"
|
plugin jars with dependencies on other jars, the "lower level"
|
||||||
dependency jars should be loaded first.
|
dependency jars should be loaded first.
|
||||||
|
|
||||||
If a "./lib" directory exists in your instanceDir, all files
|
If a "./lib" directory exists in your instanceDir, all files
|
||||||
found in it are included as if you had used the following
|
found in it are included as if you had used the following
|
||||||
syntax...
|
syntax...
|
||||||
|
|
||||||
<lib dir="./lib" />
|
<lib dir="./lib" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- A 'dir' option by itself adds any files found in the directory
|
<!-- A 'dir' option by itself adds any files found in the directory
|
||||||
to the classpath, this is useful for including all jars in a
|
to the classpath, this is useful for including all jars in a
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
@ -69,11 +69,11 @@
|
|||||||
If a 'dir' option (with or without a regex) is used and nothing
|
If a 'dir' option (with or without a regex) is used and nothing
|
||||||
is found that matches, a warning will be logged.
|
is found that matches, a warning will be logged.
|
||||||
|
|
||||||
The examples below can be used to load some solr-contribs along
|
The examples below can be used to load some solr-contribs along
|
||||||
with their external dependencies.
|
with their external dependencies.
|
||||||
-->
|
-->
|
||||||
<lib dir="./lib" />
|
<lib dir="./lib" />
|
||||||
|
|
||||||
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
|
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
|
||||||
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
|
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
|
||||||
|
|
||||||
@ -86,14 +86,14 @@
|
|||||||
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
|
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
|
||||||
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
|
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
|
||||||
|
|
||||||
<!-- an exact 'path' can be used instead of a 'dir' to specify a
|
<!-- an exact 'path' can be used instead of a 'dir' to specify a
|
||||||
specific jar file. This will cause a serious error to be logged
|
specific jar file. This will cause a serious error to be logged
|
||||||
if it can't be loaded.
|
if it can't be loaded.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<lib path="../a-jar-that-does-not-exist.jar" />
|
<lib path="../a-jar-that-does-not-exist.jar" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Data Directory
|
<!-- Data Directory
|
||||||
|
|
||||||
Used to specify an alternate directory to hold all index data
|
Used to specify an alternate directory to hold all index data
|
||||||
@ -105,7 +105,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- The DirectoryFactory to use for indexes.
|
<!-- The DirectoryFactory to use for indexes.
|
||||||
|
|
||||||
solr.StandardDirectoryFactory is filesystem
|
solr.StandardDirectoryFactory is filesystem
|
||||||
based and tries to pick the best implementation for the current
|
based and tries to pick the best implementation for the current
|
||||||
JVM and platform. solr.NRTCachingDirectoryFactory, the default,
|
JVM and platform. solr.NRTCachingDirectoryFactory, the default,
|
||||||
@ -118,8 +118,8 @@
|
|||||||
solr.RAMDirectoryFactory is memory based, not
|
solr.RAMDirectoryFactory is memory based, not
|
||||||
persistent, and doesn't work with replication.
|
persistent, and doesn't work with replication.
|
||||||
-->
|
-->
|
||||||
<directoryFactory name="DirectoryFactory"
|
<directoryFactory name="DirectoryFactory"
|
||||||
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
|
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
|
||||||
|
|
||||||
<!-- The CodecFactory for defining the format of the inverted index.
|
<!-- The CodecFactory for defining the format of the inverted index.
|
||||||
The default implementation is SchemaCodecFactory, which is the official Lucene
|
The default implementation is SchemaCodecFactory, which is the official Lucene
|
||||||
@ -133,24 +133,24 @@
|
|||||||
<codecFactory class="solr.SchemaCodecFactory"/>
|
<codecFactory class="solr.SchemaCodecFactory"/>
|
||||||
|
|
||||||
<!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
|
<!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
|
||||||
|
|
||||||
<schemaFactory class="ManagedIndexSchemaFactory">
|
<schemaFactory class="ManagedIndexSchemaFactory">
|
||||||
<bool name="mutable">true</bool>
|
<bool name="mutable">true</bool>
|
||||||
<str name="managedSchemaResourceName">managed-schema</str>
|
<str name="managedSchemaResourceName">managed-schema</str>
|
||||||
</schemaFactory>
|
</schemaFactory>
|
||||||
|
|
||||||
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
|
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
|
||||||
he resource named in 'managedSchemaResourceName', rather than from schema.xml.
|
he resource named in 'managedSchemaResourceName', rather than from schema.xml.
|
||||||
Note that the managed schema resource CANNOT be named schema.xml. If the managed
|
Note that the managed schema resource CANNOT be named schema.xml. If the managed
|
||||||
schema does not exist, Solr will create it after reading schema.xml, then rename
|
schema does not exist, Solr will create it after reading schema.xml, then rename
|
||||||
'schema.xml' to 'schema.xml.bak'.
|
'schema.xml' to 'schema.xml.bak'.
|
||||||
|
|
||||||
Do NOT hand edit the managed schema - external modifications will be ignored and
|
Do NOT hand edit the managed schema - external modifications will be ignored and
|
||||||
overwritten as a result of schema modification REST API calls.
|
overwritten as a result of schema modification REST API calls.
|
||||||
|
|
||||||
When ManagedIndexSchemaFactory is specified with mutable = true, schema
|
When ManagedIndexSchemaFactory is specified with mutable = true, schema
|
||||||
modification REST API calls will be allowed; otherwise, error responses will be
|
modification REST API calls will be allowed; otherwise, error responses will be
|
||||||
sent back for these requests.
|
sent back for these requests.
|
||||||
-->
|
-->
|
||||||
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
<schemaFactory class="ClassicIndexSchemaFactory"/>
|
||||||
|
|
||||||
@ -158,12 +158,12 @@
|
|||||||
Index Config - These settings control low-level behavior of indexing
|
Index Config - These settings control low-level behavior of indexing
|
||||||
Most example settings here show the default value, but are commented
|
Most example settings here show the default value, but are commented
|
||||||
out, to more easily see where customizations have been made.
|
out, to more easily see where customizations have been made.
|
||||||
|
|
||||||
Note: This replaces <indexDefaults> and <mainIndex> from older versions
|
Note: This replaces <indexDefaults> and <mainIndex> from older versions
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
|
||||||
<indexConfig>
|
<indexConfig>
|
||||||
<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
|
<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
|
||||||
LimitTokenCountFilterFactory in your fieldType definition. E.g.
|
LimitTokenCountFilterFactory in your fieldType definition. E.g.
|
||||||
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
|
<filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
|
||||||
-->
|
-->
|
||||||
<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
|
<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
|
||||||
@ -175,8 +175,8 @@
|
|||||||
Default in Solr/Lucene is 8. -->
|
Default in Solr/Lucene is 8. -->
|
||||||
<!-- <maxIndexingThreads>8</maxIndexingThreads> -->
|
<!-- <maxIndexingThreads>8</maxIndexingThreads> -->
|
||||||
|
|
||||||
<!-- Expert: Enabling compound file will use less files for the index,
|
<!-- Expert: Enabling compound file will use less files for the index,
|
||||||
using fewer file descriptors on the expense of performance decrease.
|
using fewer file descriptors on the expense of performance decrease.
|
||||||
Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
|
Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
|
||||||
<!-- <useCompoundFile>false</useCompoundFile> -->
|
<!-- <useCompoundFile>false</useCompoundFile> -->
|
||||||
|
|
||||||
@ -191,7 +191,7 @@
|
|||||||
<!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
|
<!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
|
||||||
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
|
<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
|
||||||
|
|
||||||
<!-- Expert: Merge Policy
|
<!-- Expert: Merge Policy
|
||||||
The Merge Policy in Lucene controls how merging of segments is done.
|
The Merge Policy in Lucene controls how merging of segments is done.
|
||||||
The default since Solr/Lucene 3.3 is TieredMergePolicy.
|
The default since Solr/Lucene 3.3 is TieredMergePolicy.
|
||||||
The default since Lucene 2.3 was the LogByteSizeMergePolicy,
|
The default since Lucene 2.3 was the LogByteSizeMergePolicy,
|
||||||
@ -203,7 +203,7 @@
|
|||||||
<int name="segmentsPerTier">10</int>
|
<int name="segmentsPerTier">10</int>
|
||||||
</mergePolicy>
|
</mergePolicy>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Merge Factor
|
<!-- Merge Factor
|
||||||
The merge factor controls how many segments will get merged at a time.
|
The merge factor controls how many segments will get merged at a time.
|
||||||
For TieredMergePolicy, mergeFactor is a convenience parameter which
|
For TieredMergePolicy, mergeFactor is a convenience parameter which
|
||||||
@ -212,7 +212,7 @@
|
|||||||
will be allowed before they are merged into one.
|
will be allowed before they are merged into one.
|
||||||
Default is 10 for both merge policies.
|
Default is 10 for both merge policies.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<mergeFactor>10</mergeFactor>
|
<mergeFactor>10</mergeFactor>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -222,15 +222,15 @@
|
|||||||
can perform merges in the background using separate threads.
|
can perform merges in the background using separate threads.
|
||||||
The SerialMergeScheduler (Lucene 2.2 default) does not.
|
The SerialMergeScheduler (Lucene 2.2 default) does not.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- LockFactory
|
<!-- LockFactory
|
||||||
|
|
||||||
This option specifies which Lucene LockFactory implementation
|
This option specifies which Lucene LockFactory implementation
|
||||||
to use.
|
to use.
|
||||||
|
|
||||||
single = SingleInstanceLockFactory - suggested for a
|
single = SingleInstanceLockFactory - suggested for a
|
||||||
read-only index or when there is no possibility of
|
read-only index or when there is no possibility of
|
||||||
another process trying to modify the index.
|
another process trying to modify the index.
|
||||||
@ -259,7 +259,7 @@
|
|||||||
<!--
|
<!--
|
||||||
<unlockOnStartup>false</unlockOnStartup>
|
<unlockOnStartup>false</unlockOnStartup>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Expert: Controls how often Lucene loads terms into memory
|
<!-- Expert: Controls how often Lucene loads terms into memory
|
||||||
Default is 128 and is likely good for most everyone.
|
Default is 128 and is likely good for most everyone.
|
||||||
-->
|
-->
|
||||||
@ -268,7 +268,7 @@
|
|||||||
<!-- If true, IndexReaders will be reopened (often more efficient)
|
<!-- If true, IndexReaders will be reopened (often more efficient)
|
||||||
instead of closed and then opened. Default: true
|
instead of closed and then opened. Default: true
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<reopenReaders>true</reopenReaders>
|
<reopenReaders>true</reopenReaders>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -279,11 +279,11 @@
|
|||||||
The default Solr IndexDeletionPolicy implementation supports
|
The default Solr IndexDeletionPolicy implementation supports
|
||||||
deleting index commit points on number of commits, age of
|
deleting index commit points on number of commits, age of
|
||||||
commit point and optimized status.
|
commit point and optimized status.
|
||||||
|
|
||||||
The latest commit point should always be preserved regardless
|
The latest commit point should always be preserved regardless
|
||||||
of the criteria.
|
of the criteria.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<deletionPolicy class="solr.SolrDeletionPolicy">
|
<deletionPolicy class="solr.SolrDeletionPolicy">
|
||||||
-->
|
-->
|
||||||
<!-- The number of commit points to be kept -->
|
<!-- The number of commit points to be kept -->
|
||||||
@ -298,12 +298,12 @@
|
|||||||
<str name="maxCommitAge">30MINUTES</str>
|
<str name="maxCommitAge">30MINUTES</str>
|
||||||
<str name="maxCommitAge">1DAY</str>
|
<str name="maxCommitAge">1DAY</str>
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
</deletionPolicy>
|
</deletionPolicy>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Lucene Infostream
|
<!-- Lucene Infostream
|
||||||
|
|
||||||
To aid in advanced debugging, Lucene provides an "InfoStream"
|
To aid in advanced debugging, Lucene provides an "InfoStream"
|
||||||
of detailed information when indexing.
|
of detailed information when indexing.
|
||||||
|
|
||||||
@ -316,7 +316,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- JMX
|
<!-- JMX
|
||||||
|
|
||||||
This example enables JMX if and only if an existing MBeanServer
|
This example enables JMX if and only if an existing MBeanServer
|
||||||
is found, use this if you want to configure JMX through JVM
|
is found, use this if you want to configure JMX through JVM
|
||||||
parameters. Remove this to disable exposing Solr configuration
|
parameters. Remove this to disable exposing Solr configuration
|
||||||
@ -326,7 +326,7 @@
|
|||||||
-->
|
-->
|
||||||
<jmx />
|
<jmx />
|
||||||
<!-- If you want to connect to a particular server, specify the
|
<!-- If you want to connect to a particular server, specify the
|
||||||
agentId
|
agentId
|
||||||
-->
|
-->
|
||||||
<!-- <jmx agentId="myAgent" /> -->
|
<!-- <jmx agentId="myAgent" /> -->
|
||||||
<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
|
<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
|
||||||
@ -341,16 +341,16 @@
|
|||||||
uncommitted changes to the index, so use of a hard autoCommit
|
uncommitted changes to the index, so use of a hard autoCommit
|
||||||
is recommended (see below).
|
is recommended (see below).
|
||||||
"dir" - the target directory for transaction logs, defaults to the
|
"dir" - the target directory for transaction logs, defaults to the
|
||||||
solr data directory. -->
|
solr data directory. -->
|
||||||
<updateLog>
|
<updateLog>
|
||||||
<str name="dir">${solr.ulog.dir:}</str>
|
<str name="dir">${solr.ulog.dir:}</str>
|
||||||
</updateLog>
|
</updateLog>
|
||||||
|
|
||||||
<!-- AutoCommit
|
<!-- AutoCommit
|
||||||
|
|
||||||
Perform a hard commit automatically under certain conditions.
|
Perform a hard commit automatically under certain conditions.
|
||||||
Instead of enabling autoCommit, consider using "commitWithin"
|
Instead of enabling autoCommit, consider using "commitWithin"
|
||||||
when adding documents.
|
when adding documents.
|
||||||
|
|
||||||
http://wiki.apache.org/solr/UpdateXmlMessages
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
||||||
|
|
||||||
@ -359,7 +359,7 @@
|
|||||||
|
|
||||||
maxTime - Maximum amount of time in ms that is allowed to pass
|
maxTime - Maximum amount of time in ms that is allowed to pass
|
||||||
since a document was added before automatically
|
since a document was added before automatically
|
||||||
triggering a new commit.
|
triggering a new commit.
|
||||||
openSearcher - if false, the commit causes recent index changes
|
openSearcher - if false, the commit causes recent index changes
|
||||||
to be flushed to stable storage, but does not cause a new
|
to be flushed to stable storage, but does not cause a new
|
||||||
searcher to be opened to make those changes visible.
|
searcher to be opened to make those changes visible.
|
||||||
@ -367,9 +367,9 @@
|
|||||||
If the updateLog is enabled, then it's highly recommended to
|
If the updateLog is enabled, then it's highly recommended to
|
||||||
have some sort of hard autoCommit to limit the log size.
|
have some sort of hard autoCommit to limit the log size.
|
||||||
-->
|
-->
|
||||||
<autoCommit>
|
<autoCommit>
|
||||||
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
|
<maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
|
||||||
<openSearcher>false</openSearcher>
|
<openSearcher>false</openSearcher>
|
||||||
</autoCommit>
|
</autoCommit>
|
||||||
|
|
||||||
<!-- softAutoCommit is like autoCommit except it causes a
|
<!-- softAutoCommit is like autoCommit except it causes a
|
||||||
@ -378,12 +378,12 @@
|
|||||||
faster and more near-realtime friendly than a hard commit.
|
faster and more near-realtime friendly than a hard commit.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<autoSoftCommit>
|
<autoSoftCommit>
|
||||||
<maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
|
<maxTime>${solr.autoSoftCommit.maxTime:60000}</maxTime>
|
||||||
</autoSoftCommit>
|
</autoSoftCommit>
|
||||||
|
|
||||||
<!-- Update Related Event Listeners
|
<!-- Update Related Event Listeners
|
||||||
|
|
||||||
Various IndexWriter related events can trigger Listeners to
|
Various IndexWriter related events can trigger Listeners to
|
||||||
take actions.
|
take actions.
|
||||||
|
|
||||||
@ -392,10 +392,10 @@
|
|||||||
-->
|
-->
|
||||||
<!-- The RunExecutableListener executes an external command from a
|
<!-- The RunExecutableListener executes an external command from a
|
||||||
hook such as postCommit or postOptimize.
|
hook such as postCommit or postOptimize.
|
||||||
|
|
||||||
exe - the name of the executable to run
|
exe - the name of the executable to run
|
||||||
dir - dir to use as the current working directory. (default=".")
|
dir - dir to use as the current working directory. (default=".")
|
||||||
wait - the calling thread waits until the executable returns.
|
wait - the calling thread waits until the executable returns.
|
||||||
(default="true")
|
(default="true")
|
||||||
args - the arguments to pass to the program. (default is none)
|
args - the arguments to pass to the program. (default is none)
|
||||||
env - environment variables to set. (default is none)
|
env - environment variables to set. (default is none)
|
||||||
@ -415,7 +415,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
</updateHandler>
|
</updateHandler>
|
||||||
|
|
||||||
<!-- IndexReaderFactory
|
<!-- IndexReaderFactory
|
||||||
|
|
||||||
Use the following format to specify a custom IndexReaderFactory,
|
Use the following format to specify a custom IndexReaderFactory,
|
||||||
@ -447,7 +447,7 @@
|
|||||||
be specified.
|
be specified.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<indexReaderFactory name="IndexReaderFactory"
|
<indexReaderFactory name="IndexReaderFactory"
|
||||||
class="solr.StandardIndexReaderFactory">
|
class="solr.StandardIndexReaderFactory">
|
||||||
<int name="setTermIndexDivisor">12</int>
|
<int name="setTermIndexDivisor">12</int>
|
||||||
</indexReaderFactory >
|
</indexReaderFactory >
|
||||||
@ -463,12 +463,12 @@
|
|||||||
is thrown if exceeded.
|
is thrown if exceeded.
|
||||||
|
|
||||||
** WARNING **
|
** WARNING **
|
||||||
|
|
||||||
This option actually modifies a global Lucene property that
|
This option actually modifies a global Lucene property that
|
||||||
will affect all SolrCores. If multiple solrconfig.xml files
|
will affect all SolrCores. If multiple solrconfig.xml files
|
||||||
disagree on this property, the value at any given moment will
|
disagree on this property, the value at any given moment will
|
||||||
be based on the last SolrCore to be initialized.
|
be based on the last SolrCore to be initialized.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<maxBooleanClauses>1024</maxBooleanClauses>
|
<maxBooleanClauses>1024</maxBooleanClauses>
|
||||||
|
|
||||||
@ -477,7 +477,7 @@
|
|||||||
|
|
||||||
There are two implementations of cache available for Solr,
|
There are two implementations of cache available for Solr,
|
||||||
LRUCache, based on a synchronized LinkedHashMap, and
|
LRUCache, based on a synchronized LinkedHashMap, and
|
||||||
FastLRUCache, based on a ConcurrentHashMap.
|
FastLRUCache, based on a ConcurrentHashMap.
|
||||||
|
|
||||||
FastLRUCache has faster gets and slower puts in single
|
FastLRUCache has faster gets and slower puts in single
|
||||||
threaded operation and thus is generally faster than LRUCache
|
threaded operation and thus is generally faster than LRUCache
|
||||||
@ -502,7 +502,7 @@
|
|||||||
initialSize - the initial capacity (number of entries) of
|
initialSize - the initial capacity (number of entries) of
|
||||||
the cache. (see java.util.HashMap)
|
the cache. (see java.util.HashMap)
|
||||||
autowarmCount - the number of entries to prepopulate from
|
autowarmCount - the number of entries to prepopulate from
|
||||||
and old cache.
|
and old cache.
|
||||||
-->
|
-->
|
||||||
<filterCache class="solr.FastLRUCache"
|
<filterCache class="solr.FastLRUCache"
|
||||||
size="512"
|
size="512"
|
||||||
@ -510,28 +510,28 @@
|
|||||||
autowarmCount="0"/>
|
autowarmCount="0"/>
|
||||||
|
|
||||||
<!-- Query Result Cache
|
<!-- Query Result Cache
|
||||||
|
|
||||||
Caches results of searches - ordered lists of document ids
|
Caches results of searches - ordered lists of document ids
|
||||||
(DocList) based on a query, a sort, and the range of documents requested.
|
(DocList) based on a query, a sort, and the range of documents requested.
|
||||||
-->
|
-->
|
||||||
<queryResultCache class="solr.LRUCache"
|
<queryResultCache class="solr.LRUCache"
|
||||||
size="512"
|
size="512"
|
||||||
initialSize="512"
|
initialSize="512"
|
||||||
autowarmCount="0"/>
|
autowarmCount="0"/>
|
||||||
|
|
||||||
<!-- Document Cache
|
<!-- Document Cache
|
||||||
|
|
||||||
Caches Lucene Document objects (the stored fields for each
|
Caches Lucene Document objects (the stored fields for each
|
||||||
document). Since Lucene internal document ids are transient,
|
document). Since Lucene internal document ids are transient,
|
||||||
this cache will not be autowarmed.
|
this cache will not be autowarmed.
|
||||||
-->
|
-->
|
||||||
<documentCache class="solr.LRUCache"
|
<documentCache class="solr.LRUCache"
|
||||||
size="512"
|
size="512"
|
||||||
initialSize="512"
|
initialSize="512"
|
||||||
autowarmCount="0"/>
|
autowarmCount="0"/>
|
||||||
|
|
||||||
<!-- Field Value Cache
|
<!-- Field Value Cache
|
||||||
|
|
||||||
Cache used to hold field values that are quickly accessible
|
Cache used to hold field values that are quickly accessible
|
||||||
by document id. The fieldValueCache is created by default
|
by document id. The fieldValueCache is created by default
|
||||||
even if not configured here.
|
even if not configured here.
|
||||||
@ -549,8 +549,8 @@
|
|||||||
name through SolrIndexSearcher.getCache(),cacheLookup(), and
|
name through SolrIndexSearcher.getCache(),cacheLookup(), and
|
||||||
cacheInsert(). The purpose is to enable easy caching of
|
cacheInsert(). The purpose is to enable easy caching of
|
||||||
user/application level data. The regenerator argument should
|
user/application level data. The regenerator argument should
|
||||||
be specified as an implementation of solr.CacheRegenerator
|
be specified as an implementation of solr.CacheRegenerator
|
||||||
if autowarming is desired.
|
if autowarming is desired.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<cache name="myUserCache"
|
<cache name="myUserCache"
|
||||||
@ -597,12 +597,12 @@
|
|||||||
are collected. For example, if a search for a particular query
|
are collected. For example, if a search for a particular query
|
||||||
requests matching documents 10 through 19, and queryWindowSize is 50,
|
requests matching documents 10 through 19, and queryWindowSize is 50,
|
||||||
then documents 0 through 49 will be collected and cached. Any further
|
then documents 0 through 49 will be collected and cached. Any further
|
||||||
requests in that range can be satisfied via the cache.
|
requests in that range can be satisfied via the cache.
|
||||||
-->
|
-->
|
||||||
<queryResultWindowSize>20</queryResultWindowSize>
|
<queryResultWindowSize>20</queryResultWindowSize>
|
||||||
|
|
||||||
<!-- Maximum number of documents to cache for any entry in the
|
<!-- Maximum number of documents to cache for any entry in the
|
||||||
queryResultCache.
|
queryResultCache.
|
||||||
-->
|
-->
|
||||||
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
||||||
|
|
||||||
@ -620,10 +620,10 @@
|
|||||||
prepared but there is no current registered searcher to handle
|
prepared but there is no current registered searcher to handle
|
||||||
requests or to gain autowarming data from.
|
requests or to gain autowarming data from.
|
||||||
|
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<!-- QuerySenderListener takes an array of NamedList and executes a
|
<!-- QuerySenderListener takes an array of NamedList and executes a
|
||||||
local query request for each NamedList in sequence.
|
local query request for each NamedList in sequence.
|
||||||
-->
|
-->
|
||||||
<listener event="newSearcher" class="solr.QuerySenderListener">
|
<listener event="newSearcher" class="solr.QuerySenderListener">
|
||||||
<arr name="queries">
|
<arr name="queries">
|
||||||
@ -651,7 +651,7 @@
|
|||||||
<useColdSearcher>false</useColdSearcher>
|
<useColdSearcher>false</useColdSearcher>
|
||||||
|
|
||||||
<!-- Max Warming Searchers
|
<!-- Max Warming Searchers
|
||||||
|
|
||||||
Maximum number of searchers that may be warming in the
|
Maximum number of searchers that may be warming in the
|
||||||
background concurrently. An error is returned if this limit
|
background concurrently. An error is returned if this limit
|
||||||
is exceeded.
|
is exceeded.
|
||||||
@ -673,7 +673,7 @@
|
|||||||
such as /select?qt=XXX
|
such as /select?qt=XXX
|
||||||
|
|
||||||
handleSelect="true" will cause the SolrDispatchFilter to process
|
handleSelect="true" will cause the SolrDispatchFilter to process
|
||||||
the request and dispatch the query to a handler specified by the
|
the request and dispatch the query to a handler specified by the
|
||||||
"qt" param, assuming "/select" isn't already registered.
|
"qt" param, assuming "/select" isn't already registered.
|
||||||
|
|
||||||
handleSelect="false" will cause the SolrDispatchFilter to
|
handleSelect="false" will cause the SolrDispatchFilter to
|
||||||
@ -695,26 +695,26 @@
|
|||||||
|
|
||||||
multipartUploadLimitInKB - specifies the max size (in KiB) of
|
multipartUploadLimitInKB - specifies the max size (in KiB) of
|
||||||
Multipart File Uploads that Solr will allow in a Request.
|
Multipart File Uploads that Solr will allow in a Request.
|
||||||
|
|
||||||
formdataUploadLimitInKB - specifies the max size (in KiB) of
|
formdataUploadLimitInKB - specifies the max size (in KiB) of
|
||||||
form data (application/x-www-form-urlencoded) sent via
|
form data (application/x-www-form-urlencoded) sent via
|
||||||
POST. You can use POST to pass request parameters not
|
POST. You can use POST to pass request parameters not
|
||||||
fitting into the URL.
|
fitting into the URL.
|
||||||
|
|
||||||
addHttpRequestToContext - if set to true, it will instruct
|
addHttpRequestToContext - if set to true, it will instruct
|
||||||
the requestParsers to include the original HttpServletRequest
|
the requestParsers to include the original HttpServletRequest
|
||||||
object in the context map of the SolrQueryRequest under the
|
object in the context map of the SolrQueryRequest under the
|
||||||
key "httpRequest". It will not be used by any of the existing
|
key "httpRequest". It will not be used by any of the existing
|
||||||
Solr components, but may be useful when developing custom
|
Solr components, but may be useful when developing custom
|
||||||
plugins.
|
plugins.
|
||||||
|
|
||||||
*** WARNING ***
|
*** WARNING ***
|
||||||
The settings below authorize Solr to fetch remote files, You
|
The settings below authorize Solr to fetch remote files, You
|
||||||
should make sure your system has some authentication before
|
should make sure your system has some authentication before
|
||||||
using enableRemoteStreaming="true"
|
using enableRemoteStreaming="true"
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<requestParsers enableRemoteStreaming="true"
|
<requestParsers enableRemoteStreaming="true"
|
||||||
multipartUploadLimitInKB="2048000"
|
multipartUploadLimitInKB="2048000"
|
||||||
formdataUploadLimitInKB="2048"
|
formdataUploadLimitInKB="2048"
|
||||||
addHttpRequestToContext="false"/>
|
addHttpRequestToContext="false"/>
|
||||||
@ -730,21 +730,21 @@
|
|||||||
<!-- If you include a <cacheControl> directive, it will be used to
|
<!-- If you include a <cacheControl> directive, it will be used to
|
||||||
generate a Cache-Control header (as well as an Expires header
|
generate a Cache-Control header (as well as an Expires header
|
||||||
if the value contains "max-age=")
|
if the value contains "max-age=")
|
||||||
|
|
||||||
By default, no Cache-Control header is generated.
|
By default, no Cache-Control header is generated.
|
||||||
|
|
||||||
You can use the <cacheControl> option even if you have set
|
You can use the <cacheControl> option even if you have set
|
||||||
never304="true"
|
never304="true"
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<httpCaching never304="true" >
|
<httpCaching never304="true" >
|
||||||
<cacheControl>max-age=30, public</cacheControl>
|
<cacheControl>max-age=30, public</cacheControl>
|
||||||
</httpCaching>
|
</httpCaching>
|
||||||
-->
|
-->
|
||||||
<!-- To enable Solr to respond with automatically generated HTTP
|
<!-- To enable Solr to respond with automatically generated HTTP
|
||||||
Caching headers, and to response to Cache Validation requests
|
Caching headers, and to response to Cache Validation requests
|
||||||
correctly, set the value of never304="false"
|
correctly, set the value of never304="false"
|
||||||
|
|
||||||
This will cause Solr to generate Last-Modified and ETag
|
This will cause Solr to generate Last-Modified and ETag
|
||||||
headers based on the properties of the Index.
|
headers based on the properties of the Index.
|
||||||
|
|
||||||
@ -769,12 +769,12 @@
|
|||||||
<!--
|
<!--
|
||||||
<httpCaching lastModifiedFrom="openTime"
|
<httpCaching lastModifiedFrom="openTime"
|
||||||
etagSeed="Solr">
|
etagSeed="Solr">
|
||||||
<cacheControl>max-age=30, public</cacheControl>
|
<cacheControl>max-age=30, public</cacheControl>
|
||||||
</httpCaching>
|
</httpCaching>
|
||||||
-->
|
-->
|
||||||
</requestDispatcher>
|
</requestDispatcher>
|
||||||
|
|
||||||
<!-- Request Handlers
|
<!-- Request Handlers
|
||||||
|
|
||||||
http://wiki.apache.org/solr/SolrRequestHandler
|
http://wiki.apache.org/solr/SolrRequestHandler
|
||||||
|
|
||||||
@ -863,7 +863,7 @@
|
|||||||
<str>nameOfCustomComponent2</str>
|
<str>nameOfCustomComponent2</str>
|
||||||
</arr>
|
</arr>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<arr name="last-components">
|
<arr name="last-components">
|
||||||
<str>spellcheck</str>
|
<str>spellcheck</str>
|
||||||
</arr>
|
</arr>
|
||||||
@ -990,8 +990,8 @@
|
|||||||
</requestHandler>
|
</requestHandler>
|
||||||
|
|
||||||
|
|
||||||
<!-- Update Request Handler.
|
<!-- Update Request Handler.
|
||||||
|
|
||||||
http://wiki.apache.org/solr/UpdateXmlMessages
|
http://wiki.apache.org/solr/UpdateXmlMessages
|
||||||
|
|
||||||
The canonical Request Handler for Modifying the Index through
|
The canonical Request Handler for Modifying the Index through
|
||||||
@ -1000,11 +1000,11 @@
|
|||||||
Note: Since solr1.1 requestHandlers requires a valid content
|
Note: Since solr1.1 requestHandlers requires a valid content
|
||||||
type header if posted in the body. For example, curl now
|
type header if posted in the body. For example, curl now
|
||||||
requires: -H 'Content-type:text/xml; charset=utf-8'
|
requires: -H 'Content-type:text/xml; charset=utf-8'
|
||||||
|
|
||||||
To override the request content type and force a specific
|
To override the request content type and force a specific
|
||||||
Content-type, use the request parameter:
|
Content-type, use the request parameter:
|
||||||
?update.contentType=text/csv
|
?update.contentType=text/csv
|
||||||
|
|
||||||
This handler will pick a response format to match the input
|
This handler will pick a response format to match the input
|
||||||
if the 'wt' parameter is not explicit
|
if the 'wt' parameter is not explicit
|
||||||
-->
|
-->
|
||||||
@ -1034,10 +1034,10 @@
|
|||||||
|
|
||||||
<!-- Solr Cell Update Request Handler
|
<!-- Solr Cell Update Request Handler
|
||||||
|
|
||||||
http://wiki.apache.org/solr/ExtractingRequestHandler
|
http://wiki.apache.org/solr/ExtractingRequestHandler
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/update/extract"
|
<requestHandler name="/update/extract"
|
||||||
startup="lazy"
|
startup="lazy"
|
||||||
class="solr.extraction.ExtractingRequestHandler" >
|
class="solr.extraction.ExtractingRequestHandler" >
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
@ -1070,7 +1070,7 @@
|
|||||||
field value analysis will be marked as "matched" for every
|
field value analysis will be marked as "matched" for every
|
||||||
token that is produces by the query analysis
|
token that is produces by the query analysis
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/analysis/field"
|
<requestHandler name="/analysis/field"
|
||||||
startup="lazy"
|
startup="lazy"
|
||||||
class="solr.FieldAnalysisRequestHandler" />
|
class="solr.FieldAnalysisRequestHandler" />
|
||||||
|
|
||||||
@ -1103,18 +1103,18 @@
|
|||||||
request parameter that holds the query text to be analyzed. It
|
request parameter that holds the query text to be analyzed. It
|
||||||
also supports the "analysis.showmatch" parameter which when set to
|
also supports the "analysis.showmatch" parameter which when set to
|
||||||
true, all field tokens that match the query tokens will be marked
|
true, all field tokens that match the query tokens will be marked
|
||||||
as a "match".
|
as a "match".
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/analysis/document"
|
<requestHandler name="/analysis/document"
|
||||||
class="solr.DocumentAnalysisRequestHandler"
|
class="solr.DocumentAnalysisRequestHandler"
|
||||||
startup="lazy" />
|
startup="lazy" />
|
||||||
|
|
||||||
<!-- Admin Handlers
|
<!-- Admin Handlers
|
||||||
|
|
||||||
Admin Handlers - This will register all the standard admin
|
Admin Handlers - This will register all the standard admin
|
||||||
RequestHandlers.
|
RequestHandlers.
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/admin/"
|
<requestHandler name="/admin/"
|
||||||
class="solr.admin.AdminHandlers" />
|
class="solr.admin.AdminHandlers" />
|
||||||
<!-- This single handler is equivalent to the following... -->
|
<!-- This single handler is equivalent to the following... -->
|
||||||
<!--
|
<!--
|
||||||
@ -1126,14 +1126,14 @@
|
|||||||
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
<requestHandler name="/admin/file" class="solr.admin.ShowFileRequestHandler" >
|
||||||
-->
|
-->
|
||||||
<!-- If you wish to hide files under ${solr.home}/conf, explicitly
|
<!-- If you wish to hide files under ${solr.home}/conf, explicitly
|
||||||
register the ShowFileRequestHandler using:
|
register the ShowFileRequestHandler using:
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<requestHandler name="/admin/file"
|
<requestHandler name="/admin/file"
|
||||||
class="solr.admin.ShowFileRequestHandler" >
|
class="solr.admin.ShowFileRequestHandler" >
|
||||||
<lst name="invariants">
|
<lst name="invariants">
|
||||||
<str name="hidden">synonyms.txt</str>
|
<str name="hidden">synonyms.txt</str>
|
||||||
<str name="hidden">anotherfile.txt</str>
|
<str name="hidden">anotherfile.txt</str>
|
||||||
</lst>
|
</lst>
|
||||||
</requestHandler>
|
</requestHandler>
|
||||||
-->
|
-->
|
||||||
@ -1146,10 +1146,10 @@
|
|||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<str name="echoParams">all</str>
|
<str name="echoParams">all</str>
|
||||||
</lst>
|
</lst>
|
||||||
<!-- An optional feature of the PingRequestHandler is to configure the
|
<!-- An optional feature of the PingRequestHandler is to configure the
|
||||||
handler with a "healthcheckFile" which can be used to enable/disable
|
handler with a "healthcheckFile" which can be used to enable/disable
|
||||||
the PingRequestHandler.
|
the PingRequestHandler.
|
||||||
relative paths are resolved against the data dir
|
relative paths are resolved against the data dir
|
||||||
-->
|
-->
|
||||||
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
<!-- <str name="healthcheckFile">server-enabled.txt</str> -->
|
||||||
</requestHandler>
|
</requestHandler>
|
||||||
@ -1157,29 +1157,29 @@
|
|||||||
<!-- Echo the request contents back to the client -->
|
<!-- Echo the request contents back to the client -->
|
||||||
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
<requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<str name="echoParams">explicit</str>
|
<str name="echoParams">explicit</str>
|
||||||
<str name="echoHandler">true</str>
|
<str name="echoHandler">true</str>
|
||||||
</lst>
|
</lst>
|
||||||
</requestHandler>
|
</requestHandler>
|
||||||
|
|
||||||
<!-- Solr Replication
|
<!-- Solr Replication
|
||||||
|
|
||||||
The SolrReplicationHandler supports replicating indexes from a
|
The SolrReplicationHandler supports replicating indexes from a
|
||||||
"master" used for indexing and "slaves" used for queries.
|
"master" used for indexing and "slaves" used for queries.
|
||||||
|
|
||||||
http://wiki.apache.org/solr/SolrReplication
|
http://wiki.apache.org/solr/SolrReplication
|
||||||
|
|
||||||
It is also necessary for SolrCloud to function (in Cloud mode, the
|
It is also necessary for SolrCloud to function (in Cloud mode, the
|
||||||
replication handler is used to bulk transfer segments when nodes
|
replication handler is used to bulk transfer segments when nodes
|
||||||
are added or need to recover).
|
are added or need to recover).
|
||||||
|
|
||||||
https://wiki.apache.org/solr/SolrCloud/
|
https://wiki.apache.org/solr/SolrCloud/
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
<requestHandler name="/replication" class="solr.ReplicationHandler" >
|
||||||
<!--
|
<!--
|
||||||
To enable simple master/slave replication, uncomment one of the
|
To enable simple master/slave replication, uncomment one of the
|
||||||
sections below, depending on whether this solr instance should be
|
sections below, depending on whether this solr instance should be
|
||||||
the "master" or a "slave". If this instance is a "slave" you will
|
the "master" or a "slave". If this instance is a "slave" you will
|
||||||
also need to fill in the masterUrl to point to a real machine.
|
also need to fill in the masterUrl to point to a real machine.
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
@ -1199,18 +1199,18 @@
|
|||||||
|
|
||||||
<!-- Search Components
|
<!-- Search Components
|
||||||
|
|
||||||
Search components are registered to SolrCore and used by
|
Search components are registered to SolrCore and used by
|
||||||
instances of SearchHandler (which can access them by name)
|
instances of SearchHandler (which can access them by name)
|
||||||
|
|
||||||
By default, the following components are available:
|
By default, the following components are available:
|
||||||
|
|
||||||
<searchComponent name="query" class="solr.QueryComponent" />
|
<searchComponent name="query" class="solr.QueryComponent" />
|
||||||
<searchComponent name="facet" class="solr.FacetComponent" />
|
<searchComponent name="facet" class="solr.FacetComponent" />
|
||||||
<searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
|
<searchComponent name="mlt" class="solr.MoreLikeThisComponent" />
|
||||||
<searchComponent name="highlight" class="solr.HighlightComponent" />
|
<searchComponent name="highlight" class="solr.HighlightComponent" />
|
||||||
<searchComponent name="stats" class="solr.StatsComponent" />
|
<searchComponent name="stats" class="solr.StatsComponent" />
|
||||||
<searchComponent name="debug" class="solr.DebugComponent" />
|
<searchComponent name="debug" class="solr.DebugComponent" />
|
||||||
|
|
||||||
Default configuration in a requestHandler would look like:
|
Default configuration in a requestHandler would look like:
|
||||||
|
|
||||||
<arr name="components">
|
<arr name="components">
|
||||||
@ -1222,28 +1222,28 @@
|
|||||||
<str>debug</str>
|
<str>debug</str>
|
||||||
</arr>
|
</arr>
|
||||||
|
|
||||||
If you register a searchComponent to one of the standard names,
|
If you register a searchComponent to one of the standard names,
|
||||||
that will be used instead of the default.
|
that will be used instead of the default.
|
||||||
|
|
||||||
To insert components before or after the 'standard' components, use:
|
To insert components before or after the 'standard' components, use:
|
||||||
|
|
||||||
<arr name="first-components">
|
<arr name="first-components">
|
||||||
<str>myFirstComponentName</str>
|
<str>myFirstComponentName</str>
|
||||||
</arr>
|
</arr>
|
||||||
|
|
||||||
<arr name="last-components">
|
<arr name="last-components">
|
||||||
<str>myLastComponentName</str>
|
<str>myLastComponentName</str>
|
||||||
</arr>
|
</arr>
|
||||||
|
|
||||||
NOTE: The component registered with the name "debug" will
|
NOTE: The component registered with the name "debug" will
|
||||||
always be executed after the "last-components"
|
always be executed after the "last-components"
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Spell Check
|
<!-- Spell Check
|
||||||
|
|
||||||
The spell check component can return a list of alternative spelling
|
The spell check component can return a list of alternative spelling
|
||||||
suggestions.
|
suggestions.
|
||||||
|
|
||||||
http://wiki.apache.org/solr/SpellCheckComponent
|
http://wiki.apache.org/solr/SpellCheckComponent
|
||||||
-->
|
-->
|
||||||
@ -1302,11 +1302,11 @@
|
|||||||
<float name="thresholdTokenFrequency">.01</float>
|
<float name="thresholdTokenFrequency">.01</float>
|
||||||
-->
|
-->
|
||||||
</lst>
|
</lst>
|
||||||
|
|
||||||
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
|
<!-- a spellchecker that can break or combine words. See "/spell" handler below for usage -->
|
||||||
<lst name="spellchecker">
|
<lst name="spellchecker">
|
||||||
<str name="name">wordbreak</str>
|
<str name="name">wordbreak</str>
|
||||||
<str name="classname">solr.WordBreakSolrSpellChecker</str>
|
<str name="classname">solr.WordBreakSolrSpellChecker</str>
|
||||||
<str name="field">_text</str>
|
<str name="field">_text</str>
|
||||||
<str name="combineWords">true</str>
|
<str name="combineWords">true</str>
|
||||||
<str name="breakWords">true</str>
|
<str name="breakWords">true</str>
|
||||||
@ -1325,7 +1325,7 @@
|
|||||||
</lst>
|
</lst>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- a spellchecker that use an alternate comparator
|
<!-- a spellchecker that use an alternate comparator
|
||||||
|
|
||||||
comparatorClass be one of:
|
comparatorClass be one of:
|
||||||
1. score (default)
|
1. score (default)
|
||||||
@ -1352,7 +1352,7 @@
|
|||||||
-->
|
-->
|
||||||
</searchComponent>
|
</searchComponent>
|
||||||
|
|
||||||
<!-- A request handler for demonstrating the spellcheck component.
|
<!-- A request handler for demonstrating the spellcheck component.
|
||||||
|
|
||||||
NOTE: This is purely as an example. The whole purpose of the
|
NOTE: This is purely as an example. The whole purpose of the
|
||||||
SpellCheckComponent is to hook it into the request handler that
|
SpellCheckComponent is to hook it into the request handler that
|
||||||
@ -1361,7 +1361,7 @@
|
|||||||
|
|
||||||
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
|
IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
|
||||||
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
|
||||||
|
|
||||||
See http://wiki.apache.org/solr/SpellCheckComponent for details
|
See http://wiki.apache.org/solr/SpellCheckComponent for details
|
||||||
on the request parameters.
|
on the request parameters.
|
||||||
-->
|
-->
|
||||||
@ -1375,14 +1375,14 @@
|
|||||||
<str name="spellcheck.dictionary">default</str>
|
<str name="spellcheck.dictionary">default</str>
|
||||||
<str name="spellcheck.dictionary">wordbreak</str>
|
<str name="spellcheck.dictionary">wordbreak</str>
|
||||||
<str name="spellcheck">on</str>
|
<str name="spellcheck">on</str>
|
||||||
<str name="spellcheck.extendedResults">true</str>
|
<str name="spellcheck.extendedResults">true</str>
|
||||||
<str name="spellcheck.count">10</str>
|
<str name="spellcheck.count">10</str>
|
||||||
<str name="spellcheck.alternativeTermCount">5</str>
|
<str name="spellcheck.alternativeTermCount">5</str>
|
||||||
<str name="spellcheck.maxResultsForSuggest">5</str>
|
<str name="spellcheck.maxResultsForSuggest">5</str>
|
||||||
<str name="spellcheck.collate">true</str>
|
<str name="spellcheck.collate">true</str>
|
||||||
<str name="spellcheck.collateExtendedResults">true</str>
|
<str name="spellcheck.collateExtendedResults">true</str>
|
||||||
<str name="spellcheck.maxCollationTries">10</str>
|
<str name="spellcheck.maxCollationTries">10</str>
|
||||||
<str name="spellcheck.maxCollations">5</str>
|
<str name="spellcheck.maxCollations">5</str>
|
||||||
</lst>
|
</lst>
|
||||||
<arr name="last-components">
|
<arr name="last-components">
|
||||||
<str>spellcheck</str>
|
<str>spellcheck</str>
|
||||||
@ -1399,8 +1399,8 @@
|
|||||||
|
|
||||||
This is purely as an example.
|
This is purely as an example.
|
||||||
|
|
||||||
In reality you will likely want to add the component to your
|
In reality you will likely want to add the component to your
|
||||||
already specified request handlers.
|
already specified request handlers.
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
|
<requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
@ -1433,11 +1433,11 @@
|
|||||||
<!-- Class name of Carrot2 clustering algorithm.
|
<!-- Class name of Carrot2 clustering algorithm.
|
||||||
|
|
||||||
Currently available algorithms are:
|
Currently available algorithms are:
|
||||||
|
|
||||||
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
* org.carrot2.clustering.lingo.LingoClusteringAlgorithm
|
||||||
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
* org.carrot2.clustering.stc.STCClusteringAlgorithm
|
||||||
* org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
* org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
|
||||||
|
|
||||||
See http://project.carrot2.org/algorithms.html for the
|
See http://project.carrot2.org/algorithms.html for the
|
||||||
algorithm's characteristics.
|
algorithm's characteristics.
|
||||||
-->
|
-->
|
||||||
@ -1484,8 +1484,8 @@
|
|||||||
|
|
||||||
This is purely as an example.
|
This is purely as an example.
|
||||||
|
|
||||||
In reality you will likely want to add the component to your
|
In reality you will likely want to add the component to your
|
||||||
already specified request handlers.
|
already specified request handlers.
|
||||||
-->
|
-->
|
||||||
<requestHandler name="/clustering"
|
<requestHandler name="/clustering"
|
||||||
startup="lazy"
|
startup="lazy"
|
||||||
@ -1506,7 +1506,7 @@
|
|||||||
<!--<int name="carrot.numDescriptions">5</int>-->
|
<!--<int name="carrot.numDescriptions">5</int>-->
|
||||||
<!-- produce sub clusters -->
|
<!-- produce sub clusters -->
|
||||||
<bool name="carrot.outputSubClusters">false</bool>
|
<bool name="carrot.outputSubClusters">false</bool>
|
||||||
|
|
||||||
<str name="defType">edismax</str>
|
<str name="defType">edismax</str>
|
||||||
<str name="qf">
|
<str name="qf">
|
||||||
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
||||||
@ -1514,12 +1514,12 @@
|
|||||||
<str name="q.alt">*:*</str>
|
<str name="q.alt">*:*</str>
|
||||||
<str name="rows">10</str>
|
<str name="rows">10</str>
|
||||||
<str name="fl">*,score</str>
|
<str name="fl">*,score</str>
|
||||||
</lst>
|
</lst>
|
||||||
<arr name="last-components">
|
<arr name="last-components">
|
||||||
<str>clustering</str>
|
<str>clustering</str>
|
||||||
</arr>
|
</arr>
|
||||||
</requestHandler>
|
</requestHandler>
|
||||||
|
|
||||||
<!-- Terms Component
|
<!-- Terms Component
|
||||||
|
|
||||||
http://wiki.apache.org/solr/TermsComponent
|
http://wiki.apache.org/solr/TermsComponent
|
||||||
@ -1534,7 +1534,7 @@
|
|||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<bool name="terms">true</bool>
|
<bool name="terms">true</bool>
|
||||||
<bool name="distrib">false</bool>
|
<bool name="distrib">false</bool>
|
||||||
</lst>
|
</lst>
|
||||||
<arr name="components">
|
<arr name="components">
|
||||||
<str>terms</str>
|
<str>terms</str>
|
||||||
</arr>
|
</arr>
|
||||||
@ -1574,7 +1574,7 @@
|
|||||||
<highlighting>
|
<highlighting>
|
||||||
<!-- Configure the standard fragmenter -->
|
<!-- Configure the standard fragmenter -->
|
||||||
<!-- This could most likely be commented out in the "default" case -->
|
<!-- This could most likely be commented out in the "default" case -->
|
||||||
<fragmenter name="gap"
|
<fragmenter name="gap"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.highlight.GapFragmenter">
|
class="solr.highlight.GapFragmenter">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
@ -1582,10 +1582,10 @@
|
|||||||
</lst>
|
</lst>
|
||||||
</fragmenter>
|
</fragmenter>
|
||||||
|
|
||||||
<!-- A regular-expression-based fragmenter
|
<!-- A regular-expression-based fragmenter
|
||||||
(for sentence extraction)
|
(for sentence extraction)
|
||||||
-->
|
-->
|
||||||
<fragmenter name="regex"
|
<fragmenter name="regex"
|
||||||
class="solr.highlight.RegexFragmenter">
|
class="solr.highlight.RegexFragmenter">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<!-- slightly smaller fragsizes work better because of slop -->
|
<!-- slightly smaller fragsizes work better because of slop -->
|
||||||
@ -1598,7 +1598,7 @@
|
|||||||
</fragmenter>
|
</fragmenter>
|
||||||
|
|
||||||
<!-- Configure the standard formatter -->
|
<!-- Configure the standard formatter -->
|
||||||
<formatter name="html"
|
<formatter name="html"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.highlight.HtmlFormatter">
|
class="solr.highlight.HtmlFormatter">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
@ -1608,27 +1608,27 @@
|
|||||||
</formatter>
|
</formatter>
|
||||||
|
|
||||||
<!-- Configure the standard encoder -->
|
<!-- Configure the standard encoder -->
|
||||||
<encoder name="html"
|
<encoder name="html"
|
||||||
class="solr.highlight.HtmlEncoder" />
|
class="solr.highlight.HtmlEncoder" />
|
||||||
|
|
||||||
<!-- Configure the standard fragListBuilder -->
|
<!-- Configure the standard fragListBuilder -->
|
||||||
<fragListBuilder name="simple"
|
<fragListBuilder name="simple"
|
||||||
class="solr.highlight.SimpleFragListBuilder"/>
|
class="solr.highlight.SimpleFragListBuilder"/>
|
||||||
|
|
||||||
<!-- Configure the single fragListBuilder -->
|
<!-- Configure the single fragListBuilder -->
|
||||||
<fragListBuilder name="single"
|
<fragListBuilder name="single"
|
||||||
class="solr.highlight.SingleFragListBuilder"/>
|
class="solr.highlight.SingleFragListBuilder"/>
|
||||||
|
|
||||||
<!-- Configure the weighted fragListBuilder -->
|
<!-- Configure the weighted fragListBuilder -->
|
||||||
<fragListBuilder name="weighted"
|
<fragListBuilder name="weighted"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.highlight.WeightedFragListBuilder"/>
|
class="solr.highlight.WeightedFragListBuilder"/>
|
||||||
|
|
||||||
<!-- default tag FragmentsBuilder -->
|
<!-- default tag FragmentsBuilder -->
|
||||||
<fragmentsBuilder name="default"
|
<fragmentsBuilder name="default"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
||||||
<!--
|
<!--
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<str name="hl.multiValuedSeparatorChar">/</str>
|
<str name="hl.multiValuedSeparatorChar">/</str>
|
||||||
</lst>
|
</lst>
|
||||||
@ -1636,7 +1636,7 @@
|
|||||||
</fragmentsBuilder>
|
</fragmentsBuilder>
|
||||||
|
|
||||||
<!-- multi-colored tag FragmentsBuilder -->
|
<!-- multi-colored tag FragmentsBuilder -->
|
||||||
<fragmentsBuilder name="colored"
|
<fragmentsBuilder name="colored"
|
||||||
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
class="solr.highlight.ScoreOrderFragmentsBuilder">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<str name="hl.tag.pre"><![CDATA[
|
<str name="hl.tag.pre"><![CDATA[
|
||||||
@ -1648,8 +1648,8 @@
|
|||||||
<str name="hl.tag.post"><![CDATA[</b>]]></str>
|
<str name="hl.tag.post"><![CDATA[</b>]]></str>
|
||||||
</lst>
|
</lst>
|
||||||
</fragmentsBuilder>
|
</fragmentsBuilder>
|
||||||
|
|
||||||
<boundaryScanner name="default"
|
<boundaryScanner name="default"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.highlight.SimpleBoundaryScanner">
|
class="solr.highlight.SimpleBoundaryScanner">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
@ -1657,8 +1657,8 @@
|
|||||||
<str name="hl.bs.chars">.,!? 	 </str>
|
<str name="hl.bs.chars">.,!? 	 </str>
|
||||||
</lst>
|
</lst>
|
||||||
</boundaryScanner>
|
</boundaryScanner>
|
||||||
|
|
||||||
<boundaryScanner name="breakIterator"
|
<boundaryScanner name="breakIterator"
|
||||||
class="solr.highlight.BreakIteratorBoundaryScanner">
|
class="solr.highlight.BreakIteratorBoundaryScanner">
|
||||||
<lst name="defaults">
|
<lst name="defaults">
|
||||||
<!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
|
<!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
|
||||||
@ -1680,15 +1680,15 @@
|
|||||||
|
|
||||||
http://wiki.apache.org/solr/UpdateRequestProcessor
|
http://wiki.apache.org/solr/UpdateRequestProcessor
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<!-- Deduplication
|
<!-- Deduplication
|
||||||
|
|
||||||
An example dedup update processor that creates the "id" field
|
An example dedup update processor that creates the "id" field
|
||||||
on the fly based on the hash code of some other fields. This
|
on the fly based on the hash code of some other fields. This
|
||||||
example has overwriteDupes set to false since we are using the
|
example has overwriteDupes set to false since we are using the
|
||||||
id field as the signatureField and Solr will maintain
|
id field as the signatureField and Solr will maintain
|
||||||
uniqueness based on that anyway.
|
uniqueness based on that anyway.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<updateRequestProcessorChain name="dedupe">
|
<updateRequestProcessorChain name="dedupe">
|
||||||
@ -1703,7 +1703,7 @@
|
|||||||
<processor class="solr.RunUpdateProcessorFactory" />
|
<processor class="solr.RunUpdateProcessorFactory" />
|
||||||
</updateRequestProcessorChain>
|
</updateRequestProcessorChain>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Language identification
|
<!-- Language identification
|
||||||
|
|
||||||
This example update chain identifies the language of the incoming
|
This example update chain identifies the language of the incoming
|
||||||
@ -1743,7 +1743,7 @@
|
|||||||
<processor class="solr.RunUpdateProcessorFactory" />
|
<processor class="solr.RunUpdateProcessorFactory" />
|
||||||
</updateRequestProcessorChain>
|
</updateRequestProcessorChain>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Response Writers
|
<!-- Response Writers
|
||||||
|
|
||||||
http://wiki.apache.org/solr/QueryResponseWriter
|
http://wiki.apache.org/solr/QueryResponseWriter
|
||||||
@ -1759,7 +1759,7 @@
|
|||||||
overridden...
|
overridden...
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
<queryResponseWriter name="xml"
|
<queryResponseWriter name="xml"
|
||||||
default="true"
|
default="true"
|
||||||
class="solr.XMLResponseWriter" />
|
class="solr.XMLResponseWriter" />
|
||||||
<queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
|
<queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
|
||||||
@ -1778,16 +1778,16 @@
|
|||||||
-->
|
-->
|
||||||
<str name="content-type">text/plain; charset=UTF-8</str>
|
<str name="content-type">text/plain; charset=UTF-8</str>
|
||||||
</queryResponseWriter>
|
</queryResponseWriter>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Custom response writers can be declared as needed...
|
Custom response writers can be declared as needed...
|
||||||
-->
|
-->
|
||||||
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- XSLT response writer transforms the XML output by any xslt file found
|
<!-- 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
|
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
||||||
every xsltCacheLifetimeSeconds.
|
every xsltCacheLifetimeSeconds.
|
||||||
-->
|
-->
|
||||||
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
|
<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
|
||||||
<int name="xsltCacheLifetimeSeconds">5</int>
|
<int name="xsltCacheLifetimeSeconds">5</int>
|
||||||
@ -1815,11 +1815,11 @@
|
|||||||
-->
|
-->
|
||||||
<!-- example of registering a custom function parser -->
|
<!-- example of registering a custom function parser -->
|
||||||
<!--
|
<!--
|
||||||
<valueSourceParser name="myfunc"
|
<valueSourceParser name="myfunc"
|
||||||
class="com.mycompany.MyValueSourceParser" />
|
class="com.mycompany.MyValueSourceParser" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Document Transformers
|
<!-- Document Transformers
|
||||||
http://wiki.apache.org/solr/DocTransformers
|
http://wiki.apache.org/solr/DocTransformers
|
||||||
-->
|
-->
|
||||||
@ -1828,12 +1828,12 @@
|
|||||||
<transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
|
<transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
|
||||||
<int name="connection">jdbc://....</int>
|
<int name="connection">jdbc://....</int>
|
||||||
</transformer>
|
</transformer>
|
||||||
|
|
||||||
To add a constant value to all docs, use:
|
To add a constant value to all docs, use:
|
||||||
<transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
<transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
||||||
<int name="value">5</int>
|
<int name="value">5</int>
|
||||||
</transformer>
|
</transformer>
|
||||||
|
|
||||||
If you want the user to still be able to change it with _value:something_ use this:
|
If you want the user to still be able to change it with _value:something_ use this:
|
||||||
<transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
<transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
|
||||||
<double name="defaultValue">5</double>
|
<double name="defaultValue">5</double>
|
||||||
@ -1843,7 +1843,7 @@
|
|||||||
EditorialMarkerFactory will do exactly that:
|
EditorialMarkerFactory will do exactly that:
|
||||||
<transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
|
<transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Legacy config for the admin interface -->
|
<!-- Legacy config for the admin interface -->
|
||||||
<admin>
|
<admin>
|
||||||
|
@ -1,13 +1,26 @@
|
|||||||
# Troubleshooting
|
# Troubleshooting
|
||||||
|
|
||||||
|
## Newly indexed content only shows in searches after a delay
|
||||||
|
|
||||||
|
First, check how you're running index operations.
|
||||||
|
In many cases where the `queuedjobs` module is installed,
|
||||||
|
saving or publishing a record will create a new index job which needs to complete first.
|
||||||
|
Solr also distinguishes between adding documents to the indexing,
|
||||||
|
committing them, and making them available to new searches.
|
||||||
|
In most cases this happens within a few seconds, but
|
||||||
|
in sometimes it can take up to a minute due to the
|
||||||
|
`autoSoftCommit` configuration setting defaults in your `solrconfig.xml`.
|
||||||
|
To find out more detail, read about
|
||||||
|
[soft vs. hard commits](https://lucidworks.com/post/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/).
|
||||||
|
|
||||||
## Common gotchas
|
## Common gotchas
|
||||||
|
|
||||||
* By default number-letter boundaries are treated as a word boundary. For example, `A1` is two words - `a` and `1` - when Solr parses the search term.
|
* By default number-letter boundaries are treated as a word boundary. For example, `A1` is two words - `a` and `1` - when Solr parses the search term.
|
||||||
* Special characters and operators are not correctly escaped
|
* Special characters and operators are not correctly escaped
|
||||||
* Multi-word synonym issues
|
* Multi-word synonym issues
|
||||||
* When Dolr indexes are reconfigured and reindexed, their content is trashed and rebuilt
|
* When Solr indexes are reconfigured and reindexed, their content is trashed and rebuilt
|
||||||
|
|
||||||
### CWP-specific
|
## CWP-specific
|
||||||
|
|
||||||
* `solrconfig.xml` customisations fail silently
|
* `solrconfig.xml` customisations fail silently
|
||||||
* Developers aren’t able to test raw queries or see output via the
|
* Developers aren’t able to test raw queries or see output via the
|
||||||
|
Loading…
Reference in New Issue
Block a user