source: sandbox/expresso-solr/solr/example/example-DIH/solr/tika/conf/solrconfig.xml @ 7588

Revision 7588, 12.8 KB checked in by adir, 11 years ago (diff)

Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade

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 
21  <!--
22    Controls what version of Lucene various components of Solr adhere to. Generally, you want
23    to use the latest version to get all bug fixes and improvements. It is highly recommended
24    that you fully re-index after changing this setting as it can affect both how text is indexed
25    and queried.
26  -->
27  <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
28
29  <lib dir="../../../../contrib/extraction/lib" />
30  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
31
32  <!-- <indexConfig> section could go here, but we want the defaults -->
33
34  <!-- the default high-performance update handler -->
35  <updateHandler class="solr.DirectUpdateHandler2">
36
37    <!-- A prefix of "solr." for class names is an alias that
38         causes solr to search appropriate packages, including
39         org.apache.solr.(search|update|request|core|analysis)
40     -->
41
42    <!-- Limit the number of deletions Solr will buffer during doc updating.
43       
44        Setting this lower can help bound memory use during indexing.
45    -->
46    <maxPendingDeletes>100000</maxPendingDeletes>
47
48  </updateHandler>
49
50
51  <query>
52    <!-- Maximum number of clauses in a boolean query... can affect
53        range or prefix queries that expand to big boolean
54        queries.  An exception is thrown if exceeded.  -->
55    <maxBooleanClauses>1024</maxBooleanClauses>
56
57   
58    <!-- Cache used by SolrIndexSearcher for filters (DocSets),
59         unordered sets of *all* documents that match a query.
60         When a new searcher is opened, its caches may be prepopulated
61         or "autowarmed" using data from caches in the old searcher.
62         autowarmCount is the number of items to prepopulate.  For LRUCache,
63         the autowarmed items will be the most recently accessed items.
64       Parameters:
65         class - the SolrCache implementation (currently only LRUCache)
66         size - the maximum number of entries in the cache
67         initialSize - the initial capacity (number of entries) of
68           the cache.  (seel java.util.HashMap)
69         autowarmCount - the number of entries to prepopulate from
70           and old cache.
71         -->
72    <filterCache
73      class="solr.LRUCache"
74      size="512"
75      initialSize="512"
76      autowarmCount="256"/>
77
78   <!-- queryResultCache caches results of searches - ordered lists of
79         document ids (DocList) based on a query, a sort, and the range
80         of documents requested.  -->
81    <queryResultCache
82      class="solr.LRUCache"
83      size="512"
84      initialSize="512"
85      autowarmCount="256"/>
86
87  <!-- documentCache caches Lucene Document objects (the stored fields for each document).
88       Since Lucene internal document ids are transient, this cache will not be autowarmed.  -->
89    <documentCache
90      class="solr.LRUCache"
91      size="512"
92      initialSize="512"
93      autowarmCount="0"/>
94
95    <!-- If true, stored fields that are not requested will be loaded lazily.
96
97    This can result in a significant speed improvement if the usual case is to
98    not load all stored fields, especially if the skipped fields are large compressed
99    text fields.
100    -->
101    <enableLazyFieldLoading>true</enableLazyFieldLoading>
102
103    <!-- Example of a generic cache.  These caches may be accessed by name
104         through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
105         The purpose is to enable easy caching of user/application level data.
106         The regenerator argument should be specified as an implementation
107         of solr.search.CacheRegenerator if autowarming is desired.  -->
108    <!--
109    <cache name="myUserCache"
110      class="solr.LRUCache"
111      size="4096"
112      initialSize="1024"
113      autowarmCount="1024"
114      regenerator="org.mycompany.mypackage.MyRegenerator"
115      />
116    -->
117
118   <!-- An optimization that attempts to use a filter to satisfy a search.
119         If the requested sort does not include score, then the filterCache
120         will be checked for a filter matching the query. If found, the filter
121         will be used as the source of document ids, and then the sort will be
122         applied to that.
123    <useFilterForSortedQuery>true</useFilterForSortedQuery>
124   -->
125
126   <!-- An optimization for use with the queryResultCache.  When a search
127         is requested, a superset of the requested number of document ids
128         are collected.  For example, if a search for a particular query
129         requests matching documents 10 through 19, and queryWindowSize is 50,
130         then documents 0 through 49 will be collected and cached.  Any further
131         requests in that range can be satisfied via the cache.  -->
132    <queryResultWindowSize>50</queryResultWindowSize>
133   
134    <!-- Maximum number of documents to cache for any entry in the
135         queryResultCache. -->
136    <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
137
138    <!-- This entry enables an int hash representation for filters (DocSets)
139         when the number of items in the set is less than maxSize.  For smaller
140         sets, this representation is more memory efficient, more efficient to
141         iterate over, and faster to take intersections.  -->
142    <HashDocSet maxSize="3000" loadFactor="0.75"/>
143
144    <!-- a newSearcher event is fired whenever a new searcher is being prepared
145         and there is a current searcher handling requests (aka registered). -->
146    <!-- QuerySenderListener takes an array of NamedList and executes a
147         local query request for each NamedList in sequence. -->
148    <listener event="newSearcher" class="solr.QuerySenderListener">
149      <arr name="queries">
150        <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst>
151        <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst>
152        <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst>
153      </arr>
154    </listener>
155
156    <!-- a firstSearcher event is fired whenever a new searcher is being
157         prepared but there is no current registered searcher to handle
158         requests or to gain autowarming data from. -->
159    <listener event="firstSearcher" class="solr.QuerySenderListener">
160      <arr name="queries">
161      </arr>
162    </listener>
163
164    <!-- If a search request comes in and there is no current registered searcher,
165         then immediately register the still warming searcher and use it.  If
166         "false" then all requests will block until the first searcher is done
167         warming. -->
168    <useColdSearcher>false</useColdSearcher>
169
170    <!-- Maximum number of searchers that may be warming in the background
171      concurrently.  An error is returned if this limit is exceeded. Recommend
172      1-2 for read-only slaves, higher for masters w/o cache warming. -->
173    <maxWarmingSearchers>4</maxWarmingSearchers>
174
175  </query>
176
177  <!--
178    Let the dispatch filter handler /select?qt=XXX
179    handleSelect=true will use consistent error handling for /select and /update
180    handleSelect=false will use solr1.1 style error formatting
181    -->
182  <requestDispatcher handleSelect="true" >
183    <!--Make sure your system has some authentication before enabling remote streaming!  -->
184    <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
185       
186    <!-- Set HTTP caching related parameters (for proxy caches and clients).
187         
188         To get the behaviour of Solr 1.2 (ie: no caching related headers)
189         use the never304="true" option and do not specify a value for
190         <cacheControl>
191    -->
192    <httpCaching never304="true">
193    <!--httpCaching lastModifiedFrom="openTime"
194                 etagSeed="Solr"-->
195       <!-- lastModFrom="openTime" is the default, the Last-Modified value
196            (and validation against If-Modified-Since requests) will all be
197            relative to when the current Searcher was opened.
198            You can change it to lastModFrom="dirLastMod" if you want the
199            value to exactly corrispond to when the physical index was last
200            modified.
201               
202            etagSeed="..." is an option you can change to force the ETag
203            header (and validation against If-None-Match requests) to be
204            differnet even if the index has not changed (ie: when making
205            significant changes to your config file)
206
207            lastModifiedFrom and etagSeed are both ignored if you use the
208            never304="true" option.
209       -->
210       <!-- If you include a <cacheControl> directive, it will be used to
211            generate a Cache-Control header, as well as an Expires header
212            if the value contains "max-age="
213               
214            By default, no Cache-Control header is generated.
215
216            You can use the <cacheControl> option even if you have set
217            never304="true"
218       -->
219       <!-- <cacheControl>max-age=30, public</cacheControl> -->
220    </httpCaching>
221  </requestDispatcher>
222 
223     
224  <!-- requestHandler plugins... incoming queries will be dispatched to the
225     correct handler based on the path or the 'qt' param.
226     Names starting with a '/' are accessed with the a path equal to the
227     registered name.  Names without a leading '/' are accessed with:
228      http://host/app/select?qt=name
229     If no qt is defined, the requestHandler that declares default="true"
230     will be used.
231  -->
232  <requestHandler name="standard" class="solr.StandardRequestHandler" default="true">
233    <!-- default values for query parameters -->
234     <lst name="defaults">
235       <str name="echoParams">explicit</str>
236       <!--
237       <int name="rows">10</int>
238       <str name="fl">*</str>
239       <str name="version">2.1</str>
240        -->
241     </lst>
242  </requestHandler>
243 
244  <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
245    <lst name="defaults">
246                <str name="config">tika-data-config.xml</str>
247        </lst>
248  </requestHandler>
249   
250  <!--
251   
252   Search components are registered to SolrCore and used by Search Handlers
253   
254   By default, the following components are avaliable:
255   
256   <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
257   <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
258   <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
259   <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" />
260   <searchComponent name="debug"     class="org.apache.solr.handler.component.DebugComponent" />
261 
262   If you register a searchComponent to one of the standard names, that will be used instead.
263 
264   -->
265 
266  <requestHandler name="/search" class="org.apache.solr.handler.component.SearchHandler">
267    <lst name="defaults">
268      <str name="echoParams">explicit</str>
269    </lst>
270    <!--
271    By default, this will register the following components:
272   
273    <arr name="components">
274      <str>query</str>
275      <str>facet</str>
276      <str>mlt</str>
277      <str>highlight</str>
278      <str>debug</str>
279    </arr>
280   
281    To insert handlers before or after the 'standard' components, use:
282   
283    <arr name="first-components">
284      <str>first</str>
285    </arr>
286   
287    <arr name="last-components">
288      <str>last</str>
289    </arr>
290   
291    -->
292  </requestHandler>
293 
294  <!-- Update request handler. 
295 
296       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
297       the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
298       The response format differs from solr1.1 formatting and returns a standard error code.
299       
300       To enable solr1.1 behavior, remove the /update handler or change its path
301       
302       "update.processor.class" is the class name for the UpdateRequestProcessor.  It is initalized
303       only once.  This can not be changed for each request.
304    -->
305  <requestHandler name="/update" class="solr.UpdateRequestHandler" >
306    <!--
307    <str name="update.processor.class">org.apache.solr.handler.UpdateRequestProcessor</str>
308    -->
309  </requestHandler>
310 
311  <!-- config for the admin interface -->
312  <admin>
313    <defaultQuery>*:*</defaultQuery>
314  </admin>
315
316</config>
317
Note: See TracBrowser for help on using the repository browser.