11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

collations against the index. A value of 0 indicates that all documents should be collected, resulting in exact<br />

hit-counts. Otherwise an estimation is provided as a performance optimization in cases where exact hit-counts<br />

are unnecessary – the higher the value specified, the more precise the estimation.<br />

The default value for this parameter is 0, but when spellcheck.collateExtendedResults is false, the<br />

optimization is always used as if a 1 had been specified.<br />

The spellcheck.collateParam.* Parameter Prefix<br />

This parameter prefix can be used to specify any additional parameters that you wish to the Spellchecker to use<br />

when internally validating collation queries. For example, even if your regular search results allow for loose<br />

matching of one or more query terms via parameters like "q.op=OR& mm=20% " you can specify override params<br />

such as " spellcheck.collateParam.q.op=AND&spellcheck.collateParam.mm=100% " to require that<br />

only collations consisting of words that are all found in at least one document may be returned.<br />

The spellcheck.dictionary Parameter<br />

This parameter causes <strong>Solr</strong> to use the dictionary named in the parameter's argument. The default setting is<br />

"default". This parameter can be used to invoke a specific spellchecker on a per request basis.<br />

The spellcheck.accuracy Parameter<br />

Specifies an accuracy value to be used by the spell checking implementation to decide whether a result is<br />

worthwhile or not. The value is a float between 0 and 1. Defaults to Float.MIN_VALUE.<br />

The spellcheck..key Parameter<br />

Specifies a key/value pair for the implementation handling a given dictionary. The value that is passed through is<br />

just key=value ( spellcheck.. is stripped off.<br />

For example, given a dictionary called foo, spellcheck.foo.myKey=myValue would result in myKey=myVal<br />

ue being passed through to the implementation handling the dictionary foo.<br />

Example<br />

Using <strong>Solr</strong>'s " bin/solr -e techproducts" example, this query shows the results of a simple request that<br />

defines a query using the spellcheck.q parameter, and forces the collations to require all input terms must<br />

match:<br />

http://localhost:8983/solr/techproducts/spell?df=text&spellcheck.q=delll+ultra+sha<br />

rp&spellcheck=true&spellcheck.collateParam.q.op=AND<br />

Results:<br />

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

330

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

Saved successfully!

Ooh no, something went wrong!