Project

General

Profile

« Previous | Next » 

Revision 48891

upgraded solr version to 6.6.0

View differences:

solrconfig.xml.st
16 16
 limitations under the License.
17 17
-->
18 18

  
19
<!-- 
19
<!--
20 20
     For more details about configurations options that may appear in
21
     this file, see http://wiki.apache.org/solr/SolrConfigXml. 
21
     this file, see http://wiki.apache.org/solr/SolrConfigXml.
22 22
-->
23 23
<config>
24
  <!-- In all configuration below, a prefix of "solr." for class names
25
       is an alias that causes solr to search appropriate packages,
26
       including org.apache.solr.(search|update|request|core|analysis)
24
	<!-- In all configuration below, a prefix of "solr." for class names
25
		 is an alias that causes solr to search appropriate packages,
26
		 including org.apache.solr.(search|update|request|core|analysis)
27 27

  
28
       You may also specify a fully qualified Java classname if you
29
       have your own custom plugins.
30
    -->
28
		 You may also specify a fully qualified Java classname if you
29
		 have your own custom plugins.
30
	  -->
31 31

  
32
  <!-- Controls what version of Lucene various components of Solr
33
       adhere to.  Generally, you want to use the latest version to
34
       get all bug fixes and improvements. It is highly recommended
35
       that you fully re-index after changing this setting as it can
36
       affect both how text is indexed and queried.
37
  -->
38
  <luceneMatchVersion>$luceneMatchVersion$</luceneMatchVersion>
32
	<!-- Controls what version of Lucene various components of Solr
33
		 adhere to.  Generally, you want to use the latest version to
34
		 get all bug fixes and improvements. It is highly recommended
35
		 that you fully re-index after changing this setting as it can
36
		 affect both how text is indexed and queried.
37
	-->
38
	<luceneMatchVersion>$luceneMatchVersion$</luceneMatchVersion>
39 39

  
40
  <!-- <lib/> directives can be used to instruct Solr to load an Jars
41
       identified and use them to resolve any "plugins" specified in
42
       your solrconfig.xml or schema.xml (ie: Analyzers, Request
43
       Handlers, etc...).
40
	<!-- <lib/> directives can be used to instruct Solr to load any Jars
41
		 identified and use them to resolve any "plugins" specified in
42
		 your solrconfig.xml or schema.xml (ie: Analyzers, Request
43
		 Handlers, etc...).
44 44

  
45
       All directories and paths are resolved relative to the
46
       instanceDir.
45
		 All directories and paths are resolved relative to the
46
		 instanceDir.
47 47

  
48
       Please note that <lib/> directives are processed in the order
49
       that they appear in your solrconfig.xml file, and are "stacked" 
50
       on top of each other when building a ClassLoader - so if you have 
51
       plugin jars with dependencies on other jars, the "lower level" 
52
       dependency jars should be loaded first.
48
		 Please note that <lib/> directives are processed in the order
49
		 that they appear in your solrconfig.xml file, and are "stacked"
50
		 on top of each other when building a ClassLoader - so if you have
51
		 plugin jars with dependencies on other jars, the "lower level"
52
		 dependency jars should be loaded first.
53 53

  
54
       If a "./lib" directory exists in your instanceDir, all files
55
       found in it are included as if you had used the following
56
       syntax...
57
       
58
              <lib dir="./lib" />
59
    -->
54
		 If a "./lib" directory exists in your instanceDir, all files
55
		 found in it are included as if you had used the following
56
		 syntax...
60 57

  
61
  <!-- A 'dir' option by itself adds any files found in the directory 
62
       to the classpath, this is useful for including all jars in a
63
       directory.
58
				<lib dir="./lib" />
59
	  -->
64 60

  
65
       When a 'regex' is specified in addition to a 'dir', only the
66
       files in that directory which completely match the regex
67
       (anchored on both ends) will be included.
61
	<!-- A 'dir' option by itself adds any files found in the directory
62
		 to the classpath, this is useful for including all jars in a
63
		 directory.
68 64

  
69
       If a 'dir' option (with or without a regex) is used and nothing
70
       is found that matches, a warning will be logged.
65
		 When a 'regex' is specified in addition to a 'dir', only the
66
		 files in that directory which completely match the regex
67
		 (anchored on both ends) will be included.
71 68

  
72
       The examples below can be used to load some solr-contribs along 
73
       with their external dependencies.
74
    -->
75
  <lib dir="$serverLibPath$" regex=".*\.jar" />
69
		 If a 'dir' option (with or without a regex) is used and nothing
70
		 is found that matches, a warning will be logged.
76 71

  
77
  <!-- an exact 'path' can be used instead of a 'dir' to specify a 
78
       specific jar file.  This will cause a serious error to be logged 
79
       if it can't be loaded.
80
    -->
81
  <!--
82
     <lib path="../a-jar-that-does-not-exist.jar" /> 
83
  -->
84
  
85
  <!-- Data Directory
72
		 The examples below can be used to load some solr-contribs along
73
		 with their external dependencies.
74
	  -->
75
	<lib dir="\${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
76
	<lib dir="\${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
86 77

  
87
       Used to specify an alternate directory to hold all index data
88
       other than the default ./data under the Solr home.  If
89
       replication is in use, this should match the replication
90
       configuration.
91
    -->
92
  <dataDir>\${solr.data.dir:}</dataDir>
78
	<lib dir="\${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
79
	<lib dir="\${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
93 80

  
81
	<lib dir="\${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
82
	<lib dir="\${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
94 83

  
95
  <!-- The DirectoryFactory to use for indexes.
96
       
97
       solr.StandardDirectoryFactory is filesystem
98
       based and tries to pick the best implementation for the current
99
       JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
100
       wraps solr.StandardDirectoryFactory and caches small files in memory
101
       for better NRT performance.
84
	<lib dir="\${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
85
	<lib dir="\${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
102 86

  
103
       One can force a particular implementation via solr.MMapDirectoryFactory,
104
       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
87
	<!-- an exact 'path' can be used instead of a 'dir' to specify a
88
		 specific jar file.  This will cause a serious error to be logged
89
		 if it can't be loaded.
90
	  -->
91
	<!--
92
	   <lib path="../a-jar-that-does-not-exist.jar" />
93
	-->
105 94

  
106
       solr.RAMDirectoryFactory is memory based, not
107
       persistent, and doesn't work with replication.
108
    -->
109
  <directoryFactory name="DirectoryFactory" 
110
                    class="\${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
111
    
112
         
113
    <!-- These will be used if you are using the solr.HdfsDirectoryFactory,
114
         otherwise they will be ignored. If you don't plan on using hdfs,
115
         you can safely remove this section. -->      
116
    <!-- The root directory that collection data should be written to. -->     
117
    <str name="solr.hdfs.home">\${solr.hdfs.home:}</str>
118
    <!-- The hadoop configuration files to use for the hdfs client. -->    
119
    <str name="solr.hdfs.confdir">\${solr.hdfs.confdir:}</str>
120
    <!-- Enable/Disable the hdfs cache. -->    
121
    <str name="solr.hdfs.blockcache.enabled">\${solr.hdfs.blockcache.enabled:true}</str>
122
    <!-- Enable/Disable using one global cache for all SolrCores. 
123
         The settings used will be from the first HdfsDirectoryFactory created. -->    
124
    <str name="solr.hdfs.blockcache.global">\${solr.hdfs.blockcache.global:true}</str>
125
    
126
  </directoryFactory> 
95
	<!-- Data Directory
127 96

  
128
  <!-- The CodecFactory for defining the format of the inverted index.
129
       The default implementation is SchemaCodecFactory, which is the official Lucene
130
       index format, but hooks into the schema to provide per-field customization of
131
       the postings lists and per-document values in the fieldType element
132
       (postingsFormat/docValuesFormat). Note that most of the alternative implementations
133
       are experimental, so if you choose to customize the index format, its a good
