|
18 | 18 | <config>
|
19 | 19 | <abortOnConfigurationError>true</abortOnConfigurationError>
|
20 | 20 |
|
| 21 | + <!-- |
| 22 | + Set the path for the ExtractingRequestHandler's libraries. See /update/extract handler |
| 23 | + declaration below |
| 24 | + --> |
| 25 | + <lib dir="../../dist/" regex="apache-solr-cell-\d.*\.jar" /> |
| 26 | + <lib dir="../../contrib/extraction/lib" /> |
| 27 | + |
21 | 28 | <!-- Used to specify an alternate directory to hold all index data
|
22 | 29 | other than the default ./data under the Solr home.
|
23 | 30 | If replication is in use, this should match the replication configuration. -->
|
|
75 | 82 |
|
76 | 83 | <!--
|
77 | 84 | This option specifies which Lucene LockFactory implementation to use.
|
78 |
| - |
| 85 | +
|
79 | 86 | single = SingleInstanceLockFactory - suggested for a read-only index
|
80 | 87 | or when there is no possibility of another process trying
|
81 | 88 | to modify the index.
|
|
98 | 105 | <maxMergeDocs>2147483647</maxMergeDocs>
|
99 | 106 | <maxFieldLength>10000</maxFieldLength>
|
100 | 107 |
|
101 |
| - <!-- If true, unlock any held write or commit locks on startup. |
| 108 | + <!-- If true, unlock any held write or commit locks on startup. |
102 | 109 | This defeats the locking mechanism that allows multiple
|
103 | 110 | processes to safely access a lucene index, and should be
|
104 | 111 | used with care.
|
105 | 112 | This is not needed if lock type is 'none' or 'single'
|
106 | 113 | -->
|
107 | 114 | <unlockOnStartup>false</unlockOnStartup>
|
108 | 115 | </mainIndex>
|
109 |
| - |
| 116 | + |
110 | 117 | <updateHandler class="solr.DirectUpdateHandler2">
|
111 | 118 | <!-- A prefix of "solr." for class names is an alias that
|
112 | 119 | causes solr to search appropriate packages, including
|
|
116 | 123 | <!-- Perform a <commit/> automatically under certain conditions:
|
117 | 124 | maxDocs - number of updates since last commit is greater than this
|
118 | 125 | maxTime - oldest uncommited update (in ms) is this long ago
|
119 |
| - <autoCommit> |
| 126 | + <autoCommit> |
120 | 127 | <maxDocs>10000</maxDocs>
|
121 |
| - <maxTime>1000</maxTime> |
| 128 | + <maxTime>1000</maxTime> |
122 | 129 | </autoCommit>
|
123 | 130 | -->
|
124 | 131 |
|
|
139 | 146 | </listener>
|
140 | 147 | -->
|
141 | 148 | <!-- A postOptimize event is fired only after every optimize command, useful
|
142 |
| - in conjunction with index distribution to only distribute optimized indicies |
| 149 | + in conjunction with index distribution to only distribute optimized indicies |
143 | 150 | <listener event="postOptimize" class="solr.RunExecutableListener">
|
144 | 151 | <str name="exe">snapshooter</str>
|
145 | 152 | <str name="dir">solr/bin</str>
|
146 | 153 | <bool name="wait">true</bool>
|
147 | 154 | </listener>
|
148 | 155 | -->
|
149 | 156 | </updateHandler>
|
150 |
| - |
| 157 | + |
151 | 158 | <query>
|
152 | 159 | <!-- Maximum number of clauses in a boolean query... can affect
|
153 | 160 | range or prefix queries that expand to big boolean
|
154 | 161 | queries. An exception is thrown if exceeded. -->
|
155 | 162 | <maxBooleanClauses>1024</maxBooleanClauses>
|
156 | 163 |
|
157 |
| - |
| 164 | + |
158 | 165 | <!-- Cache used by SolrIndexSearcher for filters (DocSets),
|
159 | 166 | unordered sets of *all* documents that match a query.
|
160 | 167 | When a new searcher is opened, its caches may be prepopulated
|
|
230 | 237 | then documents 0 through 49 will be collected and cached. Any further
|
231 | 238 | requests in that range can be satisfied via the cache. -->
|
232 | 239 | <queryResultWindowSize>50</queryResultWindowSize>
|
233 |
| - |
| 240 | + |
234 | 241 | <!-- Maximum number of documents to cache for any entry in the
|
235 | 242 | queryResultCache. -->
|
236 | 243 | <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
|
|
276 | 283 |
|
277 | 284 | </query>
|
278 | 285 |
|
279 |
| - <!-- |
| 286 | + <!-- |
280 | 287 | Let the dispatch filter handler /select?qt=XXX
|
281 | 288 | handleSelect=true will use consistent error handling for /select and /update
|
282 | 289 | handleSelect=false will use solr1.1 style error formatting
|
283 | 290 | -->
|
284 | 291 | <requestDispatcher handleSelect="true" >
|
285 | 292 | <!--Make sure your system has some authentication before enabling remote streaming! -->
|
286 | 293 | <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
|
287 |
| - |
| 294 | + |
288 | 295 | <!-- Set HTTP caching related parameters (for proxy caches and clients).
|
289 |
| - |
| 296 | +
|
290 | 297 | To get the behaviour of Solr 1.2 (ie: no caching related headers)
|
291 | 298 | use the never304="true" option and do not specify a value for
|
292 | 299 | <cacheControl>
|
|
300 | 307 | You can change it to lastModFrom="dirLastMod" if you want the
|
301 | 308 | value to exactly corrispond to when the physical index was last
|
302 | 309 | modified.
|
303 |
| - |
| 310 | +
|
304 | 311 | etagSeed="..." is an option you can change to force the ETag
|
305 | 312 | header (and validation against If-None-Match requests) to be
|
306 | 313 | differnet even if the index has not changed (ie: when making
|
|
312 | 319 | <!-- If you include a <cacheControl> directive, it will be used to
|
313 | 320 | generate a Cache-Control header, as well as an Expires header
|
314 | 321 | if the value contains "max-age="
|
315 |
| - |
| 322 | +
|
316 | 323 | By default, no Cache-Control header is generated.
|
317 | 324 |
|
318 | 325 | You can use the <cacheControl> option even if you have set
|
|
321 | 328 | <!-- <cacheControl>max-age=30, public</cacheControl> -->
|
322 | 329 | </httpCaching>
|
323 | 330 | </requestDispatcher>
|
324 |
| - |
| 331 | + |
325 | 332 | <!-- requestHandler plugins... incoming queries will be dispatched to the
|
326 | 333 | correct handler based on the path or the qt (query type) param.
|
327 |
| - Names starting with a '/' are accessed with the a path equal to the |
| 334 | + Names starting with a '/' are accessed with the a path equal to the |
328 | 335 | registered name. Names without a leading '/' are accessed with:
|
329 | 336 | http://host/app/select?qt=name
|
330 | 337 | If no qt is defined, the requestHandler that declares default="true"
|
|
335 | 342 | <str>spellcheck</str>
|
336 | 343 | </arr>
|
337 | 344 | </requestHandler>
|
338 |
| - |
| 345 | + |
339 | 346 | <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
|
340 |
| - |
| 347 | + |
341 | 348 | <!--
|
342 | 349 | Search components are registered to SolrCore and used by Search Handlers
|
343 |
| - |
| 350 | +
|
344 | 351 | By default, the following components are avaliable:
|
345 |
| - |
| 352 | +
|
346 | 353 | <searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" />
|
347 | 354 | <searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" />
|
348 | 355 | <searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" />
|
|
360 | 367 |
|
361 | 368 | If you register a searchComponent to one of the standard names, that will be used instead.
|
362 | 369 | To insert handlers before or after the 'standard' components, use:
|
363 |
| - |
| 370 | +
|
364 | 371 | <arr name="first-components">
|
365 | 372 | <str>myFirstComponentName</str>
|
366 | 373 | </arr>
|
367 |
| - |
| 374 | +
|
368 | 375 | <arr name="last-components">
|
369 | 376 | <str>myLastComponentName</str>
|
370 | 377 | </arr>
|
|
416 | 423 | <str>spellcheck</str>
|
417 | 424 | </arr>
|
418 | 425 | </requestHandler>
|
419 |
| - |
420 |
| - <!-- Update request handler. |
421 |
| - |
422 |
| - Note: Since solr1.1 requestHandlers requires a valid content type header if posted in |
| 426 | + |
| 427 | + <!-- Update request handler. |
| 428 | +
|
| 429 | + Note: Since solr1.1 requestHandlers requires a valid content type header if posted in |
423 | 430 | the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
|
424 | 431 | The response format differs from solr1.1 formatting and returns a standard error code.
|
425 |
| - |
| 432 | +
|
426 | 433 | To enable solr1.1 behavior, remove the /update handler or change its path
|
427 | 434 | -->
|
428 | 435 | <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
|
|
432 | 439 | for debugging and as a token server for other types of applications
|
433 | 440 | -->
|
434 | 441 | <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
|
435 |
| - |
| 442 | + |
436 | 443 |
|
437 | 444 | <!-- CSV update handler, loaded on demand -->
|
438 | 445 | <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
|
439 |
| - |
440 |
| - <!-- |
441 |
| - Admin Handlers - This will register all the standard admin RequestHandlers. Adding |
| 446 | + |
| 447 | + <!-- |
| 448 | + Solr Cell: http://wiki.apache.org/solr/ExtractingRequestHandler |
| 449 | +
|
| 450 | + NOTE: this loads on demand and requires some extra JAR dependencies. These are satisfied in |
| 451 | + the standard example project but might require adjusting in a multicore or other |
| 452 | + configuration where the relative directories above are no longer correct. |
| 453 | + --> |
| 454 | + <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler"> |
| 455 | + <lst name="defaults"> |
| 456 | + <str name="fmap.content">text</str> |
| 457 | + <str name="lowernames">true</str> |
| 458 | + <str name="uprefix">attr_</str> |
| 459 | + <str name="captureAttr">false</str> |
| 460 | + </lst> |
| 461 | + </requestHandler> |
| 462 | + |
| 463 | + <!-- |
| 464 | + Admin Handlers - This will register all the standard admin RequestHandlers. Adding |
442 | 465 | this single handler is equivolent to registering:
|
443 |
| - |
| 466 | +
|
444 | 467 | <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
445 | 468 | <requestHandler name="/admin/system" class="org.apache.solr.handler.admin.SystemInfoHandler" />
|
446 | 469 | <requestHandler name="/admin/plugins" class="org.apache.solr.handler.admin.PluginInfoHandler" />
|
447 | 470 | <requestHandler name="/admin/threads" class="org.apache.solr.handler.admin.ThreadDumpHandler" />
|
448 | 471 | <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
|
449 | 472 | <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
450 |
| - |
| 473 | +
|
451 | 474 | If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
|
452 | 475 | <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
|
453 | 476 | <lst name="invariants">
|
454 |
| - <str name="hidden">synonyms.txt</str> |
455 |
| - <str name="hidden">anotherfile.txt</str> |
| 477 | + <str name="hidden">synonyms.txt</str> |
| 478 | + <str name="hidden">anotherfile.txt</str> |
456 | 479 | </lst>
|
457 | 480 | </requestHandler>
|
458 | 481 | -->
|
459 | 482 | <requestHandler name="/admin/luke" class="org.apache.solr.handler.admin.LukeRequestHandler" />
|
460 |
| - |
| 483 | + |
461 | 484 | <!-- ping/healthcheck -->
|
462 | 485 | <requestHandler name="/admin/ping" class="PingRequestHandler">
|
463 | 486 | <lst name="defaults">
|
|
466 | 489 | <str name="echoParams">all</str>
|
467 | 490 | </lst>
|
468 | 491 | </requestHandler>
|
469 |
| - |
| 492 | + |
470 | 493 | <highlighting>
|
471 | 494 | <!-- Configure the standard fragmenter -->
|
472 | 495 | <!-- This could most likely be commented out in the "default" case -->
|
|
482 | 505 | <!-- slightly smaller fragsizes work better because of slop -->
|
483 | 506 | <int name="hl.fragsize">70</int>
|
484 | 507 | <!-- allow 50% slop on fragment sizes -->
|
485 |
| - <float name="hl.regex.slop">0.5</float> |
| 508 | + <float name="hl.regex.slop">0.5</float> |
486 | 509 | <!-- a basic sentence pattern -->
|
487 | 510 | <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
|
488 | 511 | </lst>
|
489 | 512 | </fragmenter>
|
490 |
| - |
| 513 | + |
491 | 514 | <!-- Configure the standard formatter -->
|
492 | 515 | <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
|
493 | 516 | <lst name="defaults">
|
|
496 | 519 | </lst>
|
497 | 520 | </formatter>
|
498 | 521 | </highlighting>
|
499 |
| - |
500 |
| - |
| 522 | + |
| 523 | + |
501 | 524 | <!-- queryResponseWriter plugins... query responses will be written using the
|
502 | 525 | writer specified by the 'wt' request parameter matching the name of a registered
|
503 | 526 | writer.
|
504 |
| - The "default" writer is the default and will be used if 'wt' is not specified |
| 527 | + The "default" writer is the default and will be used if 'wt' is not specified |
505 | 528 | in the request. XMLResponseWriter will be used if nothing is specified here.
|
506 | 529 | The json, python, and ruby writers are also available by default.
|
507 | 530 |
|
|
516 | 539 | -->
|
517 | 540 | <queryResponseWriter name="xml" class="org.apache.solr.request.XMLResponseWriter" default="true"/>
|
518 | 541 | <queryResponseWriter name="json" class="org.apache.solr.request.JSONResponseWriter"/>
|
519 |
| - |
| 542 | + |
520 | 543 | <!-- example of registering a query parser
|
521 | 544 | <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
|
522 | 545 | -->
|
523 | 546 |
|
524 |
| - <!-- example of registering a custom function parser |
| 547 | + <!-- example of registering a custom function parser |
525 | 548 | <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
|
526 | 549 | -->
|
527 |
| - |
| 550 | + |
528 | 551 | <!-- config for the admin interface -->
|
529 | 552 | <admin>
|
530 | 553 | <defaultQuery>solr</defaultQuery>
|
531 |
| - |
| 554 | + |
532 | 555 | <!-- configure a healthcheck file for servers behind a loadbalancer
|
533 | 556 | <healthcheck type="file">server-enabled</healthcheck>
|
534 | 557 | -->
|
|
0 commit comments