solrmorelikethismlt

Solr MoreLikeThis example 404 error


I'm trying to test the mlt example in solr 6 by executing the "techproducts" example bundled in the version. It's OK and I saw data etc. nevertheless, I get 404 error when I try to use mlt features (ie: http://localhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1).

Should I configure some parameters in solr.xml or other files?


Solution

  • Add this to your solrconfig.xml

      <requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
         <lst name="defaults">
           <str name="echoParams">explicit</str>
           <str name="wt">json</str>
           <str name="df">your_default_search_field</str>
         </lst>
      </requestHandler>