[7588] | 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 | <jmx /> |
---|
| 30 | |
---|
| 31 | <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" /> |
---|
| 32 | |
---|
| 33 | <!-- <indexConfig> section could go here, but we want the defaults --> |
---|
| 34 | |
---|
| 35 | <!-- the default high-performance update handler --> |
---|
| 36 | <updateHandler class="solr.DirectUpdateHandler2"> |
---|
| 37 | |
---|
| 38 | <!-- A prefix of "solr." for class names is an alias that |
---|
| 39 | causes solr to search appropriate packages, including |
---|
| 40 | org.apache.solr.(search|update|request|core|analysis) |
---|
| 41 | --> |
---|
| 42 | |
---|
| 43 | <!-- Limit the number of deletions Solr will buffer during doc updating. |
---|
| 44 | |
---|
| 45 | Setting this lower can help bound memory use during indexing. |
---|
| 46 | --> |
---|
| 47 | <maxPendingDeletes>100000</maxPendingDeletes> |
---|
| 48 | |
---|
| 49 | <!-- Perform a <commit/> automatically under certain conditions: |
---|
| 50 | |
---|
| 51 | maxDocs - number of updates since last commit is greater than this |
---|
| 52 | maxTime - oldest uncommited update (in ms) is this long ago |
---|
| 53 | <autoCommit> |
---|
| 54 | <maxDocs>10000</maxDocs> |
---|
| 55 | <maxTime>1000</maxTime> |
---|
| 56 | </autoCommit> |
---|
| 57 | --> |
---|
| 58 | |
---|
| 59 | <!-- The RunExecutableListener executes an external command. |
---|
| 60 | exe - the name of the executable to run |
---|
| 61 | dir - dir to use as the current working directory. default="." |
---|
| 62 | wait - the calling thread waits until the executable returns. default="true" |
---|
| 63 | args - the arguments to pass to the program. default=nothing |
---|
| 64 | env - environment variables to set. default=nothing |
---|
| 65 | --> |
---|
| 66 | <!-- A postCommit event is fired after every commit or optimize command |
---|
| 67 | <listener event="postCommit" class="solr.RunExecutableListener"> |
---|
| 68 | <str name="exe">solr/bin/snapshooter</str> |
---|
| 69 | <str name="dir">.</str> |
---|
| 70 | <bool name="wait">true</bool> |
---|
| 71 | <arr name="args"> <str>arg1</str> <str>arg2</str> </arr> |
---|
| 72 | <arr name="env"> <str>MYVAR=val1</str> </arr> |
---|
| 73 | </listener> |
---|
| 74 | --> |
---|
| 75 | <!-- A postOptimize event is fired only after every optimize command, useful |
---|
| 76 | in conjunction with index distribution to only distribute optimized indicies |
---|
| 77 | <listener event="postOptimize" class="solr.RunExecutableListener"> |
---|
| 78 | <str name="exe">snapshooter</str> |
---|
| 79 | <str name="dir">solr/bin</str> |
---|
| 80 | <bool name="wait">true</bool> |
---|
| 81 | </listener> |
---|
| 82 | --> |
---|
| 83 | |
---|
| 84 | </updateHandler> |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | <query> |
---|
| 88 | <!-- Maximum number of clauses in a boolean query... can affect |
---|
| 89 | range or prefix queries that expand to big boolean |
---|
| 90 | queries. An exception is thrown if exceeded. --> |
---|
| 91 | <maxBooleanClauses>1024</maxBooleanClauses> |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | <!-- Cache used by SolrIndexSearcher for filters (DocSets), |
---|
| 95 | unordered sets of *all* documents that match a query. |
---|
| 96 | When a new searcher is opened, its caches may be prepopulated |
---|
| 97 | or "autowarmed" using data from caches in the old searcher. |
---|
| 98 | autowarmCount is the number of items to prepopulate. For LRUCache, |
---|
| 99 | the autowarmed items will be the most recently accessed items. |
---|
| 100 | Parameters: |
---|
| 101 | class - the SolrCache implementation (currently only LRUCache) |
---|
| 102 | size - the maximum number of entries in the cache |
---|
| 103 | initialSize - the initial capacity (number of entries) of |
---|
| 104 | the cache. (seel java.util.HashMap) |
---|
| 105 | autowarmCount - the number of entries to prepopulate from |
---|
| 106 | and old cache. |
---|
| 107 | --> |
---|
| 108 | <filterCache |
---|
| 109 | class="solr.LRUCache" |
---|
| 110 | size="512" |
---|
| 111 | initialSize="512" |
---|
| 112 | autowarmCount="256"/> |
---|
| 113 | |
---|
| 114 | <!-- queryResultCache caches results of searches - ordered lists of |
---|
| 115 | document ids (DocList) based on a query, a sort, and the range |
---|
| 116 | of documents requested. --> |
---|
| 117 | <queryResultCache |
---|
| 118 | class="solr.LRUCache" |
---|
| 119 | size="512" |
---|
| 120 | initialSize="512" |
---|
| 121 | autowarmCount="256"/> |
---|
| 122 | |
---|
| 123 | <!-- documentCache caches Lucene Document objects (the stored fields for each document). |
---|
| 124 | Since Lucene internal document ids are transient, this cache will not be autowarmed. --> |
---|
| 125 | <documentCache |
---|
| 126 | class="solr.LRUCache" |
---|
| 127 | size="512" |
---|
| 128 | initialSize="512" |
---|
| 129 | autowarmCount="0"/> |
---|
| 130 | |
---|
| 131 | <!-- If true, stored fields that are not requested will be loaded lazily. |
---|
| 132 | |
---|
| 133 | This can result in a significant speed improvement if the usual case is to |
---|
| 134 | not load all stored fields, especially if the skipped fields are large compressed |
---|
| 135 | text fields. |
---|
| 136 | --> |
---|
| 137 | <enableLazyFieldLoading>true</enableLazyFieldLoading> |
---|
| 138 | |
---|
| 139 | <!-- Example of a generic cache. These caches may be accessed by name |
---|
| 140 | through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert(). |
---|
| 141 | The purpose is to enable easy caching of user/application level data. |
---|
| 142 | The regenerator argument should be specified as an implementation |
---|
| 143 | of solr.search.CacheRegenerator if autowarming is desired. --> |
---|
| 144 | <!-- |
---|
| 145 | <cache name="myUserCache" |
---|
| 146 | class="solr.LRUCache" |
---|
| 147 | size="4096" |
---|
| 148 | initialSize="1024" |
---|
| 149 | autowarmCount="1024" |
---|
| 150 | regenerator="org.mycompany.mypackage.MyRegenerator" |
---|
| 151 | /> |
---|
| 152 | --> |
---|
| 153 | |
---|
| 154 | <!-- An optimization that attempts to use a filter to satisfy a search. |
---|
| 155 | If the requested sort does not include score, then the filterCache |
---|
| 156 | will be checked for a filter matching the query. If found, the filter |
---|
| 157 | will be used as the source of document ids, and then the sort will be |
---|
| 158 | applied to that. |
---|
| 159 | <useFilterForSortedQuery>true</useFilterForSortedQuery> |
---|
| 160 | --> |
---|
| 161 | |
---|
| 162 | <!-- An optimization for use with the queryResultCache. When a search |
---|
| 163 | is requested, a superset of the requested number of document ids |
---|
| 164 | are collected. For example, if a search for a particular query |
---|
| 165 | requests matching documents 10 through 19, and queryWindowSize is 50, |
---|
| 166 | then documents 0 through 49 will be collected and cached. Any further |
---|
| 167 | requests in that range can be satisfied via the cache. --> |
---|
| 168 | <queryResultWindowSize>50</queryResultWindowSize> |
---|
| 169 | |
---|
| 170 | <!-- Maximum number of documents to cache for any entry in the |
---|
| 171 | queryResultCache. --> |
---|
| 172 | <queryResultMaxDocsCached>200</queryResultMaxDocsCached> |
---|
| 173 | |
---|
| 174 | <!-- This entry enables an int hash representation for filters (DocSets) |
---|
| 175 | when the number of items in the set is less than maxSize. For smaller |
---|
| 176 | sets, this representation is more memory efficient, more efficient to |
---|
| 177 | iterate over, and faster to take intersections. --> |
---|
| 178 | <HashDocSet maxSize="3000" loadFactor="0.75"/> |
---|
| 179 | |
---|
| 180 | <!-- a newSearcher event is fired whenever a new searcher is being prepared |
---|
| 181 | and there is a current searcher handling requests (aka registered). --> |
---|
| 182 | <!-- QuerySenderListener takes an array of NamedList and executes a |
---|
| 183 | local query request for each NamedList in sequence. --> |
---|
| 184 | <listener event="newSearcher" class="solr.QuerySenderListener"> |
---|
| 185 | <arr name="queries"> |
---|
| 186 | <lst> <str name="q">solr</str> <str name="start">0</str> <str name="rows">10</str> </lst> |
---|
| 187 | <lst> <str name="q">rocks</str> <str name="start">0</str> <str name="rows">10</str> </lst> |
---|
| 188 | <lst><str name="q">static newSearcher warming query from solrconfig.xml</str></lst> |
---|
| 189 | </arr> |
---|
| 190 | </listener> |
---|
| 191 | |
---|
| 192 | <!-- a firstSearcher event is fired whenever a new searcher is being |
---|
| 193 | prepared but there is no current registered searcher to handle |
---|
| 194 | requests or to gain autowarming data from. --> |
---|
| 195 | <listener event="firstSearcher" class="solr.QuerySenderListener"> |
---|
| 196 | <arr name="queries"> |
---|
| 197 | </arr> |
---|
| 198 | </listener> |
---|
| 199 | |
---|
| 200 | <!-- If a search request comes in and there is no current registered searcher, |
---|
| 201 | then immediately register the still warming searcher and use it. If |
---|
| 202 | "false" then all requests will block until the first searcher is done |
---|
| 203 | warming. --> |
---|
| 204 | <useColdSearcher>false</useColdSearcher> |
---|
| 205 | |
---|
| 206 | <!-- Maximum number of searchers that may be warming in the background |
---|
| 207 | concurrently. An error is returned if this limit is exceeded. Recommend |
---|
| 208 | 1-2 for read-only slaves, higher for masters w/o cache warming. --> |
---|
| 209 | <maxWarmingSearchers>4</maxWarmingSearchers> |
---|
| 210 | |
---|
| 211 | </query> |
---|
| 212 | |
---|
| 213 | <!-- |
---|
| 214 | Let the dispatch filter handler /select?qt=XXX |
---|
| 215 | handleSelect=true will use consistent error handling for /select and /update |
---|
| 216 | handleSelect=false will use solr1.1 style error formatting |
---|
| 217 | --> |
---|
| 218 | <requestDispatcher handleSelect="true" > |
---|
| 219 | <!--Make sure your system has some authentication before enabling remote streaming! --> |
---|
| 220 | <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" /> |
---|
| 221 | |
---|
| 222 | <!-- Set HTTP caching related parameters (for proxy caches and clients). |
---|
| 223 | |
---|
| 224 | To get the behaviour of Solr 1.2 (ie: no caching related headers) |
---|
| 225 | use the never304="true" option and do not specify a value for |
---|
| 226 | <cacheControl> |
---|
| 227 | --> |
---|
| 228 | <httpCaching never304="true"> |
---|
| 229 | <!--httpCaching lastModifiedFrom="openTime" |
---|
| 230 | etagSeed="Solr"--> |
---|
| 231 | <!-- lastModFrom="openTime" is the default, the Last-Modified value |
---|
| 232 | (and validation against If-Modified-Since requests) will all be |
---|
| 233 | relative to when the current Searcher was opened. |
---|
| 234 | You can change it to lastModFrom="dirLastMod" if you want the |
---|
| 235 | value to exactly corrispond to when the physical index was last |
---|
| 236 | modified. |
---|
| 237 | |
---|
| 238 | etagSeed="..." is an option you can change to force the ETag |
---|
| 239 | header (and validation against If-None-Match requests) to be |
---|
| 240 | differnet even if the index has not changed (ie: when making |
---|
| 241 | significant changes to your config file) |
---|
| 242 | |
---|
| 243 | lastModifiedFrom and etagSeed are both ignored if you use the |
---|
| 244 | never304="true" option. |
---|
| 245 | --> |
---|
| 246 | <!-- If you include a <cacheControl> directive, it will be used to |
---|
| 247 | generate a Cache-Control header, as well as an Expires header |
---|
| 248 | if the value contains "max-age=" |
---|
| 249 | |
---|
| 250 | By default, no Cache-Control header is generated. |
---|
| 251 | |
---|
| 252 | You can use the <cacheControl> option even if you have set |
---|
| 253 | never304="true" |
---|
| 254 | --> |
---|
| 255 | <!-- <cacheControl>max-age=30, public</cacheControl> --> |
---|
| 256 | </httpCaching> |
---|
| 257 | </requestDispatcher> |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | <!-- requestHandler plugins... incoming queries will be dispatched to the |
---|
| 261 | correct handler based on the path or the 'qt' param. |
---|
| 262 | Names starting with a '/' are accessed with the a path equal to the |
---|
| 263 | registered name. Names without a leading '/' are accessed with: |
---|
| 264 | http://host/app/select?qt=name |
---|
| 265 | If no qt is defined, the requestHandler that declares default="true" |
---|
| 266 | will be used. |
---|
| 267 | --> |
---|
| 268 | <requestHandler name="standard" class="solr.StandardRequestHandler" default="true"> |
---|
| 269 | <!-- default values for query parameters --> |
---|
| 270 | <lst name="defaults"> |
---|
| 271 | <str name="echoParams">explicit</str> |
---|
| 272 | <!-- |
---|
| 273 | <int name="rows">10</int> |
---|
| 274 | <str name="fl">*</str> |
---|
| 275 | <str name="version">2.1</str> |
---|
| 276 | --> |
---|
| 277 | </lst> |
---|
| 278 | </requestHandler> |
---|
| 279 | |
---|
| 280 | <!-- SpellCheckerRequestHandler takes in a word (or several words) as the |
---|
| 281 | value of the "q" parameter and returns a list of alternative spelling |
---|
| 282 | suggestions. If invoked with a ...&cmd=rebuild, it will rebuild the |
---|
| 283 | spellchecker index. |
---|
| 284 | --> |
---|
| 285 | <requestHandler name="spellchecker" class="solr.SpellCheckerRequestHandler" startup="lazy"> |
---|
| 286 | <!-- default values for query parameters --> |
---|
| 287 | <lst name="defaults"> |
---|
| 288 | <int name="suggestionCount">1</int> |
---|
| 289 | <float name="accuracy">0.5</float> |
---|
| 290 | </lst> |
---|
| 291 | |
---|
| 292 | <!-- Main init params for handler --> |
---|
| 293 | |
---|
| 294 | <!-- The directory where your SpellChecker Index should live. --> |
---|
| 295 | <!-- May be absolute, or relative to the Solr "dataDir" directory. --> |
---|
| 296 | <!-- If this option is not specified, a RAM directory will be used --> |
---|
| 297 | <str name="spellcheckerIndexDir">spell</str> |
---|
| 298 | |
---|
| 299 | <!-- the field in your schema that you want to be able to build --> |
---|
| 300 | <!-- your spell index on. This should be a field that uses a very --> |
---|
| 301 | <!-- simple FieldType without a lot of Analysis (ie: string) --> |
---|
| 302 | <str name="termSourceField">word</str> |
---|
| 303 | |
---|
| 304 | </requestHandler> |
---|
| 305 | |
---|
| 306 | <requestHandler name="/mlt" class="solr.MoreLikeThisHandler"> |
---|
| 307 | <lst name="defaults"> |
---|
| 308 | <str name="mlt.fl">manu,cat</str> |
---|
| 309 | <int name="mlt.mindf">1</int> |
---|
| 310 | </lst> |
---|
| 311 | </requestHandler> |
---|
| 312 | |
---|
| 313 | <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> |
---|
| 314 | <lst name="defaults"> |
---|
| 315 | <str name="config">solr-data-config.xml</str> |
---|
| 316 | </lst> |
---|
| 317 | </requestHandler> |
---|
| 318 | |
---|
| 319 | <!-- |
---|
| 320 | |
---|
| 321 | Search components are registered to SolrCore and used by Search Handlers |
---|
| 322 | |
---|
| 323 | By default, the following components are avaliable: |
---|
| 324 | |
---|
| 325 | <searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" /> |
---|
| 326 | <searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" /> |
---|
| 327 | <searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" /> |
---|
| 328 | <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" /> |
---|
| 329 | <searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" /> |
---|
| 330 | |
---|
| 331 | If you register a searchComponent to one of the standard names, that will be used instead. |
---|
| 332 | |
---|
| 333 | --> |
---|
| 334 | |
---|
| 335 | <requestHandler name="/search" class="org.apache.solr.handler.component.SearchHandler"> |
---|
| 336 | <lst name="defaults"> |
---|
| 337 | <str name="echoParams">explicit</str> |
---|
| 338 | </lst> |
---|
| 339 | <!-- |
---|
| 340 | By default, this will register the following components: |
---|
| 341 | |
---|
| 342 | <arr name="components"> |
---|
| 343 | <str>query</str> |
---|
| 344 | <str>facet</str> |
---|
| 345 | <str>mlt</str> |
---|
| 346 | <str>highlight</str> |
---|
| 347 | <str>debug</str> |
---|
| 348 | </arr> |
---|
| 349 | |
---|
| 350 | To insert handlers before or after the 'standard' components, use: |
---|
| 351 | |
---|
| 352 | <arr name="first-components"> |
---|
| 353 | <str>first</str> |
---|
| 354 | </arr> |
---|
| 355 | |
---|
| 356 | <arr name="last-components"> |
---|
| 357 | <str>last</str> |
---|
| 358 | </arr> |
---|
| 359 | |
---|
| 360 | --> |
---|
| 361 | </requestHandler> |
---|
| 362 | |
---|
| 363 | <searchComponent name="elevator" class="org.apache.solr.handler.component.QueryElevationComponent" > |
---|
| 364 | <!-- pick a fieldType to analyze queries --> |
---|
| 365 | <str name="queryFieldType">string</str> |
---|
| 366 | <str name="config-file">elevate.xml</str> |
---|
| 367 | </searchComponent> |
---|
| 368 | |
---|
| 369 | <requestHandler name="/elevate" class="org.apache.solr.handler.component.SearchHandler" startup="lazy"> |
---|
| 370 | <lst name="defaults"> |
---|
| 371 | <str name="echoParams">explicit</str> |
---|
| 372 | </lst> |
---|
| 373 | <arr name="last-components"> |
---|
| 374 | <str>elevator</str> |
---|
| 375 | </arr> |
---|
| 376 | </requestHandler> |
---|
| 377 | |
---|
| 378 | |
---|
| 379 | |
---|
| 380 | <!-- Update request handler. |
---|
| 381 | |
---|
| 382 | Note: Since solr1.1 requestHandlers requires a valid content type header if posted in |
---|
| 383 | the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8' |
---|
| 384 | The response format differs from solr1.1 formatting and returns a standard error code. |
---|
| 385 | |
---|
| 386 | To enable solr1.1 behavior, remove the /update handler or change its path |
---|
| 387 | |
---|
| 388 | "update.processor.class" is the class name for the UpdateRequestProcessor. It is initalized |
---|
| 389 | only once. This can not be changed for each request. |
---|
| 390 | --> |
---|
| 391 | <requestHandler name="/update" class="solr.UpdateRequestHandler" /> |
---|
| 392 | |
---|
| 393 | |
---|
| 394 | <!-- |
---|
| 395 | Admin Handlers - This will register all the standard admin RequestHandlers. Adding |
---|
| 396 | this single handler is equivolent to registering: |
---|
| 397 | |
---|
| 398 | <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" /> |
---|
| 399 | <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" /> |
---|
| 400 | <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" /> |
---|
| 401 | <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" /> |
---|
| 402 | <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" /> |
---|
| 403 | <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" > |
---|
| 404 | |
---|
| 405 | If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using: |
---|
| 406 | <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" > |
---|
| 407 | <lst name="invariants"> |
---|
| 408 | <str name="hidden">synonyms.txt</str> |
---|
| 409 | <str name="hidden">anotherfile.txt</str> |
---|
| 410 | </lst> |
---|
| 411 | </requestHandler> |
---|
| 412 | --> |
---|
| 413 | <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" /> |
---|
| 414 | |
---|
| 415 | <!-- Echo the request contents back to the client --> |
---|
| 416 | <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" > |
---|
| 417 | <lst name="defaults"> |
---|
| 418 | <str name="echoParams">explicit</str> <!-- for all params (including the default etc) use: 'all' --> |
---|
| 419 | <str name="echoHandler">true</str> |
---|
| 420 | </lst> |
---|
| 421 | </requestHandler> |
---|
| 422 | |
---|
| 423 | <highlighting> |
---|
| 424 | <!-- Configure the standard fragmenter --> |
---|
| 425 | <!-- This could most likely be commented out in the "default" case --> |
---|
| 426 | <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true"> |
---|
| 427 | <lst name="defaults"> |
---|
| 428 | <int name="hl.fragsize">100</int> |
---|
| 429 | </lst> |
---|
| 430 | </fragmenter> |
---|
| 431 | |
---|
| 432 | <!-- A regular-expression-based fragmenter (f.i., for sentence extraction) --> |
---|
| 433 | <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter"> |
---|
| 434 | <lst name="defaults"> |
---|
| 435 | <!-- slightly smaller fragsizes work better because of slop --> |
---|
| 436 | <int name="hl.fragsize">70</int> |
---|
| 437 | <!-- allow 50% slop on fragment sizes --> |
---|
| 438 | <float name="hl.regex.slop">0.5</float> |
---|
| 439 | <!-- a basic sentence pattern --> |
---|
| 440 | <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> |
---|
| 441 | </lst> |
---|
| 442 | </fragmenter> |
---|
| 443 | |
---|
| 444 | <!-- Configure the standard formatter --> |
---|
| 445 | <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true"> |
---|
| 446 | <lst name="defaults"> |
---|
| 447 | <str name="hl.simple.pre"><![CDATA[<em>]]></str> |
---|
| 448 | <str name="hl.simple.post"><![CDATA[</em>]]></str> |
---|
| 449 | </lst> |
---|
| 450 | </formatter> |
---|
| 451 | </highlighting> |
---|
| 452 | |
---|
| 453 | |
---|
| 454 | <!-- queryResponseWriter plugins... query responses will be written using the |
---|
| 455 | writer specified by the 'wt' request parameter matching the name of a registered |
---|
| 456 | writer. |
---|
| 457 | The "default" writer is the default and will be used if 'wt' is not specified |
---|
| 458 | in the request. XMLResponseWriter will be used if nothing is specified here. |
---|
| 459 | The json, python, and ruby writers are also available by default. |
---|
| 460 | |
---|
| 461 | <queryResponseWriter name="xml" class="solr.XMLResponseWriter" default="true"/> |
---|
| 462 | <queryResponseWriter name="json" class="solr.JSONResponseWriter"/> |
---|
| 463 | <queryResponseWriter name="python" class="solr.PythonResponseWriter"/> |
---|
| 464 | <queryResponseWriter name="ruby" class="solr.RubyResponseWriter"/> |
---|
| 465 | <queryResponseWriter name="php" class="solr.PHPResponseWriter"/> |
---|
| 466 | <queryResponseWriter name="phps" class="solr.PHPSerializedResponseWriter"/> |
---|
| 467 | |
---|
| 468 | <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/> |
---|
| 469 | --> |
---|
| 470 | |
---|
| 471 | <!-- XSLT response writer transforms the XML output by any xslt file found |
---|
| 472 | in Solr's conf/xslt directory. Changes to xslt files are checked for |
---|
| 473 | every xsltCacheLifetimeSeconds. |
---|
| 474 | --> |
---|
| 475 | <queryResponseWriter name="xslt" class="solr.XSLTResponseWriter"> |
---|
| 476 | <int name="xsltCacheLifetimeSeconds">5</int> |
---|
| 477 | </queryResponseWriter> |
---|
| 478 | |
---|
| 479 | <!-- config for the admin interface --> |
---|
| 480 | <admin> |
---|
| 481 | <defaultQuery>*:*</defaultQuery> |
---|
| 482 | </admin> |
---|
| 483 | |
---|
| 484 | </config> |
---|
| 485 | |
---|