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.

solrconfig.xml<br />

<br />

<br />

mySuggester<br />

AnalyzingInfixLookupFactory<br />

DocumentDictionaryFactory<br />

name<br />

price<br />

cat<br />

string<br />

false<br />

<br />

<br />

Example context filtering suggest query:<br />

http://localhost:8983/solr/techproducts/suggest?suggest=true&suggest.build=true& \<br />

suggest.dictionary=mySuggester&wt=json&suggest.q=c&suggest.cfq=memory<br />

The suggester will only bring back suggestions for products tagged with cat=memory.<br />

MoreLikeThis<br />

The MoreLikeThis search component enables users to query for documents similar to a document in their<br />

result list. It does this by using terms from the original document to find similar documents in the index.<br />

There are three ways to use MoreLikeThis. The first, and most common, is to use it as a request handler. In this<br />

case, you would send text to the MoreLikeThis request handler as needed (as in when a user clicked on a<br />

"similar documents" link). The second is to use it as a search component. This is less desirable since it performs<br />

the MoreLikeThis analysis on every document returned. This may slow search results. The final approach is to<br />

use it as a request handler but with externally supplied text. This case, also referred to as the<br />

MoreLikeThisHandler, will supply information about similar documents in the index based on the text of the input<br />

document.<br />

Covered in this section:<br />

How MoreLikeThis Works<br />

Common Parameters for MoreLikeThis<br />

Parameters for the MoreLikeThisComponent<br />

Parameters for the MoreLikeThisHandler<br />

More Like This Query Parser<br />

Related Topics<br />

How MoreLikeThis Works<br />

MoreLikeThis constructs a Lucene query based on terms in a document. It does this by pulling terms from the<br />

defined list of fields ( see the mlt.fl parameter, below). For best results, the fields should have stored term<br />

vectors in schema.xml. For example:<br />

<br />

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

345

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

Saved successfully!

Ooh no, something went wrong!