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 |
rows |
Use this to control the number of results returned, instead of the mlt.count option normally used with the MoreLikeThis search component. |
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 |
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
The following example URLs assume that the MoreLikeThisHandler is configured with the name "/mlt" ...
<requestHandler name="/mlt" class="solr.MoreLikeThisHandler"> </requestHandler>
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:
If remoteStreaming
is enabled, you can find documents similar to the text on a webpage: