source: vlo/branches/vlo-3.2-ticket575/vlo-solr/src/main/solr_conf/solr/collection1/conf/solrconfig.xml @ 6112

Last change on this file since 6112 was 6112, checked in by Twan Goosen, 9 years ago

first changes for relevance based result ranking (refs #575)

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