source: solr/trunk/example/solr/conf/solrconfig.xml @ 19:568f0b136f2d

Revision 19:568f0b136f2d, 37.0 KB checked in by hagenbruch@phoibe.ub.rub.de, 9 years ago (diff)

New entry IDs (UUIDs). Statistics overview of record counts. Deduplication support. Minor tweaks...

  • Property exe set to *
Line 
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<config>
20  <!-- Set this to 'false' if you want solr to continue working after it has
21       encountered an severe configuration error.  In a production environment,
22       you may want solr to keep working even if one handler is mis-configured.
23
24       You may also set this to false using by setting the system property:
25         -Dsolr.abortOnConfigurationError=false
26     -->
27  <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
28
29  <!-- Used to specify an alternate directory to hold all index data
30       other than the default ./data under the Solr home.
31       If replication is in use, this should match the replication configuration. -->
32  <dataDir>${solr.data.dir:/home/hagenbruch/dev/bibliographie/bibliographie/solr/trunk/example/solr/data}</dataDir>
33
34
35  <indexDefaults>
36   <!-- Values here affect all index writers and act as a default unless overridden. -->
37    <useCompoundFile>false</useCompoundFile>
38
39    <mergeFactor>10</mergeFactor>
40    <!--
41     If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
42
43     -->
44    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
45    <!-- Tell Lucene when to flush documents to disk.
46    Giving Lucene more memory for indexing means faster indexing at the cost of more RAM
47
48    If both ramBufferSizeMB and maxBufferedDocs is set, then Lucene will flush based on whichever limit is hit first.
49
50    -->
51    <ramBufferSizeMB>512</ramBufferSizeMB>
52    <maxMergeDocs>2147483647</maxMergeDocs>
53    <maxFieldLength>10000</maxFieldLength>
54    <writeLockTimeout>1000</writeLockTimeout>
55    <commitLockTimeout>10000</commitLockTimeout>
56
57    <!--
58     Expert: Turn on Lucene's auto commit capability.
59     This causes intermediate segment flushes to write a new lucene
60     index descriptor, enabling it to be opened by an external
61     IndexReader.
62     NOTE: Despite the name, this value does not have any relation to Solr's autoCommit functionality
63     -->
64    <!--<luceneAutoCommit>false</luceneAutoCommit>-->
65    <!--
66     Expert:
67     The Merge Policy in Lucene controls how merging is handled by Lucene.  The default in 2.3 is the LogByteSizeMergePolicy, previous
68     versions used LogDocMergePolicy.
69
70     LogByteSizeMergePolicy chooses segments to merge based on their size.  The Lucene 2.2 default, LogDocMergePolicy chose when
71     to merge based on number of documents
72
73     Other implementations of MergePolicy must have a no-argument constructor
74     -->
75    <!--<mergePolicy>org.apache.lucene.index.LogByteSizeMergePolicy</mergePolicy>-->
76
77    <!--
78     Expert:
79     The Merge Scheduler in Lucene controls how merges are performed.  The ConcurrentMergeScheduler (Lucene 2.3 default)
80      can perform merges in the background using separate threads.  The SerialMergeScheduler (Lucene 2.2 default) does not.
81     -->
82    <!--<mergeScheduler>org.apache.lucene.index.ConcurrentMergeScheduler</mergeScheduler>-->
83
84    <!--
85      This option specifies which Lucene LockFactory implementation to use.
86     
87      single = SingleInstanceLockFactory - suggested for a read-only index
88               or when there is no possibility of another process trying
89               to modify the index.
90      native = NativeFSLockFactory
91      simple = SimpleFSLockFactory
92
93      (For backwards compatibility with Solr 1.2, 'simple' is the default
94       if not specified.)
95    -->
96    <lockType>single</lockType>
97  </indexDefaults>
98
99  <mainIndex>
100    <!-- options specific to the main on-disk lucene index -->
101    <useCompoundFile>false</useCompoundFile>
102    <ramBufferSizeMB>128</ramBufferSizeMB>
103    <mergeFactor>10</mergeFactor>
104    <!-- Deprecated -->
105    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
106    <maxMergeDocs>2147483647</maxMergeDocs>
107    <maxFieldLength>10000</maxFieldLength>
108
109    <!-- If true, unlock any held write or commit locks on startup.
110         This defeats the locking mechanism that allows multiple
111         processes to safely access a lucene index, and should be
112         used with care.
113         This is not needed if lock type is 'none' or 'single'
114     -->
115    <unlockOnStartup>false</unlockOnStartup>
116   
117    <!-- If true, IndexReaders will be reopened (often more efficient) instead
118         of closed and then opened.
119    -->
120    <reopenReaders>true</reopenReaders>
121         
122    <!--
123        Custom deletion policies can specified here. The class must
124        implement org.apache.lucene.index.IndexDeletionPolicy.
125
126        http://lucene.apache.org/java/2_3_2/api/org/apache/lucene/index/IndexDeletionPolicy.html
127
128        The standard Solr IndexDeletionPolicy implementation supports deleting
129        index commit points on number of commits, age of commit point and
130        optimized status.
131
132        The latest commit point should always be preserved regardless
133        of the criteria.
134    -->
135    <deletionPolicy class="solr.SolrDeletionPolicy">
136      <!-- Keep only optimized commit points -->
137      <str name="keepOptimizedOnly">false</str>
138      <!-- The maximum number of commit points to be kept -->
139      <str name="maxCommitsToKeep">1</str>
140      <!--
141          Delete all commit points once they have reached the given age.
142          Supports DateMathParser syntax e.g.
143         
144          <str name="maxCommitAge">30MINUTES</str>
145          <str name="maxCommitAge">1DAY</str>
146      -->
147    </deletionPolicy>
148
149  </mainIndex>
150
151  <!--  Enables JMX if and only if an existing MBeanServer is found, use
152                this if you want to configure JMX through JVM parameters. Remove
153                this to disable exposing Solr configuration and statistics to JMX.
154
155                If you want to connect to a particular server, specify the agentId
156                e.g. <jmx agentId="myAgent" />
157
158                If you want to start a new MBeanServer, specify the serviceUrl
159                e.g <jmx serviceUrl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
160
161                For more details see http://wiki.apache.org/solr/SolrJmx
162  -->
163  <jmx />
164
165  <!-- the default high-performance update handler -->
166  <updateHandler class="solr.DirectUpdateHandler2">
167
168    <!-- A prefix of "solr." for class names is an alias that
169         causes solr to search appropriate packages, including
170         org.apache.solr.(search|update|request|core|analysis)
171     -->
172
173    <!-- Perform a <commit/> automatically under certain conditions:
174         maxDocs - number of updates since last commit is greater than this
175         maxTime - oldest uncommited update (in ms) is this long ago
176    <autoCommit>
177      <maxDocs>10000</maxDocs>
178      <maxTime>1000</maxTime>
179    </autoCommit>
180    -->
181
182    <!-- The RunExecutableListener executes an external command.
183         exe - the name of the executable to run
184         dir - dir to use as the current working directory. default="."
185         wait - the calling thread waits until the executable returns. default="true"
186         args - the arguments to pass to the program.  default=nothing
187         env - environment variables to set.  default=nothing
188      -->
189    <!-- A postCommit event is fired after every commit or optimize command
190    <listener event="postCommit" class="solr.RunExecutableListener">
191      <str name="exe">solr/bin/snapshooter</str>
192      <str name="dir">.</str>
193      <bool name="wait">true</bool>
194      <arr name="args"> <str>arg1</str> <str>arg2</str> </arr>
195      <arr name="env"> <str>MYVAR=val1</str> </arr>
196    </listener>
197    -->
198    <!-- A postOptimize event is fired only after every optimize command, useful
199         in conjunction with index distribution to only distribute optimized indicies
200    <listener event="postOptimize" class="solr.RunExecutableListener">
201      <str name="exe">snapshooter</str>
202      <str name="dir">solr/bin</str>
203      <bool name="wait">true</bool>
204    </listener>
205    -->
206
207  </updateHandler>
208 
209  <!-- Use the following format to specify a custom IndexReaderFactory - allows for alternate
210       IndexReader implementations.
211  <indexReaderFactory name="IndexReaderFactory" class="package.class">
212    Parameters as required by the implementation
213  </indexReaderFactory >
214  -->
215
216
217  <query>
218    <!-- Maximum number of clauses in a boolean query... can affect
219        range or prefix queries that expand to big boolean
220        queries.  An exception is thrown if exceeded.  -->
221    <maxBooleanClauses>1024</maxBooleanClauses>
222
223
224    <!-- There are two implementations of cache available for Solr,
225         LRUCache, based on a synchronized LinkedHashMap, and
226         FastLRUCache, based on a ConcurrentHashMap.  FastLRUCache has faster gets
227         and slower puts in single threaded operation and thus is generally faster
228         than LRUCache when the hit ratio of the cache is high (> 75%), and may be
229         faster under other scenarios on multi-cpu systems. -->
230    <!-- Cache used by SolrIndexSearcher for filters (DocSets),
231         unordered sets of *all* documents that match a query.
232         When a new searcher is opened, its caches may be prepopulated
233         or "autowarmed" using data from caches in the old searcher.
234         autowarmCount is the number of items to prepopulate.  For LRUCache,
235         the autowarmed items will be the most recently accessed items.
236       Parameters:
237         class - the SolrCache implementation LRUCache or FastLRUCache
238         size - the maximum number of entries in the cache
239         initialSize - the initial capacity (number of entries) of
240           the cache.  (seel java.util.HashMap)
241         autowarmCount - the number of entries to prepopulate from
242           and old cache.
243         -->
244    <filterCache
245      class="solr.FastLRUCache"
246      size="55000"
247      initialSize="55000"
248      autowarmCount="55000"/>
249
250    <!-- Cache used to hold field values that are quickly accessible
251         by document id.  The fieldValueCache is created by default
252         even if not configured here.
253      <fieldValueCache
254        class="solr.FastLRUCache"
255        size="512"
256        autowarmCount="128"
257        showItems="32"
258      />
259    -->
260
261   <!-- queryResultCache caches results of searches - ordered lists of
262         document ids (DocList) based on a query, a sort, and the range
263         of documents requested.  -->
264    <queryResultCache
265      class="solr.LRUCache"
266      size="55000"
267      initialSize="55000"
268      autowarmCount="55000"/>
269
270  <!-- documentCache caches Lucene Document objects (the stored fields for each document).
271       Since Lucene internal document ids are transient, this cache will not be autowarmed.  -->
272    <documentCache
273      class="solr.LRUCache"
274      size="55000"
275      initialSize="55000"
276      autowarmCount="0"/>
277
278    <!-- If true, stored fields that are not requested will be loaded lazily.
279
280    This can result in a significant speed improvement if the usual case is to
281    not load all stored fields, especially if the skipped fields are large compressed
282    text fields.
283    -->
284    <enableLazyFieldLoading>true</enableLazyFieldLoading>
285
286    <!-- Example of a generic cache.  These caches may be accessed by name
287         through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
288         The purpose is to enable easy caching of user/application level data.
289         The regenerator argument should be specified as an implementation
290         of solr.search.CacheRegenerator if autowarming is desired.  -->
291    <!--
292    <cache name="myUserCache"
293      class="solr.LRUCache"
294      size="4096"
295      initialSize="1024"
296      autowarmCount="1024"
297      regenerator="org.mycompany.mypackage.MyRegenerator"
298      />
299    -->
300
301   <!-- An optimization that attempts to use a filter to satisfy a search.
302         If the requested sort does not include score, then the filterCache
303         will be checked for a filter matching the query. If found, the filter
304         will be used as the source of document ids, and then the sort will be
305         applied to that.
306    <useFilterForSortedQuery>true</useFilterForSortedQuery>
307   -->
308
309   <!-- An optimization for use with the queryResultCache.  When a search
310         is requested, a superset of the requested number of document ids
311         are collected.  For example, if a search for a particular query
312         requests matching documents 10 through 19, and queryWindowSize is 50,
313         then documents 0 through 49 will be collected and cached.  Any further
314         requests in that range can be satisfied via the cache.  -->
315    <queryResultWindowSize>55000</queryResultWindowSize>
316
317    <!-- Maximum number of documents to cache for any entry in the
318         queryResultCache. -->
319    <queryResultMaxDocsCached>1000</queryResultMaxDocsCached>
320
321    <!-- a newSearcher event is fired whenever a new searcher is being prepared
322         and there is a current searcher handling requests (aka registered). -->
323    <!-- QuerySenderListener takes an array of NamedList and executes a
324         local query request for each NamedList in sequence. -->
325    <listener event="newSearcher" class="solr.QuerySenderListener">
326      <arr name="queries">
327        <lst> <str name="q">usa</str> <str name="start">0</str> <str name="rows">55000</str> </lst>
328        <!-- <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
329        <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst> -->
330      </arr>
331    </listener>
332
333    <!-- a firstSearcher event is fired whenever a new searcher is being
334         prepared but there is no current registered searcher to handle
335         requests or to gain autowarming data from. -->
336    <listener event="firstSearcher" class="solr.QuerySenderListener">
337      <arr name="queries">
338        <lst> <str name="q">usa</str> <str name="start">0</str> <str name="rows">55000</str> </lst>
339        <!-- <lst><str name="q">static firstSearcher warming query from solrconfig.xml</str></lst> -->
340      </arr>
341    </listener>
342
343    <!-- If a search request comes in and there is no current registered searcher,
344         then immediately register the still warming searcher and use it.  If
345         "false" then all requests will block until the first searcher is done
346         warming. -->
347    <useColdSearcher>false</useColdSearcher>
348
349    <!-- Maximum number of searchers that may be warming in the background
350      concurrently.  An error is returned if this limit is exceeded. Recommend
351      1-2 for read-only slaves, higher for masters w/o cache warming. -->
352    <maxWarmingSearchers>2</maxWarmingSearchers>
353
354  </query>
355
356  <!--
357    Let the dispatch filter handler /select?qt=XXX
358    handleSelect=true will use consistent error handling for /select and /update
359    handleSelect=false will use solr1.1 style error formatting
360    -->
361  <requestDispatcher handleSelect="true" >
362    <!--Make sure your system has some authentication before enabling remote streaming!  -->
363    <requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" />
364
365    <!-- Set HTTP caching related parameters (for proxy caches and clients).
366         
367         To get the behaviour of Solr 1.2 (ie: no caching related headers)
368         use the never304="true" option and do not specify a value for
369         <cacheControl>
370    -->
371    <!-- <httpCaching never304="true"> -->
372    <httpCaching lastModifiedFrom="openTime"
373                 etagSeed="Solr">
374       <!-- lastModFrom="openTime" is the default, the Last-Modified value
375            (and validation against If-Modified-Since requests) will all be
376            relative to when the current Searcher was opened.
377            You can change it to lastModFrom="dirLastMod" if you want the
378            value to exactly corrispond to when the physical index was last
379            modified.
380
381            etagSeed="..." is an option you can change to force the ETag
382            header (and validation against If-None-Match requests) to be
383            differnet even if the index has not changed (ie: when making
384            significant changes to your config file)
385
386            lastModifiedFrom and etagSeed are both ignored if you use the
387            never304="true" option.
388       -->
389       <!-- If you include a <cacheControl> directive, it will be used to
390            generate a Cache-Control header, as well as an Expires header
391            if the value contains "max-age="
392
393            By default, no Cache-Control header is generated.
394
395            You can use the <cacheControl> option even if you have set
396            never304="true"
397       -->
398       <!-- <cacheControl>max-age=30, public</cacheControl> -->
399    </httpCaching>
400  </requestDispatcher>
401
402
403  <!-- requestHandler plugins... incoming queries will be dispatched to the
404     correct handler based on the path or the qt (query type) param.
405     Names starting with a '/' are accessed with the a path equal to the
406     registered name.  Names without a leading '/' are accessed with:
407      http://host/app/select?qt=name
408     If no qt is defined, the requestHandler that declares default="true"
409     will be used.
410  -->
411  <requestHandler name="standard" class="solr.SearchHandler" default="true">
412    <!-- default values for query parameters -->
413     <lst name="defaults">
414       <str name="echoParams">explicit</str>
415       <!--
416       <int name="rows">10</int>
417       <str name="fl">*</str>
418       <str name="version">2.1</str>
419        -->
420     </lst>
421
422    <arr name="last-components">
423      <str>treefacet</str>
424    </arr>
425
426  </requestHandler>
427
428<!-- Please refer to http://wiki.apache.org/solr/SolrReplication for details on configuring replication -->
429<!--Master config-->
430<!--
431<requestHandler name="/replication" class="solr.ReplicationHandler" >
432    <lst name="master">
433        <str name="replicateAfter">commit</str>
434         <str name="confFiles">schema.xml,stopwords.txt</str>
435    </lst>
436</requestHandler>
437-->
438<!-- Slave config-->
439<!--
440<requestHandler name="/replication" class="solr.ReplicationHandler">
441    <lst name="slave">
442        <str name="masterUrl">http://localhost:8983/solr/replication</str>
443        <str name="pollInterval">00:00:60</str> 
444     </lst>
445</requestHandler>
446-->
447
448  <!-- DisMaxRequestHandler allows easy searching across multiple fields
449       for simple user-entered phrases.  It's implementation is now
450       just the standard SearchHandler with a default query type
451       of "dismax".
452       see http://wiki.apache.org/solr/DisMaxRequestHandler
453   -->
454  <requestHandler name="dismax" class="solr.SearchHandler" >
455    <lst name="defaults">
456     <str name="defType">dismax</str>
457     <str name="echoParams">explicit</str>
458     <float name="tie">0.01</float>
459     <str name="qf">
460        text^0.5 subject^1.0 title^1.5
461     </str>
462     <str name="pf">
463        text^0.5 subject^1.0 title^1.5
464     </str>
465     <str name="bf">
466        recip(rord(recordCreationDate),1,1000,1000)^0.3
467     </str>
468     <str name="fl">
469        *,score
470     </str>
471     <str name="mm">
472        2&lt;-1 5&lt;-2 6&lt;90%
473     </str>
474     <int name="ps">100</int>
475     <str name="q.alt">*:*</str>
476     <!-- example highlighter config, enable per-query with hl=true -->
477     <str name="hl.fl">title</str>
478     <!-- for this field, we want no fragmenting, just highlighting -->
479     <str name="f.name.hl.fragsize">0</str>
480     <!-- instructs Solr to return the field itself if no query terms are
481          found -->
482     <str name="f.name.hl.alternateField">title</str>
483     <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
484    </lst>
485  </requestHandler>
486
487  <!-- Note how you can register the same handler multiple times with
488       different names (and different init parameters)
489    -->
490  <requestHandler name="partitioned" class="solr.SearchHandler" >
491    <lst name="defaults">
492     <str name="defType">dismax</str>
493     <str name="echoParams">explicit</str>
494     <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
495     <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
496     <!-- This is an example of using Date Math to specify a constantly
497          moving date range in a config...
498       -->
499     <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
500    </lst>
501    <!-- In addition to defaults, "appends" params can be specified
502         to identify values which should be appended to the list of
503         multi-val params from the query (or the existing "defaults").
504
505         In this example, the param "fq=instock:true" will be appended to
506         any query time fq params the user may specify, as a mechanism for
507         partitioning the index, independent of any user selected filtering
508         that may also be desired (perhaps as a result of faceted searching).
509
510         NOTE: there is *absolutely* nothing a client can do to prevent these
511         "appends" values from being used, so don't use this mechanism
512         unless you are sure you always want it.
513      -->
514    <lst name="appends">
515      <!-- <str name="fq">inStock:true</str> -->
516    </lst>
517    <!-- "invariants" are a way of letting the Solr maintainer lock down
518         the options available to Solr clients.  Any params values
519         specified here are used regardless of what values may be specified
520         in either the query, the "defaults", or the "appends" params.
521
522         In this example, the facet.field and facet.query params are fixed,
523         limiting the facets clients can use.  Faceting is not turned on by
524         default - but if the client does specify facet=true in the request,
525         these are the only facets they will be able to see counts for;
526         regardless of what other facet.field or facet.query params they
527         may specify.
528
529         NOTE: there is *absolutely* nothing a client can do to prevent these
530         "invariants" values from being used, so don't use this mechanism
531         unless you are sure you always want it.
532      -->
533    <lst name="invariants">
534      <!-- <str name="facet.field">cat</str>
535      <str name="facet.field">manu_exact</str>
536      <str name="facet.query">price:[* TO 500]</str>
537      <str name="facet.query">price:[500 TO *]</str> -->
538    </lst>
539  </requestHandler>
540
541
542  <!--
543   Search components are registered to SolrCore and used by Search Handlers
544   
545   By default, the following components are avaliable:
546   
547   <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
548   <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
549   <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
550   <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
551   <searchComponent name="stats"     class="org.apache.solr.handler.component.StatsComponent" />
552   <searchComponent name="debug"     class="org.apache.solr.handler.component.DebugComponent" />
553   
554   Default configuration in a requestHandler would look like:
555    <arr name="components">
556      <str>query</str>
557      <str>facet</str>
558      <str>mlt</str>
559      <str>highlight</str>
560      <str>stats</str>
561      <str>debug</str>
562    </arr>
563
564    If you register a searchComponent to one of the standard names, that will be used instead.
565    To insert components before or after the 'standard' components, use:
566   
567    <arr name="first-components">
568      <str>myFirstComponentName</str>
569    </arr>
570   
571    <arr name="last-components">
572      <str>myLastComponentName</str>
573    </arr>
574  -->
575  <searchComponent name="treefacet" class="org.apache.solr.handler.component.TreeFacetComponent" />
576
577   <!-- The spell check component can return a list of alternative spelling
578  suggestions.  -->
579  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
580
581    <str name="queryAnalyzerFieldType">textSpell</str>
582
583    <lst name="spellchecker">
584      <str name="name">default</str>
585      <str name="field">spell</str>
586      <str name="spellcheckIndexDir">./spellchecker1</str>
587
588    </lst>
589    <lst name="spellchecker">
590      <str name="name">jarowinkler</str>
591      <str name="field">spell</str>
592      <!-- Use a different Distance Measure -->
593      <str name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
594      <str name="spellcheckIndexDir">./spellchecker2</str>
595
596    </lst>
597
598    <lst name="spellchecker">
599      <str name="classname">solr.FileBasedSpellChecker</str>
600      <str name="name">file</str>
601      <str name="sourceLocation">spellings.txt</str>
602      <str name="characterEncoding">UTF-8</str>
603      <str name="spellcheckIndexDir">./spellcheckerFile</str>
604    </lst>
605  </searchComponent>
606
607  <searchComponent name="elevator" class="org.apache.solr.handler.component.QueryElevationComponent" >
608    <str name="queryFieldType">string</str>
609    <str name="config-file">elevate.xml</str>
610  </searchComponent>
611
612  <requestHandler name="/elevate" class="solr.SearchHandler">
613    <lst name="defaults">
614      <str name="echoParams">explicit</str>
615    </lst>
616    <arr name="last-components">
617      <str>elevator</str>
618    </arr>
619  </requestHandler>
620
621  <!-- A request handler utilizing the spellcheck component. 
622  ################################################################################################
623  NOTE: This is purely as an example.  The whole purpose of the SpellCheckComponent is to hook it into
624  the request handler that handles (i.e. the standard or dismax SearchHandler)
625  queries such that a separate request is not needed to get suggestions.
626
627  IN OTHER WORDS, THERE IS REALLY GOOD CHANCE THE SETUP BELOW IS NOT WHAT YOU WANT FOR YOUR PRODUCTION SYSTEM!
628  ################################################################################################
629  -->
630  <requestHandler name="/spellCheckCompRH" class="solr.SearchHandler">
631    <lst name="defaults">
632      <!-- omp = Only More Popular -->
633      <str name="spellcheck.onlyMorePopular">false</str>
634      <!-- exr = Extended Results -->
635      <str name="spellcheck.extendedResults">false</str>
636      <!--  The number of suggestions to return -->
637      <str name="spellcheck.count">1</str>
638    </lst>
639    <arr name="last-components">
640      <str>spellcheck</str>
641    </arr>
642  </requestHandler>
643
644  <searchComponent name="tvComponent" class="org.apache.solr.handler.component.TermVectorComponent"/>
645  <!-- A Req Handler for working with the tvComponent.  This is purely as an example.
646  You will likely want to add the component to your already specified request handlers. -->
647  <requestHandler name="tvrh" class="org.apache.solr.handler.component.SearchHandler">
648    <lst name="defaults">
649      <bool name="tv">true</bool>
650    </lst>
651    <arr name="last-components">
652      <str>tvComponent</str>
653    </arr>
654  </requestHandler>
655
656<!--
657  <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler">
658    <lst name="defaults">
659      <str name="ext.map.Last-Modified">last_modified</str>
660      <bool name="ext.ignore.und.fl">true</bool>
661    </lst>
662  </requestHandler>
663-->
664
665
666  <!-- A component to return terms and document frequency of those terms.
667       This component does not yet support distributed search. -->
668  <searchComponent name="termsComponent" class="org.apache.solr.handler.component.TermsComponent"/>
669
670  <requestHandler name="/terms" class="org.apache.solr.handler.component.SearchHandler">
671     <lst name="defaults">
672      <bool name="terms">true</bool>
673    </lst>     
674    <arr name="components">
675      <str>termsComponent</str>
676    </arr>
677  </requestHandler>
678
679
680  <!-- a search component that enables you to configure the top results for
681       a given query regardless of the normal lucene scoring.-->
682  <searchComponent name="elevator" class="solr.QueryElevationComponent" >
683    <!-- pick a fieldType to analyze queries -->
684    <str name="queryFieldType">string</str>
685    <str name="config-file">elevate.xml</str>
686  </searchComponent>
687
688  <!-- a request handler utilizing the elevator component -->
689  <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
690    <lst name="defaults">
691      <str name="echoParams">explicit</str>
692    </lst>
693    <arr name="last-components">
694      <str>elevator</str>
695    </arr>
696  </requestHandler>
697
698
699  <!-- Update request handler. 
700
701       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
702       the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
703       The response format differs from solr1.1 formatting and returns a standard error code.
704
705       To enable solr1.1 behavior, remove the /update handler or change its path
706    -->
707  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler">
708      <lst name="defaults">
709            <str name="update.processor">dedupe</str>
710        </lst>
711  </requestHandler>
712
713
714  <requestHandler name="/update/javabin" class="solr.BinaryUpdateRequestHandler" />
715
716  <!--
717   Analysis request handler.  Since Solr 1.3.  Use to return how a document is analyzed.  Useful
718   for debugging and as a token server for other types of applications.
719
720   This is deprecated in favor of the improved DocumentAnalysisRequestHandler and FieldAnalysisRequestHandler
721
722   <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
723   -->
724
725  <!--
726    An analysis handler that provides a breakdown of the analysis process of provided docuemnts. This handler expects a
727    (single) content stream with the following format:
728
729    <docs>
730      <doc>
731        <field name="id">1</field>
732        <field name="name">The Name</field>
733        <field name="text">The Text Value</field>
734      <doc>
735      <doc>...</doc>
736      <doc>...</doc>
737      ...
738    </docs>
739
740    Note: Each document must contain a field which serves as the unique key. This key is used in the returned
741    response to assoicate an analysis breakdown to the analyzed document.
742
743    Like the FieldAnalysisRequestHandler, this handler also supports query analysis by
744    sending either an "analysis.query" or "q" request paraemter that holds the query text to be analyized. It also
745    supports the "analysis.showmatch" parameter which when set to true, all field tokens that match the query
746    tokens will be marked as a "match".
747  -->
748  <requestHandler name="/analysis/document" class="solr.DocumentAnalysisRequestHandler" />
749
750  <!--
751    RequestHandler that provides much the same functionality as analysis.jsp. Provides the ability
752    to specify multiple field types and field names in the same request and outputs index-time and
753    query-time analysis for each of them.
754
755    Request parameters are:
756    analysis.fieldname - The field name whose analyzers are to be used
757    analysis.fieldtype - The field type whose analyzers are to be used
758    analysis.fieldvalue - The text for index-time analysis
759    q (or analysis.q) - The text for query time analysis
760    analysis.showmatch (true|false) - When set to true and when query analysis is performed, the produced
761                                      tokens of the field value analysis will be marked as "matched" for every
762                                      token that is produces by the query analysis
763   -->
764  <requestHandler name="/analysis/field" class="solr.FieldAnalysisRequestHandler" />
765
766
767  <!-- CSV update handler, loaded on demand -->
768  <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
769
770
771  <!--
772   Admin Handlers - This will register all the standard admin RequestHandlers.  Adding
773   this single handler is equivalent to registering:
774   
775  <requestHandler name="/admin/luke"       class="org.apache.solr.handler.admin.LukeRequestHandler" />
776  <requestHandler name="/admin/system"     class="org.apache.solr.handler.admin.SystemInfoHandler" />
777  <requestHandler name="/admin/plugins"    class="org.apache.solr.handler.admin.PluginInfoHandler" />
778  <requestHandler name="/admin/threads"    class="org.apache.solr.handler.admin.ThreadDumpHandler" />
779  <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
780  <requestHandler name="/admin/file"       class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
781 
782  If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
783  <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
784    <lst name="invariants">
785     <str name="hidden">synonyms.txt</str>
786     <str name="hidden">anotherfile.txt</str>
787    </lst>
788  </requestHandler>
789  -->
790  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
791
792  <!-- ping/healthcheck -->
793  <requestHandler name="/admin/ping" class="PingRequestHandler">
794    <lst name="defaults">
795      <str name="qt">standard</str>
796      <str name="q">solrpingquery</str>
797      <str name="echoParams">all</str>
798    </lst>
799  </requestHandler>
800
801  <!-- Echo the request contents back to the client -->
802  <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
803    <lst name="defaults">
804     <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' -->
805     <str name="echoHandler">true</str>
806    </lst>
807  </requestHandler>
808
809  <highlighting>
810   <!-- Configure the standard fragmenter -->
811   <!-- This could most likely be commented out in the "default" case -->
812   <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true">
813    <lst name="defaults">
814     <int name="hl.fragsize">100</int>
815    </lst>
816   </fragmenter>
817
818   <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) -->
819   <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter">
820    <lst name="defaults">
821      <!-- slightly smaller fragsizes work better because of slop -->
822      <int name="hl.fragsize">70</int>
823      <!-- allow 50% slop on fragment sizes -->
824      <float name="hl.regex.slop">0.5</float>
825      <!-- a basic sentence pattern -->
826      <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
827    </lst>
828   </fragmenter>
829
830   <!-- Configure the standard formatter -->
831   <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
832    <lst name="defaults">
833     <str name="hl.simple.pre"><![CDATA[<span class="highlight">]]></str>
834     <str name="hl.simple.post"><![CDATA[</span>]]></str>
835    </lst>
836   </formatter>
837  </highlighting>
838
839  <!-- An example dedup update processor that creates the "id" field on the fly
840       based on the hash code of some other fields.  This example has overwriteDupes
841       set to false since we are using the id field as the signatureField and Solr
842       will maintain uniqueness based on that anyway. -->
843 
844  <updateRequestProcessorChain name="dedupe">
845    <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
846      <bool name="enabled">true</bool>
847      <str name="signatureField">dedupid</str>
848      <bool name="overwriteDupes">false</bool>
849      <str name="fields">title,genrel1,date,journal_title</str>
850      <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
851    </processor>
852    <processor class="solr.LogUpdateProcessorFactory" />
853    <processor class="solr.RunUpdateProcessorFactory" />
854  </updateRequestProcessorChain>
855 
856
857
858  <!-- queryResponseWriter plugins... query responses will be written using the
859    writer specified by the 'wt' request parameter matching the name of a registered
860    writer.
861    The "default" writer is the default and will be used if 'wt' is not specified
862    in the request. XMLResponseWriter will be used if nothing is specified here.
863    The json, python, and ruby writers are also available by default.
864
865    <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
866    <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
867    <queryResponseWriter name="python" class="org.apache.solr.request.PythonResponseWriter"/>
868    <queryResponseWriter name="ruby" class="org.apache.solr.request.RubyResponseWriter"/>
869    <queryResponseWriter name="php" class="org.apache.solr.request.PHPResponseWriter"/>
870    <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/>
871
872    <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>
873  -->
874
875  <!-- XSLT response writer transforms the XML output by any xslt file found
876       in Solr's conf/xslt directory.  Changes to xslt files are checked for
877       every xsltCacheLifetimeSeconds. 
878   -->
879  <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
880    <int name="xsltCacheLifetimeSeconds">5</int>
881  </queryResponseWriter>
882
883
884  <!-- example of registering a query parser
885  <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
886  -->
887
888  <!-- example of registering a custom function parser
889  <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
890  -->
891
892  <!-- config for the admin interface -->
893  <admin>
894    <defaultQuery>solr</defaultQuery>
895
896    <!-- configure a healthcheck file for servers behind a loadbalancer
897    <healthcheck type="file">server-enabled</healthcheck>
898    -->
899  </admin>
900
901</config>
Note: See TracBrowser for help on using the repository browser.