Using MoreLike This Component in Solr
Posted By : Jasgeet Singh | 09-May-2013
The MLT request handler will give MLT results based on a specific indexed document. This is commonly used in reaction to a user clicking a "more like this" link on existing search results. The key input to this option is a reference to the indexed document that you want similar results for.
MLT Search Component
MLT Parameters
The MLT request handler needs to be configured in solrconfig.xml. <requestHandler name="mlt_tracks" class="solr.MoreLikeThisHandler"> <lst name="defaults"> <str name="mlt.fl">category, specialities</str> <str name="mlt.mintf">1</str> <str name="mlt.mindf">2</str> <str name="mlt.boost">true</str> </lst> </requestHandler> Configure schema.xml:
2. <field name="specialities" type="textProcessed" indexed="true" stored="false" multiValued="true" termVectors="true"/>
Solr Query: This query returns similar documents for each document in the response set. Perhaps this should be called "MoreLikeThese". http://localhost:8080/solr/select/?qt=mlt&q=id:11&mlt.fl=category,specialities&fl=id&rows=5
|
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Jasgeet Singh
Jasgeet is a Sr. Lead developer .He is an experienced Groovy and Grails and has worked on designing & developing B2B and B2C portals using Grails technologies.