134
       idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
135
       before upgrading to a newer version to avoid unnecessary reindexing.
136
  -->
137
  <codecFactory class="solr.SchemaCodecFactory"/>
97
		 Used to specify an alternate directory to hold all index data
98
		 other than the default ./data under the Solr home.  If
99
		 replication is in use, this should match the replication
100
		 configuration.
101
	  -->
102
	<dataDir>\${solr.data.dir:}</dataDir>
138 103

  
139
  <!-- To enable dynamic schema REST APIs, use the following for <schemaFactory>:
140
  
141
       <schemaFactory class="ManagedIndexSchemaFactory">
142
         <bool name="mutable">true</bool>
143
         <str name="managedSchemaResourceName">managed-schema</str>
144
       </schemaFactory>
145
       
146
       When ManagedIndexSchemaFactory is specified, Solr will load the schema from
147
       he resource named in 'managedSchemaResourceName', rather than from schema.xml.
148
       Note that the managed schema resource CANNOT be named schema.xml.  If the managed
149
       schema does not exist, Solr will create it after reading schema.xml, then rename
150
       'schema.xml' to 'schema.xml.bak'. 
151
       
152
       Do NOT hand edit the managed schema - external modifications will be ignored and
153
       overwritten as a result of schema modification REST API calls.
154 104

  
155
       When ManagedIndexSchemaFactory is specified with mutable = true, schema
156
       modification REST API calls will be allowed; otherwise, error responses will be
157
       sent back for these requests. 
158
  -->
159
  <schemaFactory class="ClassicIndexSchemaFactory"/>
105
	<!-- The DirectoryFactory to use for indexes.
160 106

  
161
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162
       Index Config - These settings control low-level behavior of indexing
163
       Most example settings here show the default value, but are commented
164
       out, to more easily see where customizations have been made.
165
       
166
       Note: This replaces <indexDefaults> and <mainIndex> from older versions
167
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
168
  <indexConfig>
169
    <!-- maxFieldLength was removed in 4.0. To get similar behavior, include a 
170
         LimitTokenCountFilterFactory in your fieldType definition. E.g. 
171
     <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
172
    -->
173
    <!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
174
    <!-- <writeLockTimeout>1000</writeLockTimeout>  -->
107
		 solr.StandardDirectoryFactory is filesystem
108
		 based and tries to pick the best implementation for the current
109
		 JVM and platform.  solr.NRTCachingDirectoryFactory, the default,
110
		 wraps solr.StandardDirectoryFactory and caches small files in memory
111
		 for better NRT performance.
175 112

  
176
    <!-- The maximum number of simultaneous threads that may be
177
         indexing documents at once in IndexWriter; if more than this
178
         many threads arrive they will wait for others to finish.
179
         Default in Solr/Lucene is 8. -->
180
    <maxIndexingThreads>$maxIndexingThreads$</maxIndexingThreads> 
113
		 One can force a particular implementation via solr.MMapDirectoryFactory,
114
		 solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
181 115

  
182
    <!-- Expert: Enabling compound file will use less files for the index, 
183
         using fewer file descriptors on the expense of performance decrease. 
184
         Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
185
    <!-- <useCompoundFile>false</useCompoundFile> -->
116
		 solr.RAMDirectoryFactory is memory based, not
117
		 persistent, and doesn't work with replication.
118
	  -->
119
	<directoryFactory name="DirectoryFactory"
120
	                  class="\${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
186 121

  
187
    <!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
188
         indexing for buffering added documents and deletions before they are
189
         flushed to the Directory.
190
         maxBufferedDocs sets a limit on the number of documents buffered
191
         before flushing.
192
         If both ramBufferSizeMB and maxBufferedDocs is set, then
193
         Lucene will flush based on whichever limit is hit first.
194
         The default is 100 MB.  -->
195
    <!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
196
    <!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
197
    
198
    
199
    <ramBufferSizeMB>$ramBufferSizeMB$</ramBufferSizeMB>
122
	<!-- The CodecFactory for defining the format of the inverted index.
123
		 The default implementation is SchemaCodecFactory, which is the official Lucene
124
		 index format, but hooks into the schema to provide per-field customization of
125
		 the postings lists and per-document values in the fieldType element
126
		 (postingsFormat/docValuesFormat). Note that most of the alternative implementations
127
		 are experimental, so if you choose to customize the index format, it's a good
128
		 idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
129
		 before upgrading to a newer version to avoid unnecessary reindexing.
130
		 A "compressionMode" string element can be added to <codecFactory> to choose
131
		 between the existing compression modes in the default codec: "BEST_SPEED" (default)
132
		 or "BEST_COMPRESSION".
133
	-->
134
	<codecFactory class="solr.SchemaCodecFactory"/>
200 135

  
201
    <!-- Expert: Merge Policy 
202
         The Merge Policy in Lucene controls how merging of segments is done.
203
         The default since Solr/Lucene 3.3 is TieredMergePolicy.
204
         The default since Lucene 2.3 was the LogByteSizeMergePolicy,
205
         Even older versions of Lucene used LogDocMergePolicy.
206
      -->
207
    <!--
208
        <mergePolicy class="org.apache.lucene.index.TieredMergePolicy">
209
          <int name="maxMergeAtOnce">10</int>
210
          <int name="segmentsPerTier">10</int>
211
        </mergePolicy>
212
      -->
213
       
214
    <!-- Merge Factor
215
         The merge factor controls how many segments will get merged at a time.
216
         For TieredMergePolicy, mergeFactor is a convenience parameter which
217
         will set both MaxMergeAtOnce and SegmentsPerTier at once.
218
         For LogByteSizeMergePolicy, mergeFactor decides how many new segments
219
         will be allowed before they are merged into one.
220
         Default is 10 for both merge policies.
221
      -->
222
    
223
    	<mergeFactor>$mergeFactor$</mergeFactor>
224
    
136
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
		 Index Config - These settings control low-level behavior of indexing
138
		 Most example settings here show the default value, but are commented
139
		 out, to more easily see where customizations have been made.
225 140

  
226
    <!-- Expert: Merge Scheduler
227
         The Merge Scheduler in Lucene controls how merges are
228
         performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
229
         can perform merges in the background using separate threads.
230
         The SerialMergeScheduler (Lucene 2.2 default) does not.
231
     -->
232
    <!-- 
233
       <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
234
       -->
141
		 Note: This replaces <indexDefaults> and <mainIndex> from older versions
142
		 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
143
	<indexConfig>
144
		<!-- maxFieldLength was removed in 4.0. To get similar behavior, include a
145
			 LimitTokenCountFilterFactory in your fieldType definition. E.g.
146
		 <filter class="solr.LimitTokenCountFilterFactory" maxTokenCount="10000"/>
147
		-->
148
		<!-- Maximum time to wait for a write lock (ms) for an IndexWriter. Default: 1000 -->
149
		<!-- <writeLockTimeout>1000</writeLockTimeout>  -->
235 150

  
236
    <!-- LockFactory 
151
		<!-- Expert: Enabling compound file will use less files for the index,
152
			 using fewer file descriptors on the expense of performance decrease.
153
			 Default in Lucene is "true". Default in Solr is "false" (since 3.6) -->
154
		<!-- <useCompoundFile>false</useCompoundFile> -->
237 155

  
238
         This option specifies which Lucene LockFactory implementation
239
         to use.
240
      
241
         single = SingleInstanceLockFactory - suggested for a
242
                  read-only index or when there is no possibility of
243
                  another process trying to modify the index.
244
         native = NativeFSLockFactory - uses OS native file locking.
245
                  Do not use when multiple solr webapps in the same
246
                  JVM are attempting to share a single index.
247
         simple = SimpleFSLockFactory  - uses a plain file for locking
156
		<!-- ramBufferSizeMB sets the amount of RAM that may be used by Lucene
157
			 indexing for buffering added documents and deletions before they are
158
			 flushed to the Directory.
159
			 maxBufferedDocs sets a limit on the number of documents buffered
160
			 before flushing.
161
			 If both ramBufferSizeMB and maxBufferedDocs is set, then
162
			 Lucene will flush based on whichever limit is hit first.  -->
163
		<!-- <ramBufferSizeMB>100</ramBufferSizeMB> -->
164
		<!-- <maxBufferedDocs>1000</maxBufferedDocs> -->
248 165

  
249
         Defaults: 'native' is default for Solr3.6 and later, otherwise
250
                   'simple' is the default
166
		<!-- Expert: Merge Policy
167
			 The Merge Policy in Lucene controls how merging of segments is done.
168
			 The default since Solr/Lucene 3.3 is TieredMergePolicy.
169
			 The default since Lucene 2.3 was the LogByteSizeMergePolicy,
170
			 Even older versions of Lucene used LogDocMergePolicy.
171
		  -->
172
		<!--
173
			<mergePolicyFactory class="org.apache.solr.index.TieredMergePolicyFactory">
174
			  <int name="maxMergeAtOnce">10</int>
175
			  <int name="segmentsPerTier">10</int>
176
			  <double name="noCFSRatio">0.1</double>
177
			</mergePolicyFactory>
178
		  -->
251 179

  
252
         More details on the nuances of each LockFactory...
253
         http://wiki.apache.org/lucene-java/AvailableLockFactories
254
    -->
255
    <lockType>\${solr.lock.type:native}</lockType>
180
		<!-- Expert: Merge Scheduler
181
			 The Merge Scheduler in Lucene controls how merges are
182
			 performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
183
			 can perform merges in the background using separate threads.
184
			 The SerialMergeScheduler (Lucene 2.2 default) does not.
185
		 -->
186
		<!--
187
		   <mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>
188
		   -->
256 189

  
257
    <!-- Unlock On Startup
190
		<!-- LockFactory
258 191

  
259
         If true, unlock any held write or commit locks on startup.
260
         This defeats the locking mechanism that allows multiple
261
         processes to safely access a lucene index, and should be used
262
         with care. Default is "false".
192
			 This option specifies which Lucene LockFactory implementation
193
			 to use.
263 194

  
264
         This is not needed if lock type is 'single'
265
     -->
266
    <!--
267
    <unlockOnStartup>false</unlockOnStartup>
268
      -->
269
    
270
    <!-- Expert: Controls how often Lucene loads terms into memory
271
         Default is 128 and is likely good for most everyone.
272
      -->
273
     <termIndexInterval>$termIndexInterval$</termIndexInterval>
195
			 single = SingleInstanceLockFactory - suggested for a
196
					  read-only index or when there is no possibility of
197
					  another process trying to modify the index.
198
			 native = NativeFSLockFactory - uses OS native file locking.
199
					  Do not use when multiple solr webapps in the same
200
					  JVM are attempting to share a single index.
201
			 simple = SimpleFSLockFactory  - uses a plain file for locking
274 202

  
275
    <!-- If true, IndexReaders will be opened/reopened from the IndexWriter
276
         instead of from the Directory. Hosts in a master/slave setup
277
         should have this set to false while those in a SolrCloud
278
         cluster need to be set to true. Default: true
279
      -->
280
    <!-- 
281
    <nrtMode>true</nrtMode>
282
      -->
203
			 Defaults: 'native' is default for Solr3.6 and later, otherwise
204
					   'simple' is the default
283 205

  
284
    <!-- Commit Deletion Policy
285
         Custom deletion policies can be specified here. The class must
286
         implement org.apache.lucene.index.IndexDeletionPolicy.
206
			 More details on the nuances of each LockFactory...
207
			 http://wiki.apache.org/lucene-java/AvailableLockFactories
208
		-->
209
		<lockType>\${solr.lock.type:native}</lockType>
287 210

  
288
         The default Solr IndexDeletionPolicy implementation supports
289
         deleting index commit points on number of commits, age of
290
         commit point and optimized status.
291
         
292
         The latest commit point should always be preserved regardless
293
         of the criteria.
294
    -->
295
    <!-- 
296
    <deletionPolicy class="solr.SolrDeletionPolicy">
297
    -->
298
      <!-- The number of commit points to be kept -->
299
      <!-- <str name="maxCommitsToKeep">1</str> -->
300
      <!-- The number of optimized commit points to be kept -->
301
      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
302
      <!--
303
          Delete all commit points once they have reached the given age.
304
          Supports DateMathParser syntax e.g.
305
        -->
306
      <!--
307
         <str name="maxCommitAge">30MINUTES</str>
308
         <str name="maxCommitAge">1DAY</str>
309
      -->
310
    <!-- 
311
    </deletionPolicy>
312
    -->
211
		<!-- Commit Deletion Policy
212
			 Custom deletion policies can be specified here. The class must
213
			 implement org.apache.lucene.index.IndexDeletionPolicy.
313 214

  
314
    <!-- Lucene Infostream
315
       
316
         To aid in advanced debugging, Lucene provides an "InfoStream"
317
         of detailed information when indexing.
215
			 The default Solr IndexDeletionPolicy implementation supports
216
			 deleting index commit points on number of commits, age of
217
			 commit point and optimized status.
318 218

  
319
         Setting the value to true will instruct the underlying Lucene
320
         IndexWriter to write its info stream to solr's log. By default,
321
         this is enabled here, and controlled through log4j.properties.
322
      -->
323
     <infoStream>true</infoStream>
324
    
325
    <!--
326
        Use true to enable this safety check, which can help
327
        reduce the risk of propagating index corruption from older segments 
328
        into new ones, at the expense of slower merging.
329
    -->
330
     <checkIntegrityAtMerge>false</checkIntegrityAtMerge>
331
  </indexConfig>
219
			 The latest commit point should always be preserved regardless
220
			 of the criteria.
221
		-->
222
		<!--
223
		<deletionPolicy class="solr.SolrDeletionPolicy">
224
		-->
225
		<!-- The number of commit points to be kept -->
226
		<!-- <str name="maxCommitsToKeep">1</str> -->
227
		<!-- The number of optimized commit points to be kept -->
228
		<!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
229
		<!--
230
			Delete all commit points once they have reached the given age.
231
			Supports DateMathParser syntax e.g.
232
		  -->
233
		<!--
234
		   <str name="maxCommitAge">30MINUTES</str>
235
		   <str name="maxCommitAge">1DAY</str>
236
		-->
237
		<!--
238
		</deletionPolicy>
239
		-->
332 240

  
241
		<!-- Lucene Infostream
333 242

  
334
  <!-- JMX
335
       
336
       This example enables JMX if and only if an existing MBeanServer
337
       is found, use this if you want to configure JMX through JVM
338
       parameters. Remove this to disable exposing Solr configuration
339
       and statistics to JMX.
243
			 To aid in advanced debugging, Lucene provides an "InfoStream"
244
			 of detailed information when indexing.
340 245

  
341
       For more details see http://wiki.apache.org/solr/SolrJmx
342
    -->
343
  <jmx />
344
  <!-- If you want to connect to a particular server, specify the
345
       agentId 
346
    -->
347
  <!-- <jmx agentId="myAgent" /> -->
348
  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
349
  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
350
    -->
246
			 Setting The value to true will instruct the underlying Lucene
247
			 IndexWriter to write its debugging info the specified file
248
		  -->
249
		<!-- <infoStream file="INFOSTREAM.txt">false</infoStream> -->
250
	</indexConfig>
351 251

  
352
  <!-- The default high-performance update handler -->
353
  <updateHandler class="solr.DirectUpdateHandler2">
354 252

  
355
    <!-- Enables a transaction log, used for real-time get, durability, and
356
         and solr cloud replica recovery.  The log can grow as big as
357
         uncommitted changes to the index, so use of a hard autoCommit
358
         is recommended (see below).
