I'm trying to perform more like this search in SOLR. It throws an error for queries which are expected to produce some MLT results. If there is no match for MLT, error is not observed. Im trying the following query.
10.20.30.40:8080/solr/collection1/select?qt=mlt&q=title:tablet&defType=edismax&mlt=true&mlt.fl=title&fl=id,score
Result is
<response>
<lst name="responseHeader">
<int name="status">500</int>
<int name="QTime">25</int>
<lst name="params">
<str name="fl">id,score</str>
<str name="mlt.fl">title</str>
<str name="q">title:tablet</str>
<str name="mlt">true</str>
<str name="qt">mlt</str>
<str name="defType">edismax</str>
</lst>
</lst>
<result name="response" numFound="12425" start="0" maxScore="4.6373944">
<doc>
<str name="id">1945247</str>
<float name="score">4.6373944</float>
</doc>
<doc>
<str name="id">8735652</str>
<float name="score">4.6373944</float>
</doc>
<doc>
<str name="id">9028237</str>
<float name="score">4.6373944</float>
</doc>
<doc>
<str name="id">9177143</str>
<float name="score">4.6373944</float>
</doc>
</result>
<lst name="error">
<str name="trace">
org.apache.solr.search.EarlyTerminatingCollectorException at org.apache.solr.search.EarlyTerminatingCollector.collect(EarlyTerminatingCollector.java:62) at org.apache.lucene.search.Scorer.score(Scorer.java:65) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:624) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1494) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1363) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:474) at org.apache.solr.search.SolrIndexSearcher.getDocList(SolrIndexSearcher.java:1226) at org.apache.solr.handler.MoreLikeThisHandler$MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:365) at org.apache.solr.handler.component.MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:356) at org.apache.solr.handler.component.MoreLikeThisComponent.process(MoreLikeThisComponent.java:113) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:679)
</str>
<int name="code">500</int>
</lst>
</response>
What is the reason for error EarlyTerminatingCollectorException in the MLT result?
My MLT request handler looks like this
<requestHandler name="/mlt" class="solr.MoreLikeThisHandler">
<lst name="defaults">
<str name="mlt.fl">title,abstract,claims</str>
<str name="mlt.mintf">1</str>
<str name="mlt.mindf">2</str>
<str name="mlt.boost">true</str>
</lst>
</requestHandler>
This is a bug which seems to be getting fixed in version 4.6.
Have a read here for further details https://issues.apache.org/jira/browse/SOLR-5368