Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!--
3
 Licensed to the Apache Software Foundation (ASF) under one or more
4
 contributor license agreements.  See the NOTICE file distributed with
5
 this work for additional information regarding copyright ownership.
6
 The ASF licenses this file to You under the Apache License, Version 2.0
7
 (the "License"); you may not use this file except in compliance with
8
 the License.  You may obtain a copy of the License at
9

    
10
     http://www.apache.org/licenses/LICENSE-2.0
11

    
12
 Unless required by applicable law or agreed to in writing, software
13
 distributed under the License is distributed on an "AS IS" BASIS,
14
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 See the License for the specific language governing permissions and
16
 limitations under the License.
17
-->
18

    
19
<!-- 
20
     For more details about configurations options that may appear in
21
     this file, see http://wiki.apache.org/solr/SolrConfigXml. 
22
-->
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)
27

    
28
       You may also specify a fully qualified Java classname if you
29
       have your own custom plugins.
30
    -->
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>
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...).
44

    
45
       All directories and paths are resolved relative to the
46
       instanceDir.
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.
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
    -->
60

    
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.
64

    
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.
68

    
69
       If a 'dir' option (with or without a regex) is used and nothing
70
       is found that matches, a warning will be logged.
71

    
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" />
76

    
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
86

    
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>
93

    
94

    
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.
102

    
103
       One can force a particular implementation via solr.MMapDirectoryFactory,
104
       solr.NIOFSDirectoryFactory, or solr.SimpleFSDirectoryFactory.
105

    
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> 
127

    
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"/>
138

    
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

    
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"/>
160

    
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>  -->
175

    
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> 
181

    
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> -->
186

    
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>
200

    
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
    
225

    
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
       -->
235

    
236
    <!-- LockFactory 
237

    
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
248

    
249
         Defaults: 'native' is default for Solr3.6 and later, otherwise
250
                   'simple' is the default
251

    
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>
256

    
257
    <!-- Unlock On Startup
258

    
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".
263

    
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>
274

    
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
      -->
283

    
284
    <!-- Commit Deletion Policy
285
         Custom deletion policies can be specified here. The class must
286
         implement org.apache.lucene.index.IndexDeletionPolicy.
287

    
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
    -->
313

    
314
    <!-- Lucene Infostream
315
       
316
         To aid in advanced debugging, Lucene provides an "InfoStream"
317
         of detailed information when indexing.
318

    
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>
332

    
333

    
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.
340

    
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
    -->
351

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

    
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
366

    
367
         Perform a hard commit automatically under certain conditions.
368
         Instead of enabling autoCommit, consider using "commitWithin"
369
         when adding documents. 
370

    
371
         http://wiki.apache.org/solr/UpdateXmlMessages
372

    
373
         maxDocs - Maximum number of documents to add since the last
374
                   commit before automatically triggering a new commit.
375

    
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.
382

    
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>
390

    
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
      -->
396

    
397
     <autoSoftCommit> 
398
       <maxTime>\${solr.autoSoftCommit.maxTime:$autosoftcommit$}</maxTime> 
399
     </autoSoftCommit>
400

    
401
    <!-- Update Related Event Listeners
402
         
403
         Various IndexWriter related events can trigger Listeners to
404
         take actions.
405

    
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
      -->
432

    
433
  </updateHandler>
434
  
435
  <!-- IndexReaderFactory
436

    
437
       Use the following format to specify a custom IndexReaderFactory,
438
       which allows for alternate IndexReader implementations.
439

    
440
       ** Experimental Feature **
441

    
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.
447

    
448

    
449
       ** Features that may not work with custom IndexReaderFactory **
450

    
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.
455

    
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
    -->
471

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

    
478
         Maximum number of clauses in each BooleanQuery,  an exception
479
         is thrown if exceeded.
480

    
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>
490

    
491

    
492
    <!-- Solr Internal Query Caches
493

    
494
         There are two implementations of cache available for Solr,
495
         LRUCache, based on a synchronized LinkedHashMap, and
496
         FastLRUCache, based on a ConcurrentHashMap.  
497

    
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
    -->
503

    
504
    <!-- Filter Cache
505

    
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.
513

    
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"/>
527

    
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
539

    
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" />
556

    
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
      -->
569

    
570
    <!-- Custom Cache
571

    
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
      -->
588

    
589

    
590
    <!-- Lazy Field Loading
591

    
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>
599

    
600
   <!-- Use Filter For Sorted Query
601

    
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.
608

    
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
     -->
616

    
617
   <!-- Result Window Size
618

    
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>
627

    
628
   <!-- Maximum number of documents to cache for any entry in the
629
        queryResultCache. 
630
     -->
631
   <queryResultMaxDocsCached>$queryResultMaxDocCached$</queryResultMaxDocsCached>
632

    
633
   <!-- Query Related Event Listeners
634

    
635
        Various IndexSearcher related events can trigger Listeners to
636
        take actions.
637

    
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.
642

    
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.
646

    
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>
667

    
668
    <!-- Use Cold Searcher
669

    
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>
676

    
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.
682

    
683
         Recommend values of 1-2 for read-only slaves, higher for
684
         masters w/o cache warming.
685
      -->
686
    <maxWarmingSearchers>2</maxWarmingSearchers>
687

    
688
  </query>
689

    
690

    
691
  <!-- Request Dispatcher
