Solr MoreLikeThis /mlt handler returns a 404 error
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开发者_如何学JAVA 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:
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"/>
精彩评论