359
         "dir" - the target directory for transaction logs, defaults to the
360
                solr data directory.  --> 
361
    <updateLog>
362
      <str name="dir">\${solr.ulog.dir:}</str>
363
    </updateLog>
364
 
365
    <!-- AutoCommit
253
	<!-- JMX
366 254

  
367
         Perform a hard commit automatically under certain conditions.
368
         Instead of enabling autoCommit, consider using "commitWithin"
369
         when adding documents. 
255
		 This example enables JMX if and only if an existing MBeanServer
256
		 is found, use this if you want to configure JMX through JVM
257
		 parameters. Remove this to disable exposing Solr configuration
258
		 and statistics to JMX.
370 259

  
371
         http://wiki.apache.org/solr/UpdateXmlMessages
260
		 For more details see http://wiki.apache.org/solr/SolrJmx
261
	  -->
262
	<jmx />
263
	<!-- If you want to connect to a particular server, specify the
264
		 agentId
265
	  -->
266
	<!-- <jmx agentId="myAgent" /> -->
267
	<!-- If you want to start a new MBeanServer, specify the serviceUrl -->
268
	<!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
269
	  -->
372 270

  
373
         maxDocs - Maximum number of documents to add since the last
374
                   commit before automatically triggering a new commit.
271
	<!-- The default high-performance update handler -->
272
	<updateHandler class="solr.DirectUpdateHandler2">
375 273

  
376
         maxTime - Maximum amount of time in ms that is allowed to pass
377
                   since a document was added before automatically
378
                   triggering a new commit. 
379
         openSearcher - if false, the commit causes recent index changes
380
           to be flushed to stable storage, but does not cause a new
381
           searcher to be opened to make those changes visible.
274
		<!-- Enables a transaction log, used for real-time get, durability, and
275
			 and solr cloud replica recovery.  The log can grow as big as
276
			 uncommitted changes to the index, so use of a hard autoCommit
277
			 is recommended (see below).
278
			 "dir" - the target directory for transaction logs, defaults to the
279
					solr data directory.
280
			 "numVersionBuckets" - sets the number of buckets used to keep
281
					track of max version values when checking for re-ordered
282
					updates; increase this value to reduce the cost of
283
					synchronizing access to version buckets during high-volume
284
					indexing, this requires 8 bytes (long) * numVersionBuckets
285
					of heap space per Solr core.
286
		-->
287
		<updateLog>
288
			<str name="dir">\${solr.ulog.dir:}</str>
289
			<int name="numVersionBuckets">\${solr.ulog.numVersionBuckets:65536}</int>
290
		</updateLog>
382 291

  
383
         If the updateLog is enabled, then it's highly recommended to
384
         have some sort of hard autoCommit to limit the log size.
385
      -->
386
     <autoCommit> 
387
       <maxTime>\${solr.autoCommit.maxTime:$autocommit$}</maxTime> 
388
       <openSearcher>false</openSearcher> 
389
     </autoCommit>
292
		<!-- AutoCommit
390 293

  
391
    <!-- softAutoCommit is like autoCommit except it causes a
392
         'soft' commit which only ensures that changes are visible
393
         but does not ensure that data is synced to disk.  This is
394
         faster and more near-realtime friendly than a hard commit.
395
      -->
294
			 Perform a hard commit automatically under certain conditions.
295
			 Instead of enabling autoCommit, consider using "commitWithin"
296
			 when adding documents.
396 297

  
397
     <autoSoftCommit> 
398
       <maxTime>\${solr.autoSoftCommit.maxTime:$autosoftcommit$}</maxTime> 
399
     </autoSoftCommit>
298
			 http://wiki.apache.org/solr/UpdateXmlMessages
400 299

  
401
    <!-- Update Related Event Listeners
402
         
403
         Various IndexWriter related events can trigger Listeners to
404
         take actions.
300
			 maxDocs - Maximum number of documents to add since the last
301
					   commit before automatically triggering a new commit.
405 302

  
406
         postCommit - fired after every commit or optimize command
407
         postOptimize - fired after every optimize command
408
      -->
409
    <!-- The RunExecutableListener executes an external command from a
410
         hook such as postCommit or postOptimize.
411
         
412
         exe - the name of the executable to run
413
         dir - dir to use as the current working directory. (default=".")
414
         wait - the calling thread waits until the executable returns. 
415
                (default="true")
416
         args - the arguments to pass to the program.  (default is none)
417
         env - environment variables to set.  (default is none)
418
      -->
419
    <!-- This example shows how RunExecutableListener could be used
420
         with the script based replication...
421
         http://wiki.apache.org/solr/CollectionDistribution
422
      -->
423
    <!--
424
       <listener event="postCommit" class="solr.RunExecutableListener">
425
         <str name="exe">solr/bin/snapshooter</str>
426
         <str name="dir">.</str>
427
         <bool name="wait">true</bool>
428
         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
429
         <arr name="env"> <str>MYVAR=val1</str> </arr>
430
       </listener>
431
      -->
303
			 maxTime - Maximum amount of time in ms that is allowed to pass
304
					   since a document was added before automatically
305
					   triggering a new commit.
306
			 openSearcher - if false, the commit causes recent index changes
307
			   to be flushed to stable storage, but does not cause a new
308
			   searcher to be opened to make those changes visible.
432 309

  
433
  </updateHandler>
434
  
435
  <!-- IndexReaderFactory
310
			 If the updateLog is enabled, then it's highly recommended to
311
			 have some sort of hard autoCommit to limit the log size.
312
		  -->
313
		<autoCommit>
314
			<maxTime>\${solr.autoCommit.maxTime:15000}</maxTime>
315
			<openSearcher>false</openSearcher>
316
		</autoCommit>
436 317

  
437
       Use the following format to specify a custom IndexReaderFactory,
438
       which allows for alternate IndexReader implementations.
318
		<!-- softAutoCommit is like autoCommit except it causes a
319
			 'soft' commit which only ensures that changes are visible
320
			 but does not ensure that data is synced to disk.  This is
321
			 faster and more near-realtime friendly than a hard commit.
322
		  -->
439 323

  
440
       ** Experimental Feature **
324
		<autoSoftCommit>
325
			<maxTime>\${solr.autoSoftCommit.maxTime:-1}</maxTime>
326
		</autoSoftCommit>
441 327

  
442
       Please note - Using a custom IndexReaderFactory may prevent
443
       certain other features from working. The API to
444
       IndexReaderFactory may change without warning or may even be
445
       removed from future releases if the problems cannot be
446
       resolved.
328
		<!-- Update Related Event Listeners
447 329

  
330
			 Various IndexWriter related events can trigger Listeners to
331
			 take actions.
448 332

  
449
       ** Features that may not work with custom IndexReaderFactory **
333
			 postCommit - fired after every commit or optimize command
334
			 postOptimize - fired after every optimize command
335
		  -->
336
		<!-- The RunExecutableListener executes an external command from a
337
			 hook such as postCommit or postOptimize.
450 338

  
451
       The ReplicationHandler assumes a disk-resident index. Using a
452
       custom IndexReader implementation may cause incompatibility
453
       with ReplicationHandler and may cause replication to not work
454
       correctly. See SOLR-1366 for details.
339
			 exe - the name of the executable to run
340
			 dir - dir to use as the current working directory. (default=".")
341
			 wait - the calling thread waits until the executable returns.
342
					(default="true")
343
			 args - the arguments to pass to the program.  (default is none)
344
			 env - environment variables to set.  (default is none)
345
		  -->
346
		<!-- This example shows how RunExecutableListener could be used
347
			 with the script based replication...
348
			 http://wiki.apache.org/solr/CollectionDistribution
349
		  -->
350
		<!--
351
		   <listener event="postCommit" class="solr.RunExecutableListener">
352
			 <str name="exe">solr/bin/snapshooter</str>
353
			 <str name="dir">.</str>
354
			 <bool name="wait">true</bool>