692

    
693
       This section contains instructions for how the SolrDispatchFilter
694
       should behave when processing requests for this SolrCore.
695

    
696
       handleSelect is a legacy option that affects the behavior of requests
697
       such as /select?qt=XXX
698

    
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.
702

    
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"
706

    
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
712

    
713
         These settings indicate how Solr Requests may be parsed, and
714
         what restrictions may be placed on the ContentStreams from
715
         those requests
716

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

    
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"
739

    
740
      --> 
741
    <requestParsers enableRemoteStreaming="true" 
742
                    multipartUploadLimitInKB="2048000"
743
                    formdataUploadLimitInKB="2048"
744
                    addHttpRequestToContext="false"/>
745

    
746
    <!-- HTTP Caching
747

    
748
         Set HTTP caching related parameters (for proxy caches and clients).
749

    
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

    
775
         The following options can also be specified to affect the
776
         values of these headers...
777

    
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.
784

    
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)
789

    
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>
800

    
801
  <!-- Request Handlers 
802

    
803
       http://wiki.apache.org/solr/SolrRequestHandler
804

    
805
       Incoming queries will be dispatched to a specific handler by name
806
       based on the path specified in the request.
807

    
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".
815

    
816
       If a Request Handler is declared with startup="lazy", then it will
817
       not be initialized until the first request that uses it.
818

    
819
    -->
820
  <!-- SearchHandler
821

    
822
       http://wiki.apache.org/solr/SearchHandler
823

    
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).
846

    
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.
860

    
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.
867

    
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>
891

    
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>
901

    
902

    
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.
906

    
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>
921

    
922
 
923

    
924

    
925

    
926
  <!-- Update Request Handler.  
927
       
928
       http://wiki.apache.org/solr/UpdateXmlMessages
929

    
930
       The canonical Request Handler for Modifying the Index through
931
       commands specified using XML, JSON, CSV, or JAVABIN
932

    
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
948
      -->
949
    <!--
950
       <lst name="defaults">
951
         <str name="update.chain">dedupe</str>
952
       </lst>
953
       -->
954
  </requestHandler>
955

    
956
  <!-- for back compat with clients using /update/json and /update/csv -->  
957
  <requestHandler name="/update/json" class="solr.UpdateRequestHandler">
958
        <lst name="defaults">
959
         <str name="stream.contentType">application/json</str>
960
       </lst>
961
  </requestHandler>
962
  <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
963
        <lst name="defaults">
964
         <str name="stream.contentType">application/csv</str>
965
       </lst>
966
  </requestHandler>
967

    
968
  <!-- Solr Cell Update Request Handler
969

    
970
       http://wiki.apache.org/solr/ExtractingRequestHandler 
971

    
972
    -->
973
  <requestHandler name="/update/extract" 
974
                  startup="lazy"
975
                  class="solr.extraction.ExtractingRequestHandler" >
976
    <lst name="defaults">
977
      <str name="lowernames">true</str>
978
      <str name="uprefix">ignored_</str>
979

    
980
      <!-- capture link hrefs but ignore div attributes -->
981
      <str name="captureAttr">true</str>
982
      <str name="fmap.a">links</str>
983
      <str name="fmap.div">ignored_</str>
984
    </lst>
985
  </requestHandler>
986

    
987

    
988
  <!-- Field Analysis Request Handler
989

    
990
       RequestHandler that provides much the same functionality as
991
       analysis.jsp. Provides the ability to specify multiple field
992
       types and field names in the same request and outputs
993
       index-time and query-time analysis for each of them.
994

    
995
       Request parameters are:
996
       analysis.fieldname - field name whose analyzers are to be used
997

    
998
       analysis.fieldtype - field type whose analyzers are to be used
999
       analysis.fieldvalue - text for index-time analysis
1000
       q (or analysis.q) - text for query time analysis
1001
       analysis.showmatch (true|false) - When set to true and when
1002
           query analysis is performed, the produced tokens of the
1003
           field value analysis will be marked as "matched" for every
1004
           token that is produces by the query analysis
1005
   -->
1006
  <requestHandler name="/analysis/field" 
1007
                  startup="lazy"
1008
                  class="solr.FieldAnalysisRequestHandler" />
1009

    
1010

    
1011
  <!-- Document Analysis Handler
1012

    
1013
       http://wiki.apache.org/solr/AnalysisRequestHandler
1014

    
1015
       An analysis handler that provides a breakdown of the analysis
1016
       process of provided documents. This handler expects a (single)
1017
       content stream with the following format:
1018

    
1019
       <docs>
1020
         <doc>
1021
           <field name="id">1</field>
1022
           <field name="name">The Name</field>
1023
           <field name="text">The Text Value</field>
1024
         </doc>
1025
         <doc>...</doc>
1026
         <doc>...</doc>
1027
         ...
1028
       </docs>
1029

    
1030
    Note: Each document must contain a field which serves as the
1031
    unique key. This key is used in the returned response to associate
1032
    an analysis breakdown to the analyzed document.
1033

    
1034
    Like the FieldAnalysisRequestHandler, this handler also supports
1035
    query analysis by sending either an "analysis.query" or "q"
1036
    request parameter that holds the query text to be analyzed. It
1037
    also supports the "analysis.showmatch" parameter which when set to
1038
    true, all field tokens that match the query tokens will be marked
1039
    as a "match". 
1040
  -->
1041
  <requestHandler name="/analysis/document" 
1042
                  class="solr.DocumentAnalysisRequestHandler" 
1043
                  startup="lazy" />
1044

    
1045
  <!-- Admin Handlers
1046

    
1047
       Admin Handlers - This will register all the standard admin
1048
       RequestHandlers.  
1049
    -->
1050
  <requestHandler name="/admin/" 
1051
                  class="solr.admin.AdminHandlers" />
1052
  <!-- This single handler is equivalent to the following... -->
1053
  <!--
1054
     <requestHandler name="/admin/luke"       class="solr.admin.LukeRequestHandler" />
1055
     <requestHandler name="/admin/system"     class="solr.admin.SystemInfoHandler" />
1056
     <requestHandler name="/admin/plugins"    class="solr.admin.PluginInfoHandler" />
1057
     <requestHandler name="/admin/threads"    class="solr.admin.ThreadDumpHandler" />
1058
     <requestHandler name="/admin/properties" class="solr.admin.PropertiesRequestHandler" />
1059
     <requestHandler name="/admin/file"       class="solr.admin.ShowFileRequestHandler" >
1060
    -->
1061
  <!-- If you wish to hide files under \${solr.home}/conf, explicitly
1062
       register the ShowFileRequestHandler using the definition below. 
1063
       NOTE: The glob pattern ('*') is the only pattern supported at present, *.xml will
1064
             not exclude all files ending in '.xml'. Use it to exclude _all_ updates
1065
    -->
1066
  <!--
1067
     <requestHandler name="/admin/file" 
1068
                     class="solr.admin.ShowFileRequestHandler" >
1069
       <lst name="invariants">
1070
         <str name="hidden">synonyms.txt</str> 
1071
         <str name="hidden">anotherfile.txt</str> 
1072
         <str name="hidden">*</str> 
1073
       </lst>
1074
     </requestHandler>
1075
    -->
1076

    
1077
  <!-- ping/healthcheck -->
1078
  <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
1079
    <lst name="invariants">
1080
      <str name="q">solrpingquery</str>
1081
    </lst>
1082
    <lst name="defaults">
1083
      <str name="echoParams">all</str>
1084
    </lst>
1085
    <!-- An optional feature of the PingRequestHandler is to configure the 
1086
         handler with a "healthcheckFile" which can be used to enable/disable 
1087
         the PingRequestHandler.
1088
         relative paths are resolved against the data dir 
1089
      -->
1090
    <!-- <str name="healthcheckFile">server-enabled.txt</str> -->
1091
  </requestHandler>
1092

    
1093
  <!-- Echo the request contents back to the client -->
1094
  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
1095
    <lst name="defaults">
1096
     <str name="echoParams">explicit</str> 
1097
     <str name="echoHandler">true</str>
1098
    </lst>
1099
  </requestHandler>
1100
  
1101
  <!-- Solr Replication
1102

    
1103
       The SolrReplicationHandler supports replicating indexes from a
1104
       "master" used for indexing and "slaves" used for queries.
1105

    
1106
       http://wiki.apache.org/solr/SolrReplication 
1107

    
1108
       It is also necessary for SolrCloud to function (in Cloud mode, the
1109
       replication handler is used to bulk transfer segments when nodes 
1110
       are added or need to recover).
1111

    
1112
       https://wiki.apache.org/solr/SolrCloud/
1113
    -->
1114
  <requestHandler name="/replication" class="solr.ReplicationHandler" > 
1115
    <!--
1116
       To enable simple master/slave replication, uncomment one of the 
1117
       sections below, depending on whether this solr instance should be
1118
       the "master" or a "slave".  If this instance is a "slave" you will 
1119
       also need to fill in the masterUrl to point to a real machine.
1120
    -->
1121
    <!--
1122
       <lst name="master">
1123
         <str name="replicateAfter">commit</str>
1124
         <str name="replicateAfter">startup</str>
1125
         <str name="confFiles">schema.xml,stopwords.txt</str>
1126
       </lst>
1127
    -->
1128
    <!--
1129
       <lst name="slave">
1130
         <str name="masterUrl">http://your-master-hostname:8983/solr</str>
1131
         <str name="pollInterval">00:00:60</str>
1132
       </lst>
1133
    -->
1134
  </requestHandler>
1135

    
1136
  <!-- Search Components
1137

    
1138
       Search components are registered to SolrCore and used by 
1139
       instances of SearchHandler (which can access them by name)
1140
       
1141
       By default, the following components are available:
1142
       
1143
       <searchComponent name="query"     class="solr.QueryComponent" />
1144
       <searchComponent name="facet"     class="solr.FacetComponent" />
1145
       <searchComponent name="mlt"       class="solr.MoreLikeThisComponent" />
1146
       <searchComponent name="highlight" class="solr.HighlightComponent" />
1147
       <searchComponent name="stats"     class="solr.StatsComponent" />
1148
       <searchComponent name="debug"     class="solr.DebugComponent" />
1149
   
1150
       Default configuration in a requestHandler would look like:
1151

    
1152
       <arr name="components">
1153
         <str>query</str>
1154
         <str>facet</str>
1155
         <str>mlt</str>
1156
         <str>highlight</str>
