The
MoreLikeThisHandler is designed to generate information about "similar" documents using the MoreLikeThis functionality provided by Lucene. It supports faceting, paging, and filtering using CommonQueryParameters.
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
http://localhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1
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:
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: