Project

General

Profile

« Previous | Next » 

Revision 57157

Added by Enrico Ottonello over 4 years ago

solr 772 integration

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/$indexDataDir$</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
      -->
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
269 202

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

  
279
    <!-- Commit Deletion Policy
280
         Custom deletion policies can be specified here. The class must
281
         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>
282 210

  
283
         The default Solr IndexDeletionPolicy implementation supports
284
         deleting index commit points on number of commits, age of
285
         commit point and optimized status.
211
		<!-- Commit Deletion Policy
212
			 Custom deletion policies can be specified here. The class must
213
			 implement org.apache.lucene.index.IndexDeletionPolicy.
286 214

  
287
         The latest commit point should always be preserved regardless
288
         of the criteria.
289
    -->
290
    <!--
291
    <deletionPolicy class="solr.SolrDeletionPolicy">
292
    -->
293
      <!-- The number of commit points to be kept -->
294
      <!-- <str name="maxCommitsToKeep">1</str> -->
295
      <!-- The number of optimized commit points to be kept -->
296
      <!-- <str name="maxOptimizedCommitsToKeep">0</str> -->
297
      <!--
298
          Delete all commit points once they have reached the given age.
299
          Supports DateMathParser syntax e.g.
300
        -->
301
      <!--
302
         <str name="maxCommitAge">30MINUTES</str>
303
         <str name="maxCommitAge">1DAY</str>
304
      -->
305
    <!--
306
    </deletionPolicy>
307
    -->
215
			 The default Solr IndexDeletionPolicy implementation supports
216
			 deleting index commit points on number of commits, age of
217
			 commit point and optimized status.
308 218

  
309
    <!-- Lucene Infostream
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
		-->
310 240

  
311
         To aid in advanced debugging, Lucene provides an "InfoStream"
312
         of detailed information when indexing.
241
		<!-- Lucene Infostream
313 242

  
314
         Setting the value to true will instruct the underlying Lucene
315
         IndexWriter to write its info stream to solr's log. By default,
316
         this is enabled here, and controlled through log4j.properties.
317
      -->
318
     <infoStream>true</infoStream>
243
			 To aid in advanced debugging, Lucene provides an "InfoStream"
244
			 of detailed information when indexing.
319 245

  
320
    <!--
321
        Use true to enable this safety check, which can help
322
        reduce the risk of propagating index corruption from older segments
323
        into new ones, at the expense of slower merging.
324
    -->
325
     <checkIntegrityAtMerge>false</checkIntegrityAtMerge>
326
  </indexConfig>
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>
327 251

  
328 252

  
329
  <!-- JMX
253
	<!-- JMX
330 254

  
331
       This example enables JMX if and only if an existing MBeanServer
332
       is found, use this if you want to configure JMX through JVM
333
       parameters. Remove this to disable exposing Solr configuration
334
       and statistics to JMX.
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.
335 259

  
336
       For more details see http://wiki.apache.org/solr/SolrJmx
337
    -->
338
  <jmx />
339
  <!-- If you want to connect to a particular client, specify the
340
       agentId
341
    -->
342
  <!-- <jmx agentId="myAgent" /> -->
343
  <!-- If you want to start a new MBeanServer, specify the serviceUrl -->
344
  <!-- <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr"/>
345
    -->
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
	  -->
346 270

  
347
  <!-- The default high-performance update handler -->
348
  <updateHandler class="solr.DirectUpdateHandler2">
271
	<!-- The default high-performance update handler -->
272
	<updateHandler class="solr.DirectUpdateHandler2">
349 273

  
350
    <!-- Enables a transaction log, used for real-time get, durability, and
351
         and solr cloud replica recovery.  The log can grow as big as
352
         uncommitted changes to the index, so use of a hard autoCommit
353
         is recommended (see below).
354
         "dir" - the target directory for transaction logs, defaults to the
355
                solr data directory.  -->
356
    <updateLog>
357
      <str name="dir">\${solr.ulog.dir:}</str>
358
    </updateLog>
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>
359 291

  
360
    <!-- AutoCommit
292
		<!-- AutoCommit
361 293

  
362
         Perform a hard commit automatically under certain conditions.
363
         Instead of enabling autoCommit, consider using "commitWithin"
364
         when adding documents.
294
			 Perform a hard commit automatically under certain conditions.
295
			 Instead of enabling autoCommit, consider using "commitWithin"
296
			 when adding documents.
365 297

  
366
         http://wiki.apache.org/solr/UpdateXmlMessages
298
			 http://wiki.apache.org/solr/UpdateXmlMessages
367 299

  
368
         maxDocs - Maximum number of documents to add since the last
369
                   commit before automatically triggering a new commit.
300
			 maxDocs - Maximum number of documents to add since the last
301
					   commit before automatically triggering a new commit.
370 302

  
371
         maxTime - Maximum amount of time in ms that is allowed to pass
372
                   since a document was added before automatically
373
                   triggering a new commit.
374
         openSearcher - if false, the commit causes recent index changes
375
           to be flushed to stable storage, but does not cause a new
376
           searcher to be opened to make those changes visible.
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.
377 309

  
378
         If the updateLog is enabled, then it's highly recommended to
379
         have some sort of hard autoCommit to limit the log size.
380
      -->
381
     <autoCommit>
382
       <maxTime>\${solr.autoCommit.maxTime:$autocommit$}</maxTime>
383
       <openSearcher>false</openSearcher>
384
     </autoCommit>
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>
385 317

  
386
    <!-- softAutoCommit is like autoCommit except it causes a
387
         'soft' commit which only ensures that changes are visible
388
         but does not ensure that data is synced to disk.  This is
389
         faster and more near-realtime friendly than a hard commit.
390
      -->
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
		  -->
391 323

  
392
     <autoSoftCommit>
393
       <maxTime>\${solr.autoSoftCommit.maxTime:$autosoftcommit$}</maxTime>
394
     </autoSoftCommit>
324
		<autoSoftCommit>
325
			<maxTime>\${solr.autoSoftCommit.maxTime:-1}</maxTime>
326
		</autoSoftCommit>
395 327

  
396
    <!-- Update Related Event Listeners
328
		<!-- Update Related Event Listeners
397 329

  
398
         Various IndexWriter related events can trigger Listeners to
399
         take actions.
330
			 Various IndexWriter related events can trigger Listeners to
331
			 take actions.
400 332

  
401
         postCommit - fired after every commit or optimize command
402
         postOptimize - fired after every optimize command
403
      -->
404
    <!-- The RunExecutableListener executes an external command from a
405
         hook such as postCommit or postOptimize.
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.
406 338

  
407
         exe - the name of the executable to run
408
         dir - dir to use as the current working directory. (default=".")
409
         wait - the calling thread waits until the executable returns.
410
                (default="true")
411
         args - the arguments to pass to the program.  (default is none)
412
         env - environment variables to set.  (default is none)
413
      -->
414
    <!-- This example shows how RunExecutableListener could be used
415
         with the script based replication...
416
         http://wiki.apache.org/solr/CollectionDistribution
417
      -->
418
    <!--
419
       <listener event="postCommit" class="solr.RunExecutableListener">
420
         <str name="exe">solr/bin/snapshooter</str>
421
         <str name="dir">.</str>
422
         <bool name="wait">true</bool>
423
         <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
424
         <arr name="env"> <str>MYVAR=val1</str> </arr>
425
       </listener>
426
      -->
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
		  -->
427 359

  
428
  </updateHandler>
360
	</updateHandler>
429 361

  
430
  <!-- IndexReaderFactory
362
	<!-- IndexReaderFactory
431 363

  
432
       Use the following format to specify a custom IndexReaderFactory,
433
       which allows for alternate IndexReader implementations.
364
		 Use the following format to specify a custom IndexReaderFactory,
