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.

<br />

true<br />

10<br />

<br />

<br />

suggest<br />

<br />

<br />

Suggest Request Handler Parameters<br />

The following parameters allow you to set defaults for the Suggest request handler:<br />

Parameter<br />

suggest=true<br />

suggest.dictionary<br />

suggest.q<br />

suggest.count<br />

suggest.cfq<br />

suggest.build<br />

suggest.reload<br />

suggest.buildAll<br />

suggest.reloadAll<br />

Description<br />

This parameter should always be true, because we always want to run the Suggester for<br />

queries submitted to this handler.<br />

The name of the dictionary component configured in the search component. This is a<br />

mandatory parameter. It can be set in the request handler, or sent as a parameter at<br />

query time.<br />

The query to use for suggestion lookups.<br />

Specifies the number of suggestions for <strong>Solr</strong> to return.<br />

A Context Filter Query used to filter suggestions based on the context field, if supported<br />

by the suggester.<br />

If true, it will build the suggester index. This is likely useful only for initial requests; you<br />

would probably not want to build the dictionary on every request, particularly in a<br />

production system. If you would like to keep your dictionary up to date, you should use<br />

the buildOnCommit or buildOnOptimize parameter for the search component.<br />

If true, it will reload the suggester index.<br />

If true, it will build all suggester indexes.<br />

If true, it will reload all suggester indexes.<br />

These properties can also be overridden at query time, or not set in the request handler at all and always sent at<br />

query time.<br />

Context Filtering<br />

Context filtering ( suggest.cfq) is currently only supported by AnalyzingInfixLookupFactory and<br />

BlendedInfixLookupFactory, and only when backed by a Document*Dictionary. All other implementations<br />

will return unfiltered matches as if filtering was not requested.<br />

Example Usages<br />

Get Suggestions with Weights<br />

This is the basic suggestion using a single dictionary and a single <strong>Solr</strong> core.<br />

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

342

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

Saved successfully!

Ooh no, something went wrong!