11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

wordbreak<br />

solr.WordBreak<strong>Solr</strong>SpellChecker<br />

lowerfilt<br />

true<br />

true<br />

10<br />

<br />

<br />

Some of the parameters will be familiar from the discussion of the other spell checkers, such as name,<br />

classna<br />

me, and field. New for this spell checker is combineWords, which defines whether words should be combined<br />

in a dictionary search (default is true); breakWords, which defines if words should be broken during a dictionary<br />

search (default is true); and maxChanges, an integer which defines how many times the spell checker should<br />

check collation possibilities against the index (default is 10).<br />

The spellchecker can be configured with a traditional checker (ie: Direct<strong>Solr</strong>SpellChecker). The results are<br />

combined and collations can contain a mix of corrections from both spellcheckers.<br />

Add It to a Request Handler<br />

Queries will be sent to a RequestHandler. If every request should generate a suggestion, then you would add the<br />

following to the requestHandler that you are using:<br />

true<br />

One of the possible parameters is the spellcheck.dictionary to use, and multiples can be defined. With<br />

multiple dictionaries, all specified dictionaries are consulted and results are interleaved. Collations are created<br />

with combinations from the different spellcheckers, with care taken that multiple overlapping corrections do not<br />

occur in the same collation.<br />

Here is an example with multiple dictionaries:<br />

<br />

<br />

default<br />

wordbreak<br />

20<br />

<br />

<br />

spellcheck<br />

<br />

<br />

Spell Check Parameters<br />

The SpellCheck component accepts the parameters described in the table below.<br />

Parameter<br />

Description<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

326

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!