365
		 which allows for alternate IndexReader implementations.
434 366

  
435
       ** Experimental Feature **
367
		 ** Experimental Feature **
436 368

  
437
       Please note - Using a custom IndexReaderFactory may prevent
438
       certain other features from working. The API to
439
       IndexReaderFactory may change without warning or may even be
440
       removed from future releases if the problems cannot be
441
       resolved.
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.
442 374

  
443 375

  
444
       ** Features that may not work with custom IndexReaderFactory **
376
		 ** Features that may not work with custom IndexReaderFactory **
445 377

  
446
       The ReplicationHandler assumes a disk-resident index. Using a
447
       custom IndexReader implementation may cause incompatibility
448
       with ReplicationHandler and may cause replication to not work
449
       correctly. See SOLR-1366 for details.
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.
450 382

  
451
    -->
452
  <!--
453
  <indexReaderFactory name="IndexReaderFactory" class="package.class">
454
    <str name="someArg">Some Value</str>
455
  </indexReaderFactory >
456
  -->
457
  <!-- By explicitly declaring the Factory, the termIndexDivisor can
458
       be specified.
459
    -->
460
  <!--
461
     <indexReaderFactory name="IndexReaderFactory"
462
                         class="solr.StandardIndexReaderFactory">
463
       <int name="setTermIndexDivisor">12</int>
464
     </indexReaderFactory >
465
    -->
383
	  -->
384
	<!--
385
	<indexReaderFactory name="IndexReaderFactory" class="package.class">
386
	  <str name="someArg">Some Value</str>
387
	</indexReaderFactory >
388
	-->
466 389

  
467
  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
468
       Query section - these settings control query time things like caches
469
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
470
  <query>
471
    <!-- Max Boolean Clauses
390
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
391
		 Query section - these settings control query time things like caches
392
		 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
393
	<query>
394
		<!-- Max Boolean Clauses
472 395

  
473
         Maximum number of clauses in each BooleanQuery,  an exception
474
         is thrown if exceeded.
396
			 Maximum number of clauses in each BooleanQuery,  an exception
397
			 is thrown if exceeded.
475 398

  
476
         ** WARNING **
399
			 ** WARNING **
477 400

  
478
         This option actually modifies a global Lucene property that
479
         will affect all SolrCores.  If multiple solrconfig.xml files
480
         disagree on this property, the value at any given moment will
481
         be based on the last SolrCore to be initialized.
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.
482 405

  
483
      -->
484
    <maxBooleanClauses>1024</maxBooleanClauses>
406
		  -->
407
		<maxBooleanClauses>1024</maxBooleanClauses>
485 408

  
486 409

  
487
    <!-- Solr Internal Query Caches
410
		<!-- Solr Internal Query Caches
488 411

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

  
493
         FastLRUCache has faster gets and slower puts in single
494
         threaded operation and thus is generally faster than LRUCache
495
         when the hit ratio of the cache is high (> 75%), and may be
496
         faster under other scenarios on multi-cpu systems.
497
    -->
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
		-->
498 421

  
499
    <!-- Filter Cache
422
		<!-- Filter Cache
500 423

  
501
         Cache used by SolrIndexSearcher for filters (DocSets),
502
         unordered sets of *all* documents that match a query.  When a
503
         new searcher is opened, its caches may be prepopulated or
504
         "autowarmed" using data from caches in the old searcher.
505
         autowarmCount is the number of items to prepopulate.  For
506
         LRUCache, the autowarmed items will be the most recently
507
         accessed items.
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.
508 431

  
509
         Parameters:
510
           class - the SolrCache implementation LRUCache or
511
               (LRUCache or FastLRUCache)
512
           size - the maximum number of entries in the cache
513
           initialSize - the initial capacity (number of entries) of
514
               the cache.  (see java.util.HashMap)
515
           autowarmCount - the number of entries to prepopulate from
516
               and old cache.
517
      -->
518
    <filterCache class="solr.FastLRUCache"