1157
         <str>stats</str>
1158
         <str>debug</str>
1159
       </arr>
1160

    
1161
       If you register a searchComponent to one of the standard names, 
1162
       that will be used instead of the default.
1163

    
1164
       To insert components before or after the 'standard' components, use:
1165
    
1166
       <arr name="first-components">
1167
         <str>myFirstComponentName</str>
1168
       </arr>
1169
    
1170
       <arr name="last-components">
1171
         <str>myLastComponentName</str>
1172
       </arr>
1173

    
1174
       NOTE: The component registered with the name "debug" will
1175
       always be executed after the "last-components" 
1176
       
1177
     -->
1178
  
1179
   <!-- Spell Check
1180

    
1181
        The spell check component can return a list of alternative spelling
1182
        suggestions.  
1183

    
1184
        http://wiki.apache.org/solr/SpellCheckComponent
1185
     -->
1186
  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
1187

    
1188
    <str name="queryAnalyzerFieldType">text_general</str>
1189

    
1190
    <!-- Multiple "Spell Checkers" can be declared and used by this
1191
         component
1192
      -->
1193

    
1194
    <!-- a spellchecker built from a field of the main index -->
1195
    <lst name="spellchecker">
1196
      <str name="name">default</str>
1197
      <str name="field">__all</str>
1198
      <str name="classname">solr.DirectSolrSpellChecker</str>
1199
      <!-- the spellcheck distance measure used, the default is the internal levenshtein -->
1200
      <str name="distanceMeasure">internal</str>
1201
      <!-- minimum accuracy needed to be considered a valid spellcheck suggestion -->
1202
      <float name="accuracy">0.5</float>
1203
      <!-- the maximum #edits we consider when enumerating terms: can be 1 or 2 -->
1204
      <int name="maxEdits">2</int>
1205
      <!-- the minimum shared prefix when enumerating terms -->
1206
      <int name="minPrefix">1</int>
1207
      <!-- maximum number of inspections per result. -->
1208
      <int name="maxInspections">5</int>
1209
      <!-- minimum length of a query term to be considered for correction -->
1210
      <int name="minQueryLength">4</int>
1211
      <!-- maximum threshold of documents a query term can appear to be considered for correction -->
1212
      <float name="maxQueryFrequency">0.01</float>
1213
      <!-- uncomment this to require suggestions to occur in 1% of the documents
1214
      	<float name="thresholdTokenFrequency">.01</float>
1215
      -->
1216
    </lst>
1217
    
1218
    <!-- a spellchecker that can break or combine words.  See "/spell" handler below for usage -->
1219
    <lst name="spellchecker">
1220
      <str name="name">wordbreak</str>
1221
      <str name="classname">solr.WordBreakSolrSpellChecker</str>      
1222
      <str name="field">name</str>
1223
      <str name="combineWords">true</str>
1224
      <str name="breakWords">true</str>
1225
      <int name="maxChanges">10</int>
1226
    </lst>
1227

    
1228
    <!-- a spellchecker that uses a different distance measure -->
1229
    <!--
1230
       <lst name="spellchecker">
1231
         <str name="name">jarowinkler</str>
1232
         <str name="field">spell</str>
1233
         <str name="classname">solr.DirectSolrSpellChecker</str>
1234
         <str name="distanceMeasure">
1235
           org.apache.lucene.search.spell.JaroWinklerDistance
1236
         </str>
1237
       </lst>
1238
     -->
1239

    
1240
    <!-- a spellchecker that use an alternate comparator 
1241

    
1242
         comparatorClass be one of:
1243
          1. score (default)
1244
          2. freq (Frequency first, then score)
1245
          3. A fully qualified class name
1246
      -->
1247
    <!--
1248
       <lst name="spellchecker">
1249
         <str name="name">freq</str>
1250
         <str name="field">lowerfilt</str>
1251
         <str name="classname">solr.DirectSolrSpellChecker</str>
1252
         <str name="comparatorClass">freq</str>
1253
      -->
1254

    
1255
    <!-- A spellchecker that reads the list of words from a file -->
1256
    <!--
1257
       <lst name="spellchecker">
1258
         <str name="classname">solr.FileBasedSpellChecker</str>
1259
         <str name="name">file</str>
1260
         <str name="sourceLocation">spellings.txt</str>
1261
         <str name="characterEncoding">UTF-8</str>
1262
         <str name="spellcheckIndexDir">spellcheckerFile</str>
1263
       </lst>
1264
      -->
1265
  </searchComponent>
1266
  
1267
  <!-- A request handler for demonstrating the spellcheck component.  
1268

    
1269
       NOTE: This is purely as an example.  The whole purpose of the
1270
       SpellCheckComponent is to hook it into the request handler that
1271
       handles your normal user queries so that a separate request is
1272
       not needed to get suggestions.
1273

    
1274
       IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS
1275
       NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
1276
       
1277
       See http://wiki.apache.org/solr/SpellCheckComponent for details
1278
       on the request parameters.
1279
    -->
1280
  <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
1281
    <lst name="defaults">
1282
      <str name="df">__all</str>
1283
      <!-- Solr will use suggestions from both the 'default' spellchecker
1284
           and from the 'wordbreak' spellchecker and combine them.
1285
           collations (re-written queries) can include a combination of
1286
           corrections from both spellcheckers -->
1287
      <str name="spellcheck.dictionary">default</str>
1288
      <str name="spellcheck.dictionary">wordbreak</str>
1289
      <str name="spellcheck">on</str>
1290
      <str name="spellcheck.extendedResults">true</str>       
1291
      <str name="spellcheck.count">10</str>
1292
      <str name="spellcheck.alternativeTermCount">5</str>
1293
      <str name="spellcheck.maxResultsForSuggest">5</str>       
1294
      <str name="spellcheck.collate">true</str>
1295
      <str name="spellcheck.collateExtendedResults">true</str>  
1296
      <str name="spellcheck.maxCollationTries">10</str>
1297
      <str name="spellcheck.maxCollations">5</str>         
1298
    </lst>
1299
    <arr name="last-components">
1300
      <str>spellcheck</str>
1301
    </arr>
1302
  </requestHandler>
1303
  
1304
  <!-- This buggy configuration forces a long build at startup
1305
  <searchComponent name="suggest" class="solr.SuggestComponent">
1306
  	<lst name="suggester">
1307
      <str name="name">mySuggester</str>
1308
      <str name="lookupImpl">FuzzyLookupFactory</str>
1309
      <str name="dictionaryImpl">DocumentDictionaryFactory</str>
1310
      <str name="field">cat</str>
1311
      <str name="weightField">price</str>
1312
      <str name="suggestAnalyzerFieldType">string</str>
1313
    </lst>
1314
  </searchComponent>
1315

    
1316
  <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
1317
    <lst name="defaults">
1318
      <str name="suggest">true</str>
1319
      <str name="suggest.count">10</str>
1320
    </lst>
1321
    <arr name="components">
1322
      <str>suggest</str>
1323
    </arr>
1324
  </requestHandler>
1325
  -->
1326
  <!-- Term Vector Component
1327

    
1328
       http://wiki.apache.org/solr/TermVectorComponent
1329
    -->
1330
  <searchComponent name="tvComponent" class="solr.TermVectorComponent"/>
1331

    
1332
  <!-- A request handler for demonstrating the term vector component
1333

    
1334
       This is purely as an example.
1335

    
1336
       In reality you will likely want to add the component to your 
1337
       already specified request handlers. 
1338
    -->
1339
  <requestHandler name="/tvrh" class="solr.SearchHandler" startup="lazy">
1340
    <lst name="defaults">
1341
      <str name="df">__all</str>
1342
      <bool name="tv">true</bool>
1343
    </lst>
1344
    <arr name="last-components">
1345
      <str>tvComponent</str>
1346
    </arr>
1347
  </requestHandler>
1348

    
1349
  <!-- Clustering Component
1350

    
1351
       http://wiki.apache.org/solr/ClusteringComponent
1352

    
1353
       You'll need to set the solr.clustering.enabled system property
1354
       when running solr to run with clustering enabled:
1355

    
1356
            java -Dsolr.clustering.enabled=true -jar start.jar
1357

    
1358
       http://wiki.apache.org/solr/ClusteringComponent
1359
       http://carrot2.github.io/solr-integration-strategies/
1360
    -->
1361
  <searchComponent name="clustering"
1362
                   enable="\${solr.clustering.enabled:false}"
1363
                   class="solr.clustering.ClusteringComponent" >
1364
    <!-- Declare an engine -->
1365
    <lst name="engine">
1366
      <str name="name">lingo</str>
1367

    
1368
      <!-- Class name of a clustering algorithm compatible with the Carrot2 framework.
1369

    
1370
           Currently available open source algorithms are:
1371
           * org.carrot2.clustering.lingo.LingoClusteringAlgorithm
1372
           * org.carrot2.clustering.stc.STCClusteringAlgorithm
1373
           * org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm
1374
           
1375
           See http://project.carrot2.org/algorithms.html for the
1376
           algorithm's characteristics.
1377
        -->
1378
      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1379

    
1380
           See http://project.carrot2.org/algorithms.html for more information.
1381

    
1382
           A commercial algorithm Lingo3G (needs to be installed separately) is defined as:
1383
           * com.carrotsearch.lingo3g.Lingo3GClusteringAlgorithm
1384
        -->
1385
      <str name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
1386

    
1387
      <!-- Override location of the clustering algorithm's resources 
1388
           (attribute definitions and lexical resources).
1389

    
1390
           A directory from which to load algorithm-specific stop words,
1391
           stop labels and attribute definition XMLs. 
1392

    
1393
           For an overview of Carrot2 lexical resources, see:
1394
           http://download.carrot2.org/head/manual/#chapter.lexical-resources
1395
        -->
1396
      <str name="carrot.lexicalResourcesDir">clustering/carrot2</str>
1397

    
1398
           For an overview of Lingo3G lexical resources, see:
1399
           http://download.carrotsearch.com/lingo3g/manual/#chapter.lexical-resources
1400
       -->
1401
      <str name="carrot.resourcesDir">clustering/carrot2</str>
1402
    </lst>
1403

    
1404
    <!-- An example definition for the STC clustering algorithm. -->
1405
    <lst name="engine">
1406
      <str name="name">stc</str>
1407
      <str name="carrot.algorithm">org.carrot2.clustering.stc.STCClusteringAlgorithm</str>
1408
    </lst>
1409

    
1410
    <!-- An example definition for the bisecting kmeans clustering algorithm. -->
1411
    <lst name="engine">
1412
      <str name="name">kmeans</str>
1413
      <str name="carrot.algorithm">org.carrot2.clustering.kmeans.BisectingKMeansClusteringAlgorithm</str>
1414
    </lst>
1415
  </searchComponent>
1416

    
1417
  <!-- A request handler for demonstrating the clustering component
1418

    
1419
       This is purely as an example.
1420

    
1421
       In reality you will likely want to add the component to your 
1422
       already specified request handlers. 
1423
    -->
1424
  <requestHandler name="/clustering"
1425
                  startup="lazy"
1426
                  enable="\${solr.clustering.enabled:false}"
1427
                  class="solr.SearchHandler">
1428
    <lst name="defaults">
1429
      <bool name="clustering">true</bool>
1430
      <str name="clustering.engine">default</str>
1431
      <bool name="clustering.results">true</bool>
1432
      <!-- Field name with the logical "title" of a each document (optional) -->
1433
      <str name="carrot.title">name</str>
1434
      <!-- Field name with the logical "URL" of a each document (optional) -->
1435
      <str name="carrot.url">id</str>
1436
      <!-- Field name with the logical "content" of a each document (optional) -->
1437
      <str name="carrot.snippet">features</str>
1438
      <!-- Apply highlighter to the title/ content and use this for clustering. -->
1439
      <bool name="carrot.produceSummary">true</bool>
1440
      <!-- the maximum number of labels per cluster -->
1441
      <!--<int name="carrot.numDescriptions">5</int>-->
1442
      <!-- produce sub clusters -->
1443
      <bool name="carrot.outputSubClusters">false</bool>
1444

    
1445
      <!-- Configure the remaining request handler parameters. -->
1446
      <str name="defType">edismax</str>
1447
      <str name="qf">
1448
        text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
1449
      </str>
1450
      <str name="q.alt">*:*</str>
1451
      <str name="rows">10</str>
1452
      <str name="fl">*,score</str>
1453
    </lst>
1454
    <arr name="last-components">
1455
      <str>clustering</str>
1456
    </arr>
1457
  </requestHandler>
1458
  
1459
  <!-- Terms Component
1460

    
1461
       http://wiki.apache.org/solr/TermsComponent
1462

    
1463
       A component to return terms and document frequency of those
1464
       terms
1465
    -->
1466
  <searchComponent name="terms" class="solr.TermsComponent"/>
1467

    
1468
  <!-- A request handler for demonstrating the terms component -->
1469
  <requestHandler name="/terms" class="solr.SearchHandler" startup="lazy">
1470
     <lst name="defaults">
1471
      <bool name="terms">true</bool>
1472
      <bool name="distrib">false</bool>
1473
    </lst>     
1474
    <arr name="components">
1475
      <str>terms</str>
1476
    </arr>
1477
  </requestHandler>
1478

    
1479

    
1480
  <!-- Query Elevation Component
1481

    
1482
       http://wiki.apache.org/solr/QueryElevationComponent
1483

    
1484
       a search component that enables you to configure the top
1485
       results for a given query regardless of the normal lucene
1486
       scoring.
1487
    -->
1488
  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
1489
    <!-- pick a fieldType to analyze queries -->
1490
    <str name="queryFieldType">string</str>
1491
    <str name="config-file">elevate.xml</str>
1492
  </searchComponent>
1493

    
1494
  <!-- A request handler for demonstrating the elevator component -->
1495
  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
1496
    <lst name="defaults">
1497
      <str name="echoParams">explicit</str>
1498
      <str name="df">__all</str>
1499
    </lst>
1500
    <arr name="last-components">
1501
      <str>elevator</str>
1502
    </arr>
1503
  </requestHandler>
1504

    
1505
  <!-- Highlighting Component
1506

    
1507
       http://wiki.apache.org/solr/HighlightingParameters
1508
    -->
1509
  <searchComponent class="solr.HighlightComponent" name="highlight">
1510
    <highlighting>
1511
      <!-- Configure the standard fragmenter -->
1512
      <!-- This could most likely be commented out in the "default" case -->
1513
      <fragmenter name="gap" 
1514
                  default="true"
1515
                  class="solr.highlight.GapFragmenter">
1516
        <lst name="defaults">
1517
          <int name="hl.fragsize">100</int>
1518
        </lst>
1519
      </fragmenter>
1520

    
1521
      <!-- A regular-expression-based fragmenter 
1522
           (for sentence extraction) 
1523
        -->
1524
      <fragmenter name="regex" 
1525
                  class="solr.highlight.RegexFragmenter">
1526
        <lst name="defaults">
1527
          <!-- slightly smaller fragsizes work better because of slop -->
1528
          <int name="hl.fragsize">70</int>
1529
          <!-- allow 50% slop on fragment sizes -->
1530
          <float name="hl.regex.slop">0.5</float>
1531
          <!-- a basic sentence pattern -->
1532
          <str name="hl.regex.pattern">[-\w ,/\n\&quot;&apos;]{20,200}</str>
1533
        </lst>
1534
      </fragmenter>
1535

    
1536
      <!-- Configure the standard formatter -->
1537
      <formatter name="html" 
1538
                 default="true"
1539
                 class="solr.highlight.HtmlFormatter">
1540
        <lst name="defaults">
1541
          <str name="hl.simple.pre"><![CDATA[<em>]]></str>
1542
          <str name="hl.simple.post"><![CDATA[</em>]]></str>
1543
        </lst>
1544
      </formatter>
1545

    
1546
      <!-- Configure the standard encoder -->
1547
      <encoder name="html" 
1548
               class="solr.highlight.HtmlEncoder" />
1549

    
1550
      <!-- Configure the standard fragListBuilder -->
1551
      <fragListBuilder name="simple" 
1552
                       class="solr.highlight.SimpleFragListBuilder"/>
1553
      
1554
      <!-- Configure the single fragListBuilder -->
1555
      <fragListBuilder name="single" 
1556
                       class="solr.highlight.SingleFragListBuilder"/>
1557
      
1558
      <!-- Configure the weighted fragListBuilder -->
1559
      <fragListBuilder name="weighted" 
1560
                       default="true"
1561
                       class="solr.highlight.WeightedFragListBuilder"/>
1562
      
1563
      <!-- default tag FragmentsBuilder -->
1564
      <fragmentsBuilder name="default" 
1565
                        default="true"
1566
                        class="solr.highlight.ScoreOrderFragmentsBuilder">
1567
        <!-- 
1568
        <lst name="defaults">
1569
          <str name="hl.multiValuedSeparatorChar">/</str>
1570
        </lst>
1571
        -->
1572
      </fragmentsBuilder>
1573

    
1574
      <!-- multi-colored tag FragmentsBuilder -->
1575
      <fragmentsBuilder name="colored" 
1576
                        class="solr.highlight.ScoreOrderFragmentsBuilder">
1577
        <lst name="defaults">
1578
          <str name="hl.tag.pre"><![CDATA[
1579
               <b style="background:yellow">,<b style="background:lawgreen">,
1580
               <b style="background:aquamarine">,<b style="background:magenta">,
1581
               <b style="background:palegreen">,<b style="background:coral">,
1582
               <b style="background:wheat">,<b style="background:khaki">,
1583
               <b style="background:lime">,<b style="background:deepskyblue">]]></str>
1584
          <str name="hl.tag.post"><![CDATA[</b>]]></str>
1585
        </lst>
1586
      </fragmentsBuilder>
1587
      
1588
      <boundaryScanner name="default" 
1589
                       default="true"
1590
                       class="solr.highlight.SimpleBoundaryScanner">
1591
        <lst name="defaults">
1592
          <str name="hl.bs.maxScan">10</str>
1593
          <str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
1594
        </lst>
1595
      </boundaryScanner>
1596
      
1597
      <boundaryScanner name="breakIterator" 
1598
                       class="solr.highlight.BreakIteratorBoundaryScanner">
1599
        <lst name="defaults">
1600
          <!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
1601
          <str name="hl.bs.type">WORD</str>
1602
          <!-- language and country are used when constructing Locale object.  -->
1603
          <!-- And the Locale object will be used when getting instance of BreakIterator -->
1604
          <str name="hl.bs.language">en</str>
1605
          <str name="hl.bs.country">US</str>
1606
        </lst>
1607
      </boundaryScanner>
1608
    </highlighting>
1609
  </searchComponent>
1610

    
1611
  <!-- Update Processors
1612

    
1613
       Chains of Update Processor Factories for dealing with Update
1614
       Requests can be declared, and then used by name in Update
1615
       Request Processors
1616

    
1617
       http://wiki.apache.org/solr/UpdateRequestProcessor
1618

    
1619
    --> 
1620
  <!-- Deduplication
1621

    
1622
       An example dedup update processor that creates the "id" field
1623
       on the fly based on the hash code of some other fields.  This
1624
       example has overwriteDupes set to false since we are using the
1625
       id field as the signatureField and Solr will maintain
1626
       uniqueness based on that anyway.  
1627
       
1628
    -->
1629
  <!--
1630
     <updateRequestProcessorChain name="dedupe">
1631
       <processor class="solr.processor.SignatureUpdateProcessorFactory">
1632
         <bool name="enabled">true</bool>
1633
         <str name="signatureField">id</str>
1634
         <bool name="overwriteDupes">false</bool>
1635
         <str name="fields">name,features,cat</str>
1636
         <str name="signatureClass">solr.processor.Lookup3Signature</str>
1637
       </processor>
1638
       <processor class="solr.LogUpdateProcessorFactory" />
1639
       <processor class="solr.RunUpdateProcessorFactory" />
1640
     </updateRequestProcessorChain>
1641
    -->
1642
  
1643
  <!-- Language identification
1644

    
1645
       This example update chain identifies the language of the incoming
1646
       documents using the langid contrib. The detected language is
1647
       written to field language_s. No field name mapping is done.
1648
       The fields used for detection are text, title, subject and description,
1649
       making this example suitable for detecting languages form full-text
1650
       rich documents injected via ExtractingRequestHandler.
1651
       See more about langId at http://wiki.apache.org/solr/LanguageDetection
1652
    -->
1653
    <!--
1654
     <updateRequestProcessorChain name="langid">
1655
       <processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
1656
         <str name="langid.fl">text,title,subject,description</str>
1657
         <str name="langid.langField">language_s</str>
1658
         <str name="langid.fallback">en</str>
1659
       </processor>
1660
       <processor class="solr.LogUpdateProcessorFactory" />
1661
       <processor class="solr.RunUpdateProcessorFactory" />
1662
     </updateRequestProcessorChain>
1663
    -->
1664

    
1665
  <!-- Script update processor
1666

    
1667
    This example hooks in an update processor implemented using JavaScript.
1668

    
1669
    See more about the script update processor at http://wiki.apache.org/solr/ScriptUpdateProcessor
1670
  -->
1671
  <!--
1672
    <updateRequestProcessorChain name="script">
1673
      <processor class="solr.StatelessScriptUpdateProcessorFactory">
1674
        <str name="script">update-script.js</str>
1675
        <lst name="params">
1676
          <str name="config_param">example config parameter</str>
1677
        </lst>
1678
      </processor>
1679
      <processor class="solr.RunUpdateProcessorFactory" />
1680
    </updateRequestProcessorChain>
1681
  -->
1682
 
1683
  <!-- Response Writers
1684

    
1685
       http://wiki.apache.org/solr/QueryResponseWriter
1686

    
1687
       Request responses will be written using the writer specified by
1688
       the 'wt' request parameter matching the name of a registered
1689
       writer.
1690

    
1691
       The "default" writer is the default and will be used if 'wt' is
1692
       not specified in the request.
1693
    -->
1694
  <!-- The following response writers are implicitly configured unless
1695
       overridden...
1696
    -->
1697
  <!--
1698
     <queryResponseWriter name="xml" 
1699
                          default="true"
1700
                          class="solr.XMLResponseWriter" />
1701
     <queryResponseWriter name="json" class="solr.JSONResponseWriter"/>
1702
     <queryResponseWriter name="python" class="solr.PythonResponseWriter"/>
1703
     <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/>
1704
     <queryResponseWriter name="php" class="solr.PHPResponseWriter"/>
1705
     <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/>
1706
     <queryResponseWriter name="csv" class="solr.CSVResponseWriter"/>
1707
     <queryResponseWriter name="schema.xml" class="solr.SchemaXmlResponseWriter"/>
1708
    -->
1709

    
1710
  <queryResponseWriter name="json" class="solr.JSONResponseWriter">
1711
     <!-- For the purposes of the tutorial, JSON responses are written as
1712
      plain text so that they are easy to read in *any* browser.
1713
      If you expect a MIME type of "application/json" just remove this override.
1714
     -->
1715
    <str name="content-type">text/plain; charset=UTF-8</str>
1716
  </queryResponseWriter>
1717
  
1718
  <!--
1719
     Custom response writers can be declared as needed...
1720
    -->
1721
    <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
1722
  
1723

    
1724
  <!-- XSLT response writer transforms the XML output by any xslt file found
1725
       in Solr's conf/xslt directory.  Changes to xslt files are checked for
1726
       every xsltCacheLifetimeSeconds.  
1727
    -->
1728
  <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
1729
    <int name="xsltCacheLifetimeSeconds">5</int>
1730
  </queryResponseWriter>
1731

    
1732
  <!-- Query Parsers
1733

    
1734
       http://wiki.apache.org/solr/SolrQuerySyntax
1735

    
1736
       Multiple QParserPlugins can be registered by name, and then
1737
       used in either the "defType" param for the QueryComponent (used
1738
       by SearchHandler) or in LocalParams
1739
    -->
1740
  <!-- example of registering a query parser -->
1741
  <!--
1742
     <queryParser name="myparser" class="com.mycompany.MyQParserPlugin"/>
1743
    -->
1744

    
1745
  <!-- Function Parsers
1746

    
1747
       http://wiki.apache.org/solr/FunctionQuery
1748

    
1749
       Multiple ValueSourceParsers can be registered by name, and then
1750
       used as function names when using the "func" QParser.
1751
    -->
1752
  <!-- example of registering a custom function parser  -->
1753
  <!--
1754
     <valueSourceParser name="myfunc" 
1755
                        class="com.mycompany.MyValueSourceParser" />
1756
    -->
1757
    
1758
  
1759
  <!-- Document Transformers
1760
       http://wiki.apache.org/solr/DocTransformers
1761
    -->
1762
  <!--
1763
     Could be something like:
1764
     <transformer name="db" class="com.mycompany.LoadFromDatabaseTransformer" >
1765
       <int name="connection">jdbc://....</int>
1766
     </transformer>
1767
     
1768
     To add a constant value to all docs, use:
1769
     <transformer name="mytrans2" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1770
       <int name="value">5</int>
1771
     </transformer>
1772
     
1773
     If you want the user to still be able to change it with _value:something_ use this:
1774
     <transformer name="mytrans3" class="org.apache.solr.response.transform.ValueAugmenterFactory" >
1775
       <double name="defaultValue">5</double>
1776
     </transformer>
1777

    
1778
      If you are using the QueryElevationComponent, you may wish to mark documents that get boosted.  The
1779
      EditorialMarkerFactory will do exactly that:
1780
     <transformer name="qecBooster" class="org.apache.solr.response.transform.EditorialMarkerFactory" />
1781
    -->
1782
    
1783

    
1784
  <!-- Legacy config for the admin interface -->
1785
  <admin>
1786
    <defaultQuery>*:*</defaultQuery>
1787
  </admin>
1788

    
1789
</config>
(2-2/2)