355
			 <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
356
			 <arr name="env"> <str>MYVAR=val1</str> </arr>
357
		   </listener>
358
		  -->
455 359

  
456
    -->
457
  <!--
458
  <indexReaderFactory name="IndexReaderFactory" class="package.class">
459
    <str name="someArg">Some Value</str>
460
  </indexReaderFactory >
461
  -->
462
  <!-- By explicitly declaring the Factory, the termIndexDivisor can
463
       be specified.
464
    -->
465
  <!--
466
     <indexReaderFactory name="IndexReaderFactory" 
467
                         class="solr.StandardIndexReaderFactory">
468
       <int name="setTermIndexDivisor">12</int>
469
     </indexReaderFactory >
470
    -->
360
	</updateHandler>
471 361

  
472
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
473
       Query section - these settings control query time things like caches
474
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
475
  <query>
476
    <!-- Max Boolean Clauses
362
	<!-- IndexReaderFactory
477 363

  
478
         Maximum number of clauses in each BooleanQuery,  an exception
479
         is thrown if exceeded.
364
		 Use the following format to specify a custom IndexReaderFactory,
365
		 which allows for alternate IndexReader implementations.
480 366

  
481
         ** WARNING **
482
         
483
         This option actually modifies a global Lucene property that
484
         will affect all SolrCores.  If multiple solrconfig.xml files
485
         disagree on this property, the value at any given moment will
486
         be based on the last SolrCore to be initialized.
487
         
488
      -->
489
    <maxBooleanClauses>1024</maxBooleanClauses>
367
		 ** Experimental Feature **
490 368

  
369
		 Please note - Using a custom IndexReaderFactory may prevent
370
		 certain other features from working. The API to
371
		 IndexReaderFactory may change without warning or may even be
372
		 removed from future releases if the problems cannot be
373
		 resolved.
491 374

  
492
    <!-- Solr Internal Query Caches
493 375

  
494
         There are two implementations of cache available for Solr,
495
         LRUCache, based on a synchronized LinkedHashMap, and
496
         FastLRUCache, based on a ConcurrentHashMap.  
376
		 ** Features that may not work with custom IndexReaderFactory **
497 377

  
498
         FastLRUCache has faster gets and slower puts in single
499
         threaded operation and thus is generally faster than LRUCache
500
         when the hit ratio of the cache is high (> 75%), and may be
501
         faster under other scenarios on multi-cpu systems.
502
    -->
378
		 The ReplicationHandler assumes a disk-resident index. Using a
379
		 custom IndexReader implementation may cause incompatibility
380
		 with ReplicationHandler and may cause replication to not work
381
		 correctly. See SOLR-1366 for details.
503 382

  
504
    <!-- Filter Cache
383
	  -->
384
	<!--
385
	<indexReaderFactory name="IndexReaderFactory" class="package.class">
386
	  <str name="someArg">Some Value</str>
387
	</indexReaderFactory >
388
	-->
505 389

  
506
         Cache used by SolrIndexSearcher for filters (DocSets),
507
         unordered sets of *all* documents that match a query.  When a
508
         new searcher is opened, its caches may be prepopulated or
509
         "autowarmed" using data from caches in the old searcher.
510
         autowarmCount is the number of items to prepopulate.  For
511
         LRUCache, the autowarmed items will be the most recently
512
         accessed items.
390
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
391
		 Query section - these settings control query time things like caches
392
		 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
393
	<query>
394
		<!-- Max Boolean Clauses
513 395

  
514
         Parameters:
515
           class - the SolrCache implementation LRUCache or
516
               (LRUCache or FastLRUCache)
517
           size - the maximum number of entries in the cache
518
           initialSize - the initial capacity (number of entries) of
519
               the cache.  (see java.util.HashMap)
520
           autowarmCount - the number of entries to prepopulate from
521
               and old cache.  
522
      -->
523
    <filterCache class="solr.FastLRUCache"
524
                 size="$filterCacheSize$"
525
                 initialSize="$filterCacheInitialSize$"
526
                 autowarmCount="0"/>
396
			 Maximum number of clauses in each BooleanQuery,  an exception
397
			 is thrown if exceeded.
527 398

  
528
    <!-- Query Result Cache
529
         
530
         Caches results of searches - ordered lists of document ids
531
         (DocList) based on a query, a sort, and the range of documents requested.  
532
      -->
533
    <queryResultCache class="solr.LRUCache"
534
                     size="$queryCacheSize$"
535
                     initialSize="$queryCacheInitialSize$"
536
                     autowarmCount="0"/>
537
   
538
    <!-- Document Cache
399
			 ** WARNING **
539 400

  
540
         Caches Lucene Document objects (the stored fields for each
541
         document).  Since Lucene internal document ids are transient,
542
         this cache will not be autowarmed.  
543
      -->
544
    <documentCache class="solr.LRUCache"
545
                   size="$documentCacheSize$"
546
                   initialSize="$documentCacheInitialSize$"
547
                   autowarmCount="0"/>
548
    
549
    <!-- custom cache currently used by block join --> 
550
    <cache name="perSegFilter"
551
      class="solr.search.LRUCache"
552
      size="10"
553
      initialSize="0"
554
      autowarmCount="10"
555
      regenerator="solr.NoOpRegenerator" />
401
			 This option actually modifies a global Lucene property that
402
			 will affect all SolrCores.  If multiple solrconfig.xml files
403
			 disagree on this property, the value at any given moment will
404
			 be based on the last SolrCore to be initialized.
556 405

  
557
    <!-- Field Value Cache
558
         
559
         Cache used to hold field values that are quickly accessible
560
         by document id.  The fieldValueCache is created by default
561
         even if not configured here.
562
      -->
563
    <!--
564
       <fieldValueCache class="solr.FastLRUCache"
565
                        size="512"
566
                        autowarmCount="128"
567
                        showItems="32" />
568
      -->
406
		  -->
407
		<maxBooleanClauses>1024</maxBooleanClauses>
569 408

  
570
    <!-- Custom Cache
571 409

  
572
         Example of a generic cache.  These caches may be accessed by
573
         name through SolrIndexSearcher.getCache(),cacheLookup(), and
574
         cacheInsert().  The purpose is to enable easy caching of
575
         user/application level data.  The regenerator argument should
576
         be specified as an implementation of solr.CacheRegenerator 
577
         if autowarming is desired.  
578
      -->
579
    <!--
580
       <cache name="myUserCache"
581
              class="solr.LRUCache"
582
              size="4096"
583
              initialSize="1024"
584
              autowarmCount="1024"
585
              regenerator="com.mycompany.MyRegenerator"
586
              />
587
      -->
410
		<!-- Solr Internal Query Caches
588 411

  
412
			 There are two implementations of cache available for Solr,
413
			 LRUCache, based on a synchronized LinkedHashMap, and
414
			 FastLRUCache, based on a ConcurrentHashMap.
589 415

  
590
    <!-- Lazy Field Loading
416
			 FastLRUCache has faster gets and slower puts in single
417
			 threaded operation and thus is generally faster than LRUCache
418
			 when the hit ratio of the cache is high (> 75%), and may be
419
			 faster under other scenarios on multi-cpu systems.
420
		-->
591 421

  
592
         If true, stored fields that are not requested will be loaded
593
         lazily.  This can result in a significant speed improvement
594
         if the usual case is to not load all stored fields,
595
         especially if the skipped fields are large compressed text
596
         fields.
597
    -->
598
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
422
		<!-- Filter Cache
599 423

  
600
   <!-- Use Filter For Sorted Query
424
			 Cache used by SolrIndexSearcher for filters (DocSets),
425
			 unordered sets of *all* documents that match a query.  When a
426
			 new searcher is opened, its caches may be prepopulated or
427
			 "autowarmed" using data from caches in the old searcher.
428
			 autowarmCount is the number of items to prepopulate.  For
429
			 LRUCache, the autowarmed items will be the most recently
430
			 accessed items.
601 431

  
602
        A possible optimization that attempts to use a filter to
603
        satisfy a search.  If the requested sort does not include
604
        score, then the filterCache will be checked for a filter
605
        matching the query. If found, the filter will be used as the
606
        source of document ids, and then the sort will be applied to
607
        that.
432
			 Parameters:
433
			   class - the SolrCache implementation LRUCache or
434
				   (LRUCache or FastLRUCache)
435
			   size - the maximum number of entries in the cache
436
			   initialSize - the initial capacity (number of entries) of
437
				   the cache.  (see java.util.HashMap)
438
			   autowarmCount - the number of entries to prepopulate from
439
				   and old cache.
440
			   maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
441
						  to occupy. Note that when this option is specified, the size
442
						  and initialSize parameters are ignored.
443
		  -->
444
		<filterCache class="solr.FastLRUCache"
445
		             size="512"
446
		             initialSize="512"
447
		             autowarmCount="0"/>
608 448

  
609
        For most situations, this will not be useful unless you
610
        frequently get the same search repeatedly with different sort
611
        options, and none of them ever use "score"
612
     -->
613
   <!--
614
      <useFilterForSortedQuery>true</useFilterForSortedQuery>
615
     -->
449
		<!-- Query Result Cache
616 450

  
617
   <!-- Result Window Size
451
			 Caches results of searches - ordered lists of document ids
452
			 (DocList) based on a query, a sort, and the range of documents requested.
453
			 Additional supported parameter by LRUCache:
454
				maxRamMB - the maximum amount of RAM (in MB) that this cache is allowed
455
						   to occupy
456
		  -->
457
		<queryResultCache class="solr.LRUCache"
458
		                  size="512"
459
		                  initialSize="512"
460
		                  autowarmCount="0"/>
618 461

  
619
        An optimization for use with the queryResultCache.  When a search
620
        is requested, a superset of the requested number of document ids
621
        are collected.  For example, if a search for a particular query
622
        requests matching documents 10 through 19, and queryWindowSize is 50,
623
        then documents 0 through 49 will be collected and cached.  Any further
624
        requests in that range can be satisfied via the cache.  
625
     -->
626
   <queryResultWindowSize>$queryResultWindowSize$</queryResultWindowSize>
462
		<!-- Document Cache
627 463

  
628
   <!-- Maximum number of documents to cache for any entry in the
629
        queryResultCache. 
630
     -->
631
   <queryResultMaxDocsCached>$queryResultMaxDocCached$</queryResultMaxDocsCached>
464
			 Caches Lucene Document objects (the stored fields for each
465
			 document).  Since Lucene internal document ids are transient,
466
			 this cache will not be autowarmed.
467
		  -->
468
		<documentCache class="solr.LRUCache"
469
		               size="512"
470
		               initialSize="512"
471
		               autowarmCount="0"/>
632 472

  
633
   <!-- Query Related Event Listeners
473
		<!-- custom cache currently used by block join -->
474
		<cache name="perSegFilter"
475
		       class="solr.search.LRUCache"
476
		       size="10"
477
		       initialSize="0"
478
		       autowarmCount="10"
479
		       regenerator="solr.NoOpRegenerator" />
634 480

  
635
        Various IndexSearcher related events can trigger Listeners to
636
        take actions.
481
		<!-- Field Value Cache
637 482

  
638
        newSearcher - fired whenever a new searcher is being prepared
639
        and there is a current searcher handling requests (aka
640
        registered).  It can be used to prime certain caches to
641
        prevent long request times for certain requests.
483
			 Cache used to hold field values that are quickly accessible
484
			 by document id.  The fieldValueCache is created by default
485
			 even if not configured here.
486
		  -->
487
		<!--
488
		   <fieldValueCache class="solr.FastLRUCache"
489
							size="512"
490
							autowarmCount="128"
491
							showItems="32" />
492
		  -->
642 493

  
643
        firstSearcher - fired whenever a new searcher is being
644
        prepared but there is no current registered searcher to handle
645
        requests or to gain autowarming data from.
494
		<!-- Custom Cache
646 495

  
647
        
648
     -->
649
    <!-- QuerySenderListener takes an array of NamedList and executes a
650
         local query request for each NamedList in sequence. 
651
      -->
652
    <listener event="newSearcher" class="solr.QuerySenderListener">
653
      <arr name="queries">
654
        <!--
655
           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
656
           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
657
          -->
658
      </arr>
659
    </listener>
660
    <listener event="firstSearcher" class="solr.QuerySenderListener">
661
      <arr name="queries">
662
        <lst>
663
          <str name="q">static firstSearcher warming in solrconfig.xml</str>
664
        </lst>
665
      </arr>
666
    </listener>
496
			 Example of a generic cache.  These caches may be accessed by
497
			 name through SolrIndexSearcher.getCache(),cacheLookup(), and
498
			 cacheInsert().  The purpose is to enable easy caching of
499
			 user/application level data.  The regenerator argument should
500
			 be specified as an implementation of solr.CacheRegenerator
501
			 if autowarming is desired.
502
		  -->
503
		<!--
504
		   <cache name="myUserCache"
505
				  class="solr.LRUCache"
506
				  size="4096"
507
				  initialSize="1024"
508
				  autowarmCount="1024"
509
				  regenerator="com.mycompany.MyRegenerator"
510
				  />
511
		  -->
667 512

  
668
    <!-- Use Cold Searcher
669 513

  
670
         If a search request comes in and there is no current
671
         registered searcher, then immediately register the still
672
         warming searcher and use it.  If "false" then all requests
673
         will block until the first searcher is done warming.
674
      -->
675
    <useColdSearcher>false</useColdSearcher>
514
		<!-- Lazy Field Loading
676 515

  
677
    <!-- Max Warming Searchers
678
         
679
         Maximum number of searchers that may be warming in the
680
         background concurrently.  An error is returned if this limit
681
         is exceeded.
516
			 If true, stored fields that are not requested will be loaded
517
			 lazily.  This can result in a significant speed improvement
518
			 if the usual case is to not load all stored fields,
519
			 especially if the skipped fields are large compressed text
520
			 fields.
521
		-->
522
		<enableLazyFieldLoading>true</enableLazyFieldLoading>
682 523

  
683
         Recommend values of 1-2 for read-only slaves, higher for
684
         masters w/o cache warming.
685
      -->
686
    <maxWarmingSearchers>2</maxWarmingSearchers>
524
		<!-- Use Filter For Sorted Query
687 525

  
688
  </query>
526
			 A possible optimization that attempts to use a filter to
527
			 satisfy a search.  If the requested sort does not include
528
			 score, then the filterCache will be checked for a filter
529
			 matching the query. If found, the filter will be used as the
530
			 source of document ids, and then the sort will be applied to
531
			 that.
689 532

  
533
			 For most situations, this will not be useful unless you
534
			 frequently get the same search repeatedly with different sort
535
			 options, and none of them ever use "score"
536
		  -->
537
		<!--
538
		   <useFilterForSortedQuery>true</useFilterForSortedQuery>
539
		  -->
690 540

  
691
  <!-- Request Dispatcher
541
		<!-- Result Window Size
692 542

  
693
       This section contains instructions for how the SolrDispatchFilter
694
       should behave when processing requests for this SolrCore.
543
			 An optimization for use with the queryResultCache.  When a search
544
			 is requested, a superset of the requested number of document ids
545
			 are collected.  For example, if a search for a particular query
546
			 requests matching documents 10 through 19, and queryWindowSize is 50,
547
			 then documents 0 through 49 will be collected and cached.  Any further
548
			 requests in that range can be satisfied via the cache.
549
		  -->
550
		<queryResultWindowSize>20</queryResultWindowSize>
695 551

  
696
       handleSelect is a legacy option that affects the behavior of requests
697
       such as /select?qt=XXX