519
                 size="$filterCacheSize$"
520
                 initialSize="$filterCacheInitialSize$"
521
                 autowarmCount="0"/>
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"/>
522 448

  
523
    <!-- Query Result Cache
449
		<!-- Query Result Cache
524 450

  
525
         Caches results of searches - ordered lists of document ids
526
         (DocList) based on a query, a sort, and the range of documents requested.
527
      -->
528
    <queryResultCache class="solr.LRUCache"
529
                     size="$queryCacheSize$"
530
                     initialSize="$queryCacheInitialSize$"
531
                     autowarmCount="0"/>
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"/>
532 461

  
533
    <!-- Document Cache
462
		<!-- Document Cache
534 463

  
535
         Caches Lucene Document objects (the stored fields for each
536
         document).  Since Lucene internal document ids are transient,
537
         this cache will not be autowarmed.
538
      -->
539
    <documentCache class="solr.LRUCache"
540
                   size="$documentCacheSize$"
541
                   initialSize="$documentCacheInitialSize$"
542
                   autowarmCount="0"/>
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"/>
543 472

  
544
    <!-- custom cache currently used by block join -->
545
    <cache name="perSegFilter"
546
      class="solr.search.LRUCache"
547
      size="10"
548
      initialSize="0"
549
      autowarmCount="10"
550
      regenerator="solr.NoOpRegenerator" />
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" />
551 480

  
552
    <!-- Field Value Cache
481
		<!-- Field Value Cache
553 482

  
554
         Cache used to hold field values that are quickly accessible
555
         by document id.  The fieldValueCache is created by default
556
         even if not configured here.
557
      -->
558
    <!--
559
       <fieldValueCache class="solr.FastLRUCache"
560
                        size="512"
561
                        autowarmCount="128"
562
                        showItems="32" />
563
      -->
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
		  -->
564 493

  
565
    <!-- Custom Cache
494
		<!-- Custom Cache
566 495

  
567
         Example of a generic cache.  These caches may be accessed by
568
         name through SolrIndexSearcher.getCache(),cacheLookup(), and
569
         cacheInsert().  The purpose is to enable easy caching of
570
         user/application level data.  The regenerator argument should
571
         be specified as an implementation of solr.CacheRegenerator
572
         if autowarming is desired.
573
      -->
574
    <!--
575
       <cache name="myUserCache"
576
              class="solr.LRUCache"
577
              size="4096"
578
              initialSize="1024"
579
              autowarmCount="1024"
580
              regenerator="com.mycompany.MyRegenerator"
581
              />
582
      -->
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
		  -->
583 512

  
584 513

  
585
    <!-- Lazy Field Loading
514
		<!-- Lazy Field Loading
586 515

  
587
         If true, stored fields that are not requested will be loaded
588
         lazily.  This can result in a significant speed improvement
589
         if the usual case is to not load all stored fields,
590
         especially if the skipped fields are large compressed text
591
         fields.
592
    -->
593
    <enableLazyFieldLoading>true</enableLazyFieldLoading>
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>
594 523

  
595
   <!-- Use Filter For Sorted Query
524
		<!-- Use Filter For Sorted Query
596 525

  
597
        A possible optimization that attempts to use a filter to
598
        satisfy a search.  If the requested sort does not include
599
        score, then the filterCache will be checked for a filter
600
        matching the query. If found, the filter will be used as the
601
        source of document ids, and then the sort will be applied to
602
        that.
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.
603 532

  
604
        For most situations, this will not be useful unless you
605
        frequently get the same search repeatedly with different sort
606
        options, and none of them ever use "score"
607
     -->
608
   <!--
609
      <useFilterForSortedQuery>true</useFilterForSortedQuery>
610
     -->
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
		  -->
611 540

  
612
   <!-- Result Window Size
541
		<!-- Result Window Size
613 542

  
614
        An optimization for use with the queryResultCache.  When a search
615
        is requested, a superset of the requested number of document ids
616
        are collected.  For example, if a search for a particular query
617
        requests matching documents 10 through 19, and queryWindowSize is 50,
618
        then documents 0 through 49 will be collected and cached.  Any further
619
        requests in that range can be satisfied via the cache.
620
     -->
621
   <queryResultWindowSize>$queryResultWindowSize$</queryResultWindowSize>
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>
622 551

  
623
   <!-- Maximum number of documents to cache for any entry in the
624
        queryResultCache.
625
     -->
626
   <queryResultMaxDocsCached>$queryResultMaxDocCached$</queryResultMaxDocsCached>
552
		<!-- Maximum number of documents to cache for any entry in the
553
			 queryResultCache.
554
		  -->
555
		<queryResultMaxDocsCached>200</queryResultMaxDocsCached>
627 556

  
628
   <!-- Query Related Event Listeners
557
		<!-- Query Related Event Listeners
629 558

  
630
        Various IndexSearcher related events can trigger Listeners to
631
        take actions.
559
			 Various IndexSearcher related events can trigger Listeners to
560
			 take actions.
632 561

  
633
        newSearcher - fired whenever a new searcher is being prepared
634
        and there is a current searcher handling requests (aka
635
        registered).  It can be used to prime certain caches to
636
        prevent long request times for certain requests.
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.
637 566

  
638
        firstSearcher - fired whenever a new searcher is being
639
        prepared but there is no current registered searcher to handle
640
        requests or to gain autowarming data from.
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.
641 570

  
642 571

  
643
     -->
644
    <!-- QuerySenderListener takes an array of NamedList and executes a
645
         local query request for each NamedList in sequence.
646
      -->
647
    <listener event="newSearcher" class="solr.QuerySenderListener">
648
      <arr name="queries">
649
        <!--
650
           <lst><str name="q">solr</str><str name="sort">price asc</str></lst>
651
           <lst><str name="q">rocks</str><str name="sort">weight asc</str></lst>
652
          -->
653
      </arr>
654
    </listener>
655
    <listener event="firstSearcher" class="solr.QuerySenderListener">
656
      <arr name="queries">
657
        <lst>
658
          <str name="q">static firstSearcher warming in solrconfig.xml</str>
659
        </lst>
660
      </arr>
661
    </listener>
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>
662 593

  
663
    <!-- Use Cold Searcher
594
		<!-- Use Cold Searcher
664 595

  
665
         If a search request comes in and there is no current
666
         registered searcher, then immediately register the still
667
         warming searcher and use it.  If "false" then all requests
668
         will block until the first searcher is done warming.
669
      -->
670
    <useColdSearcher>false</useColdSearcher>
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>
671 602

  
672
    <!-- Max Warming Searchers
603
	</query>
673 604

  
674
         Maximum number of searchers that may be warming in the
675
         background concurrently.  An error is returned if this limit
676
         is exceeded.
677 605

  
678
         Recommend values of 1-2 for read-only slaves, higher for
679
         masters w/o cache warming.
680
      -->
681
    <maxWarmingSearchers>2</maxWarmingSearchers>
606
	<!-- Request Dispatcher
682 607

  
683
  </query>
608
		 This section contains instructions for how the SolrDispatchFilter
609
		 should behave when processing requests for this SolrCore.
684 610

  
611
		 handleSelect is a legacy option that affects the behavior of requests
612
		 such as /select?qt=XXX
685 613

  
686
  <!-- Request Dispatcher
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.
687 617

  
688
       This section contains instructions for how the SolrDispatchFilter
689
       should behave when processing requests for this SolrCore.
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"
690 621

  
691
       handleSelect is a legacy option that affects the behavior of requests
692
       such as /select?qt=XXX
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
693 627

  
694
       handleSelect="true" will cause the SolrDispatchFilter to process
695
       the request and dispatch the query to a handler specified by the
696
       "qt" param, assuming "/select" isn't already registered.
628
			 These settings indicate how Solr Requests may be parsed, and
629
			 what restrictions may be placed on the ContentStreams from
630
			 those requests
697 631

  
698
       handleSelect="false" will cause the SolrDispatchFilter to
699
       ignore "/select" requests, resulting in a 404 unless a handler
700
       is explicitly registered with the name "/select"
632
			 enableRemoteStreaming - enables use of the stream.file
633
			 and stream.url parameters for specifying remote streams.
701 634

  
702
       handleSelect="true" is not recommended for new users, but is the default
703
       for backwards compatibility
704
    -->
705
  <requestDispatcher handleSelect="false" >
706
    <!-- Request Parsing
635
			 multipartUploadLimitInKB - specifies the max size (in KiB) of
636
			 Multipart File Uploads that Solr will allow in a Request.
707 637

  
708
         These settings indicate how Solr Requests may be parsed, and
709
         what restrictions may be placed on the ContentStreams from
710
         those requests
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.
711 642

  
712
         enableRemoteStreaming - enables use of the stream.file
713
         and stream.url parameters for specifying remote streams.
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.
714 649

  
715
         multipartUploadLimitInKB - specifies the max size (in KiB) of
716
         Multipart File Uploads that Solr will allow in a Request.
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"
717 654

  
718
         formdataUploadLimitInKB - specifies the max size (in KiB) of
719
         form data (application/x-www-form-urlencoded) sent via
720
         POST. You can use POST to pass request parameters not
721
         fitting into the URL.
655
		  -->
656
		<requestParsers enableRemoteStreaming="true"
657
		                multipartUploadLimitInKB="2048000"
658
		                formdataUploadLimitInKB="2048"
659
		                addHttpRequestToContext="false"/>
722 660

  
723
         addHttpRequestToContext - if set to true, it will instruct
724
         the requestParsers to include the original HttpServletRequest
725
         object in the context map of the SolrQueryRequest under the
726
         key "httpRequest". It will not be used by any of the existing
727
         Solr components, but may be useful when developing custom
728
         plugins.
661
		<!-- HTTP Caching
729 662

  
730
         *** WARNING ***
731
         The settings below authorize Solr to fetch remote files, You
732
         should make sure your system has some authentication before
733
         using enableRemoteStreaming="true"
663
			 Set HTTP caching related parameters (for proxy caches and clients).
734 664

  
735
      -->
736
    <requestParsers enableRemoteStreaming="true"
737
                    multipartUploadLimitInKB="2048000"
738
                    formdataUploadLimitInKB="2048"
739
                    addHttpRequestToContext="false"/>
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=")
740 672

  
741
    <!-- HTTP Caching
673
			 By default, no Cache-Control header is generated.
742 674

  
743
         Set HTTP caching related parameters (for proxy caches and clients).
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"
744 686

  
745
         The options below instruct Solr not to output any HTTP Caching
746
         related headers
747
      -->
748
    <httpCaching never304="true" />
749
    <!-- If you include a <cacheControl> directive, it will be used to
750
         generate a Cache-Control header (as well as an Expires header
751
         if the value contains "max-age=")
687
			 This will cause Solr to generate Last-Modified and ETag
688
			 headers based on the properties of the Index.
752 689

  
753
         By default, no Cache-Control header is generated.
690
			 The following options can also be specified to affect the
691
			 values of these headers...
754 692

  
755
         You can use the <cacheControl> option even if you have set
756
         never304="true"
757
      -->
758
    <!--
759
       <httpCaching never304="true" >
760
         <cacheControl>max-age=30, public</cacheControl>
761
       </httpCaching>
762
      -->
763
    <!-- To enable Solr to respond with automatically generated HTTP
764
         Caching headers, and to response to Cache Validation requests
765
         correctly, set the value of never304="false"
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.
766 699

  
767
         This will cause Solr to generate Last-Modified and ETag
768
         headers based on the properties of the Index.
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)
769 704

  
770
         The following options can also be specified to affect the
771
         values of these headers...
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>
772 715

  
773
         lastModFrom - the default value is "openTime" which means the
774
         Last-Modified value (and validation against If-Modified-Since
775
         requests) will all be relative to when the current Searcher
776
         was opened.  You can change it to lastModFrom="dirLastMod" if
777
         you want the value to exactly correspond to when the physical
778
         index was last modified.
716
	<!-- Request Handlers
779 717

  
780
         etagSeed="..." is an option you can change to force the ETag
781
         header (and validation against If-None-Match requests) to be
782
         different even if the index has not changed (ie: when making
783
         significant changes to your config file)
718
		 http://wiki.apache.org/solr/SolrRequestHandler
784 719

  
785
         (lastModifiedFrom and etagSeed are both ignored if you use
786
         the never304="true" option)
787
      -->
788
    <!--
789
       <httpCaching lastModifiedFrom="openTime"
790
                    etagSeed="Solr">
791
         <cacheControl>max-age=30, public</cacheControl>
792
       </httpCaching>
793
      -->
794
  </requestDispatcher>
720
		 Incoming queries will be dispatched to a specific handler by name
721
		 based on the path specified in the request.
795 722

  
796
  <!-- Request Handlers
723
		 Legacy behavior: If the request path uses "/select" but no Request
724
		 Handler has that name, and if handleSelect="true" has been specified in
725
		 the requestDispatcher, then the Request Handler is dispatched based on
726
		 the qt parameter.  Handlers without a leading '/' are accessed this way
727
		 like so: http://host/app/[core/]select?qt=name  If no qt is
728
		 given, then the requestHandler that declares default="true" will be
729
		 used or the one named "standard".
797 730

  
798
       http://wiki.apache.org/solr/SolrRequestHandler
731
		 If a Request Handler is declared with startup="lazy", then it will
732
		 not be initialized until the first request that uses it.
799 733

  
800
       Incoming queries will be dispatched to a specific handler by name
801
       based on the path specified in the request.
734
	  -->
735
	<!-- SearchHandler
802 736

  
803
       Legacy behavior: If the request path uses "/select" but no Request
804
       Handler has that name, and if handleSelect="true" has been specified in
805
       the requestDispatcher, then the Request Handler is dispatched based on
806
       the qt parameter.  Handlers without a leading '/' are accessed this way
807
       like so: http://host/app/[core/]select?qt=name  If no qt is
808
       given, then the requestHandler that declares default="true" will be
809
       used or the one named "standard".
737
		 http://wiki.apache.org/solr/SearchHandler
810 738

  
811
       If a Request Handler is declared with startup="lazy", then it will
812
       not be initialized until the first request that uses it.
739
		 For processing Search Queries, the primary Request Handler
740
		 provided with Solr is "SearchHandler" It delegates to a sequent
741
		 of SearchComponents (see below) and supports distributed
742
		 queries across multiple shards
743
	  -->
744
	<requestHandler name="/select" class="solr.SearchHandler">
745
		<!-- default values for query parameters can be specified, these
746
			 will be overridden by parameters in the request
747
		  -->
748
		<lst name="defaults">
749
			<str name="echoParams">explicit</str>
750
			<str name="q.op">AND</str>
751
			<int name="rows">10</int>
752
			<!-- <str name="df">text</str> -->
753
		</lst>
754
		<!-- In addition to defaults, "appends" params can be specified
755
			 to identify values which should be appended to the list of
756
			 multi-val params from the query (or the existing "defaults").
757
		  -->
758
		<!-- In this example, the param "fq=instock:true" would be appended to
759
			 any query time fq params the user may specify, as a mechanism for
760
			 partitioning the index, independent of any user selected filtering
761
			 that may also be desired (perhaps as a result of faceted searching).
813 762

  
814
    -->
815
  <!-- SearchHandler
763
			 NOTE: there is *absolutely* nothing a client can do to prevent these
764
			 "appends" values from being used, so don't use this mechanism
765
			 unless you are sure you always want it.
766
		  -->
767
		<!--
768
		   <lst name="appends">
769
			 <str name="fq">inStock:true</str>
770
		   </lst>
771
		  -->
772
		<!-- "invariants" are a way of letting the Solr maintainer lock down
773
			 the options available to Solr clients.  Any params values
774
			 specified here are used regardless of what values may be specified
775
			 in either the query, the "defaults", or the "appends" params.
816 776

  
817
       http://wiki.apache.org/solr/SearchHandler
777
			 In this example, the facet.field and facet.query params would
778
			 be fixed, limiting the facets clients can use.  Faceting is
779
			 not turned on by default - but if the client does specify
780
			 facet=true in the request, these are the only facets they
781
			 will be able to see counts for; regardless of what other
782
			 facet.field or facet.query params they may specify.
818 783

  
819
       For processing Search Queries, the primary Request Handler
820
       provided with Solr is "SearchHandler" It delegates to a sequent
821
       of SearchComponents (see below) and supports distributed
822
       queries across multiple shards
823
    -->
824
  <requestHandler name="/select" class="solr.SearchHandler">
825
    <!-- default values for query parameters can be specified, these
826
         will be overridden by parameters in the request
827
      -->
828
     <lst name="defaults">
829
       <str name="echoParams">explicit</str>
830
       <int name="rows">10</int>
831
       <str name="df">__all</str>
832
     </lst>
833
    <!-- In addition to defaults, "appends" params can be specified
834
         to identify values which should be appended to the list of
835
         multi-val params from the query (or the existing "defaults").
836
      -->
837
    <!-- In this example, the param "fq=instock:true" would be appended to
838
         any query time fq params the user may specify, as a mechanism for
839
         partitioning the index, independent of any user selected filtering
840
         that may also be desired (perhaps as a result of faceted searching).
784
			 NOTE: there is *absolutely* nothing a client can do to prevent these
785
			 "invariants" values from being used, so don't use this mechanism
786
			 unless you are sure you always want it.
787
		  -->
788
		<!--
789
		   <lst name="invariants">
790
			 <str name="facet.field">cat</str>
791
			 <str name="facet.field">manu_exact</str>
792
			 <str name="facet.query">price:[* TO 500]</str>
793
			 <str name="facet.query">price:[500 TO *]</str>
794
		   </lst>
795
		  -->
796
		<!-- If the default list of SearchComponents is not desired, that
797
			 list can either be overridden completely, or components can be
798
			 prepended or appended to the default list.  (see below)
799
		  -->
800
		<!--
801
		   <arr name="components">
802
			 <str>nameOfCustomComponent1</str>
803
			 <str>nameOfCustomComponent2</str>
804
		   </arr>
805
		  -->
806
	</requestHandler>
841 807

  
842
         NOTE: there is *absolutely* nothing a client can do to prevent these
843
         "appends" values from being used, so don't use this mechanism
844
         unless you are sure you always want it.
845
      -->
846
    <!--
847
       <lst name="appends">
848
         <str name="fq">inStock:true</str>
849
       </lst>
850
      -->
851
    <!-- "invariants" are a way of letting the Solr maintainer lock down
852
         the options available to Solr clients.  Any params values
853
         specified here are used regardless of what values may be specified
854
         in either the query, the "defaults", or the "appends" params.
808
	<!-- A request handler that returns indented JSON by default -->
809
	<requestHandler name="/query" class="solr.SearchHandler">
810
		<lst name="defaults">
811
			<str name="echoParams">explicit</str>
812
			<str name="wt">json</str>
813
			<str name="indent">true</str>
814
		</lst>
815
	</requestHandler>
855 816

  
856
         In this example, the facet.field and facet.query params would
857
         be fixed, limiting the facets clients can use.  Faceting is
858
         not turned on by default - but if the client does specify
859
         facet=true in the request, these are the only facets they
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff