MoreLikeThisHandler

The [WWW] MoreLikeThisHandler is designed to generate information about "similar" documents using the MoreLikeThis functionality provided by Lucene. It supports faceting, paging, and filtering using CommonQueryParameters.

<!> Solr1.3

  1. Params
  2. Examples
    1. Simple
    2. Using ContentStreams

Params

param

description

mlt.match.include

Should the response include the matched document? If false, the response will look exactly like a normal /select response

mlt.match.offset

By default, the MoreLikeThis query operates on the first result for 'q'

mlt.interestingTerms

One of: "list", "details", "none" -- this will show what "interesting" terms are used for the MoreLikeThis query. These are the top tf/idf terms. NOTE: if you select 'details', this shows you the term and boost used for each term. Unless mlt.boost=true all terms will have boost=1.0

See MoreLikeThis for additional input parameters.

The MoreLikeThisHandler can also use a ContentStream to find similar documents. It will extract the "interesting terms" from the posted text.

Examples

Simple

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

[WWW] http://localhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&mlt.match.include=false

[WWW] http://localhost:8983/solr/mlt?q=id:SP2514N&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&fq=inStock:true&mlt.displayTerms=details

Using ContentStreams

If you post text in the body, that will be used for similarity. Alternatively, you can put the posted content in the URL using something like:

[WWW] http://localhost:8983/solr/mlt?stream.body=electronics%20memory&mlt.displayTerms=list&mlt.mintf=0

If remoteStreaming is enabled, you can find documents similar to the text on a webpage:

[WWW] http://localhost:8983/solr/mlt?stream.url=http://lucene.apache.org/solr/&mlt.displayTerms=list&mlt.mintf=0


CategorySolrRequestHandler

last edited 2007-09-30 19:57:09 by GrantIngersoll