552
		<!-- Maximum number of documents to cache for any entry in the
553
			 queryResultCache.
554
		  -->
555
		<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
698 556

  
699
       handleSelect="true" will cause the SolrDispatchFilter to process
700
       the request and dispatch the query to a handler specified by the 
701
       "qt" param, assuming "/select" isn't already registered.
557
		<!-- Query Related Event Listeners
702 558

  
703
       handleSelect="false" will cause the SolrDispatchFilter to
704
       ignore "/select" requests, resulting in a 404 unless a handler
705
       is explicitly registered with the name "/select"
559
			 Various IndexSearcher related events can trigger Listeners to
560
			 take actions.
706 561

  
707
       handleSelect="true" is not recommended for new users, but is the default
708
       for backwards compatibility
709
    -->
710
  <requestDispatcher handleSelect="false" >
711
    <!-- Request Parsing
562
			 newSearcher - fired whenever a new searcher is being prepared
563
			 and there is a current searcher handling requests (aka
564
			 registered).  It can be used to prime certain caches to
565
			 prevent long request times for certain requests.
712 566

  
713
         These settings indicate how Solr Requests may be parsed, and
714
         what restrictions may be placed on the ContentStreams from
715
         those requests
567
			 firstSearcher - fired whenever a new searcher is being
568
			 prepared but there is no current registered searcher to handle
569
			 requests or to gain autowarming data from.
716 570

  
717
         enableRemoteStreaming - enables use of the stream.file
718
         and stream.url parameters for specifying remote streams.
719 571

  
720
         multipartUploadLimitInKB - specifies the max size (in KiB) of
721
         Multipart File Uploads that Solr will allow in a Request.
722
         
723
         formdataUploadLimitInKB - specifies the max size (in KiB) of
724
         form data (application/x-www-form-urlencoded) sent via
725
         POST. You can use POST to pass request parameters not
726
         fitting into the URL.
727
         
728
         addHttpRequestToContext - if set to true, it will instruct
729
         the requestParsers to include the original HttpServletRequest
730
         object in the context map of the SolrQueryRequest under the 
731
         key "httpRequest". It will not be used by any of the existing
732
         Solr components, but may be useful when developing custom 
733
         plugins.
734
         
735
         *** WARNING ***
736
         The settings below authorize Solr to fetch remote files, You
737
         should make sure your system has some authentication before
738
         using enableRemoteStreaming="true"
572
		  -->
573
		<!-- QuerySenderListener takes an array of NamedList and executes a
574
			 local query request for each NamedList in sequence.
575
		  -->
576
		<listener event="newSearcher" class="solr.QuerySenderListener">
577
			<arr name="queries">
578
				<!--
579
				   <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
580
				   <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
581
				  -->
582
			</arr>
583
		</listener>
584
		<listener event="firstSearcher" class="solr.QuerySenderListener">
585
			<arr name="queries">
586
				<!--
587
				<lst>
588
				  <str name="q">static firstSearcher warming in solrconfig.xml</str>
589
				</lst>
590
				-->
591
			</arr>
592
		</listener>
739 593

  
740
      --> 
741
    <requestParsers enableRemoteStreaming="true" 
742
                    multipartUploadLimitInKB="2048000"
743
                    formdataUploadLimitInKB="2048"
744
                    addHttpRequestToContext="false"/>
594
		<!-- Use Cold Searcher
745 595

  
746
    <!-- HTTP Caching
596
			 If a search request comes in and there is no current
597
			 registered searcher, then immediately register the still
598
			 warming searcher and use it.  If "false" then all requests
599
			 will block until the first searcher is done warming.
600
		  -->
601
		<useColdSearcher>false</useColdSearcher>
747 602

  
748
         Set HTTP caching related parameters (for proxy caches and clients).
603
	</query>
749 604

  
750
         The options below instruct Solr not to output any HTTP Caching
751
         related headers
752
      -->
753
    <httpCaching never304="true" />
754
    <!-- If you include a <cacheControl> directive, it will be used to
755
         generate a Cache-Control header (as well as an Expires header
756
         if the value contains "max-age=")
757
         
758
         By default, no Cache-Control header is generated.
759
         
760
         You can use the <cacheControl> option even if you have set
761
         never304="true"
762
      -->
763
    <!--
764
       <httpCaching never304="true" >
765
         <cacheControl>max-age=30, public</cacheControl> 
766
       </httpCaching>
767
      -->
768
    <!-- To enable Solr to respond with automatically generated HTTP
769
         Caching headers, and to response to Cache Validation requests
770
         correctly, set the value of never304="false"
771
         
772
         This will cause Solr to generate Last-Modified and ETag
773
         headers based on the properties of the Index.
774 605

  
775
         The following options can also be specified to affect the
776
         values of these headers...
606
	<!-- Request Dispatcher
777 607

  
778
         lastModFrom - the default value is "openTime" which means the
779
         Last-Modified value (and validation against If-Modified-Since
780
         requests) will all be relative to when the current Searcher
781
         was opened.  You can change it to lastModFrom="dirLastMod" if
782
         you want the value to exactly correspond to when the physical
783
         index was last modified.
608
		 This section contains instructions for how the SolrDispatchFilter
609
		 should behave when processing requests for this SolrCore.
784 610

  
785
         etagSeed="..." is an option you can change to force the ETag
786
         header (and validation against If-None-Match requests) to be
787
         different even if the index has not changed (ie: when making
788
         significant changes to your config file)
611
		 handleSelect is a legacy option that affects the behavior of requests
612
		 such as /select?qt=XXX
789 613

  
790
         (lastModifiedFrom and etagSeed are both ignored if you use
791
         the never304="true" option)
792
      -->
793
    <!--
794
       <httpCaching lastModifiedFrom="openTime"
795
                    etagSeed="Solr">
796
         <cacheControl>max-age=30, public</cacheControl> 
797
       </httpCaching>
798
      -->
799
  </requestDispatcher>
614
		 handleSelect="true" will cause the SolrDispatchFilter to process
615
		 the request and dispatch the query to a handler specified by the
616
		 "qt" param, assuming "/select" isn't already registered.
800 617

  
801
  <!-- Request Handlers 
618
		 handleSelect="false" will cause the SolrDispatchFilter to
619
		 ignore "/select" requests, resulting in a 404 unless a handler
620
		 is explicitly registered with the name "/select"
802 621

  
803
       http://wiki.apache.org/solr/SolrRequestHandler
622
		 handleSelect="true" is not recommended for new users, but is the default
623
		 for backwards compatibility
624
	  -->
625
	<requestDispatcher handleSelect="false" >
626
		<!-- Request Parsing
804 627

  
805
       Incoming queries will be dispatched to a specific handler by name
806
       based on the path specified in the request.
628
			 These settings indicate how Solr Requests may be parsed, and
629
			 what restrictions may be placed on the ContentStreams from
630
			 those requests
807 631

  
808
       Legacy behavior: If the request path uses "/select" but no Request
809
       Handler has that name, and if handleSelect="true" has been specified in
810
       the requestDispatcher, then the Request Handler is dispatched based on
811
       the qt parameter.  Handlers without a leading '/' are accessed this way
812
       like so: http://host/app/[core/]select?qt=name  If no qt is
813
       given, then the requestHandler that declares default="true" will be
814
       used or the one named "standard".
632
			 enableRemoteStreaming - enables use of the stream.file
633
			 and stream.url parameters for specifying remote streams.
815 634

  
816
       If a Request Handler is declared with startup="lazy", then it will
817
       not be initialized until the first request that uses it.
635
			 multipartUploadLimitInKB - specifies the max size (in KiB) of
636
			 Multipart File Uploads that Solr will allow in a Request.
818 637

  
819
    -->
820
  <!-- SearchHandler
638
			 formdataUploadLimitInKB - specifies the max size (in KiB) of
639
			 form data (application/x-www-form-urlencoded) sent via
640
			 POST. You can use POST to pass request parameters not
641
			 fitting into the URL.
821 642

  
822
       http://wiki.apache.org/solr/SearchHandler
643
			 addHttpRequestToContext - if set to true, it will instruct
644
			 the requestParsers to include the original HttpServletRequest
645
			 object in the context map of the SolrQueryRequest under the
646
			 key "httpRequest". It will not be used by any of the existing
647
			 Solr components, but may be useful when developing custom
648
			 plugins.
823 649

  
824
       For processing Search Queries, the primary Request Handler
825
       provided with Solr is "SearchHandler" It delegates to a sequent
826
       of SearchComponents (see below) and supports distributed
827
       queries across multiple shards
828
    -->
829
  <requestHandler name="/select" class="solr.SearchHandler">
830
    <!-- default values for query parameters can be specified, these
831
         will be overridden by parameters in the request
832
      -->
833
     <lst name="defaults">
834
       <str name="echoParams">explicit</str>
835
       <int name="rows">10</int>
836
       <str name="df">__all</str>
837
     </lst>
838
    <!-- In addition to defaults, "appends" params can be specified
839
         to identify values which should be appended to the list of
840
         multi-val params from the query (or the existing "defaults").
841
      -->
842
    <!-- In this example, the param "fq=instock:true" would be appended to
843
         any query time fq params the user may specify, as a mechanism for
844
         partitioning the index, independent of any user selected filtering
845
         that may also be desired (perhaps as a result of faceted searching).
650
			 *** WARNING ***
651
			 The settings below authorize Solr to fetch remote files, You
652
			 should make sure your system has some authentication before
653
			 using enableRemoteStreaming="true"
846 654

  
847
         NOTE: there is *absolutely* nothing a client can do to prevent these
848
         "appends" values from being used, so don't use this mechanism
849
         unless you are sure you always want it.
850
      -->
851
    <!--
852
       <lst name="appends">
853
         <str name="fq">inStock:true</str>
854
       </lst>
855
      -->
856
    <!-- "invariants" are a way of letting the Solr maintainer lock down
857
         the options available to Solr clients.  Any params values
858
         specified here are used regardless of what values may be specified
859
         in either the query, the "defaults", or the "appends" params.
655
		  -->
656
		<requestParsers enableRemoteStreaming="true"
657
		                multipartUploadLimitInKB="2048000"
658
		                formdataUploadLimitInKB="2048"
659
		                addHttpRequestToContext="false"/>
860 660

  
861
         In this example, the facet.field and facet.query params would
862
         be fixed, limiting the facets clients can use.  Faceting is
863
         not turned on by default - but if the client does specify
864
         facet=true in the request, these are the only facets they
865
         will be able to see counts for; regardless of what other
866
         facet.field or facet.query params they may specify.
661
		<!-- HTTP Caching
867 662

  
868
         NOTE: there is *absolutely* nothing a client can do to prevent these
869
         "invariants" values from being used, so don't use this mechanism
870
         unless you are sure you always want it.
871
      -->
872
    <!--
873
       <lst name="invariants">
874
         <str name="facet.field">cat</str>
875
         <str name="facet.field">manu_exact</str>
876
         <str name="facet.query">price:[* TO 500]</str>
877
         <str name="facet.query">price:[500 TO *]</str>
878
       </lst>
879
      -->
880
    <!-- If the default list of SearchComponents is not desired, that
881
         list can either be overridden completely, or components can be
882
         prepended or appended to the default list.  (see below)
883
      -->
884
    <!--
885
       <arr name="components">
886
         <str>nameOfCustomComponent1</str>
887
         <str>nameOfCustomComponent2</str>
888
       </arr>
889
      -->
890
    </requestHandler>
663
			 Set HTTP caching related parameters (for proxy caches and clients).
891 664

  
892
  <!-- A request handler that returns indented JSON by default -->
893
  <requestHandler name="/query" class="solr.SearchHandler">
894
     <lst name="defaults">
895
       <str name="echoParams">explicit</str>
896
       <str name="wt">json</str>
897
       <str name="indent">true</str>
898
       <str name="df">__all</str>
899
     </lst>
900
  </requestHandler>
665
			 The options below instruct Solr not to output any HTTP Caching
666
			 related headers
667
		  -->
668
		<httpCaching never304="true" />
669
		<!-- If you include a <cacheControl> directive, it will be used to
670
			 generate a Cache-Control header (as well as an Expires header
671
			 if the value contains "max-age=")
901 672

  
673
			 By default, no Cache-Control header is generated.
902 674

  
903
  <!-- realtime get handler, guaranteed to return the latest stored fields of
904
       any document, without the need to commit or open a new searcher.  The
905
       current implementation relies on the updateLog feature being enabled.
675
			 You can use the <cacheControl> option even if you have set
676
			 never304="true"
677
		  -->
678
		<!--
679
		   <httpCaching never304="true" >
680
			 <cacheControl>max-age=30, public</cacheControl>
681
		   </httpCaching>
682
		  -->
683
		<!-- To enable Solr to respond with automatically generated HTTP
684
			 Caching headers, and to response to Cache Validation requests
685
			 correctly, set the value of never304="false"
906 686

  
907
       ** WARNING **
908
       Do NOT disable the realtime get handler at /get if you are using
909
       SolrCloud otherwise any leader election will cause a full sync in ALL
910
       replicas for the shard in question. Similarly, a replica recovery will
911
       also always fetch the complete index from the leader because a partial
912
       sync will not be possible in the absence of this handler.
913
  -->
914
  <requestHandler name="/get" class="solr.RealTimeGetHandler">
915
     <lst name="defaults">
916
       <str name="omitHeader">true</str>
917
       <str name="wt">json</str>
918
       <str name="indent">true</str>
919
     </lst>
920
  </requestHandler>
687
			 This will cause Solr to generate Last-Modified and ETag
688
			 headers based on the properties of the Index.
921 689

  
922
 
690
			 The following options can also be specified to affect the
691
			 values of these headers...
923 692

  
693
			 lastModFrom - the default value is "openTime" which means the
694
			 Last-Modified value (and validation against If-Modified-Since
695
			 requests) will all be relative to when the current Searcher
696
			 was opened.  You can change it to lastModFrom="dirLastMod" if
697
			 you want the value to exactly correspond to when the physical
698
			 index was last modified.
924 699

  
700
			 etagSeed="..." is an option you can change to force the ETag
701
			 header (and validation against If-None-Match requests) to be
702
			 different even if the index has not changed (ie: when making
703
			 significant changes to your config file)
925 704

  
926
  <!-- Update Request Handler.  
927
       
928
       http://wiki.apache.org/solr/UpdateXmlMessages
705
			 (lastModifiedFrom and etagSeed are both ignored if you use
706
			 the never304="true" option)
707
		  -->
708
		<!--
709
		   <httpCaching lastModifiedFrom="openTime"
710
						etagSeed="Solr">
711
			 <cacheControl>max-age=30, public</cacheControl>
712
		   </httpCaching>
713
		  -->
714
	</requestDispatcher>
929 715

  
930
       The canonical Request Handler for Modifying the Index through
931
       commands specified using XML, JSON, CSV, or JAVABIN
716
	<!-- Request Handlers
932 717

  
933
       Note: Since solr1.1 requestHandlers requires a valid content
934
       type header if posted in the body. For example, curl now
935
       requires: -H 'Content-type:text/xml; charset=utf-8'
936
       
937
       To override the request content type and force a specific 
938
       Content-type, use the request parameter: 
939
         ?update.contentType=text/csv
940
       
941
       This handler will pick a response format to match the input
942
       if the 'wt' parameter is not explicit
943
    -->
944
  <requestHandler name="/update" class="solr.UpdateRequestHandler">
945
    <!-- See below for information on defining 
946
         updateRequestProcessorChains that can be used by name 
947
         on each Update Request
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff