我正在尝试在 SOLR 中执行更多类似的搜索。对于预期会产生一些 MLT 结果的查询,它会引发错误。如果没有匹配 MLT,则不会观察到错误。我正在尝试以下查询。
10.20.30.40:8080/solr/collection1/select?qt=mlt&q=title:tablet&defType=edismax&mlt=true&mlt.fl=title&fl=id,score
结果是
<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>
MLT 结果中出现错误 EarlyTerminatingCollectorException 的原因是什么?
我的 MLT 请求处理程序如下所示
<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>