MoreLikeThis

There are two ways to access [WWW] MoreLikeThis from solr: from the MoreLikeThisHandler or with the StandardRequestHandler.

<!> Solr1.3

  1. TermVectors, Analyzers and MoreLikeThis
  2. Common Parameters
  3. StandardRequestHandler
  4. MoreLikeThisHandler

TermVectors, Analyzers and MoreLikeThis

MoreLikeThis constructs a lucene query based on terms within a document. For best results, use stored TermVectors in the schema.xml for fields you will use for similarity.

 <field name="cat" ... termVectors="true" />

If termVectors are not stored, MoreLikeThis will generate terms from stored fields.

Common Parameters

param

description

mlt.fl

The fields to use for similarity. NOTE: if possible, these should have a stored TermVector

mlt.mintf

Minimum Term Frequency - the frequency below which terms will be ignored in the source doc.

mlt.mindf

Minimum Document Frequency - the frequency at which words will be ignored which do not occur in at least this many docs.

mlt.minwl

minimum word length below which words will be ignored.

mlt.maxwl

maximum word length above which words will be ignored.

mlt.maxqt

maximum number of query terms that will be included in any generated query.

mlt.maxntp

maximum number of tokens to parse in each example doc field that is not stored with TermVector support.

mlt.boost

[true/false] set if the query will be boosted by the interesting term relevance.

mlt.qf

Query fields and their boosts using the same format as that used in DisMaxRequestHandler. These fields must also be specified in mlt.fl.

StandardRequestHandler

This method returns similar documents for each document in the response set. Perhaps this should be called "MoreLikeThese"

param

description

mlt

'true' to enable MoreLikeThis results

mlt.count

The number of similar documents to return for each result.

examples

[WWW] http://localhost:8983/solr/select?q=apache&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&fl=id,score

MoreLikeThisHandler

When you specifically want information about similar documents, you can use the MoreLikeThisHandler.

last edited 2008-06-25 01:14:56 by tsmorton