Solr MoreLikeThis /mlt handler returns a 404 error

感情迁移 提交于 2019-12-10 10:33:29

问题


I want to find all the documents that is similar to a specific document within solr. I have installed solr and made some queries. The query I am trying to make gives an error which I cannot make out or research on the internet. Can you give me some light on this? I am using solrnet client but if solrnet is not appropriate for this type of query I will gladly use pure solr and read the XML.

Here is the query I am using:

http://192.168.1.10:8080/solr/mlt?q=id:12&mlt.fl=content&mlt.mindf=1&mlt.mintf=1

here is my schema xml here

 <fields>
  <field name="id" type="string" indexed="true" stored="true" />
  <field name="title" type="string" indexed="true" stored="false"/>
  <field name="content" type="text_general" indexed="true" stored="false"/>
 </fields>

Here is the error I am receiving:


回答1:


It seems you haven't registered the MLT handler in solrconfig.xml. A simple registration looks like this:

<requestHandler name="/mlt" class="org.apache.solr.handler.MoreLikeThisHandler"/> 


来源:https://stackoverflow.com/questions/6891518/solr-morelikethis-mlt-handler-returns-a-404-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!