我已经使用多核功能设置了Solr,目前运行正常:
http://localhost:8080/solr/core_one/select/?q=Book
功能正常,结果列表清晰明了。
现在我想使用启用了MoreLikeThis的Solr发送相同的查询:
http://localhost:8080/solr/core_one/select/?q=Book&mlt=true&mlt.fl=category
我遇到了一个HTTP 500错误 - null java.lang.NullPointerException at org.apache.solr.schema.FieldType.storedToIndexed。mlt.fl字段存在。奇怪的是,如果我查询没有任何结果的内容,Solr会正确返回一个空结果集。
这是完整的堆栈跟踪:
HTTP Status 500 - null java.lang.NullPointerException at
org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:360) at
org.apache.solr.handler.MoreLikeThisHandler$MoreLikeThisHelper.getMoreLikeThis(MoreLikeThisHandler.java:320) at
org.apache.solr.handler.component.MoreLikeThisComponent.getMoreLikeThese(MoreLikeThisComponent.java:82) at
org.apache.solr.handler.component.MoreLikeThisComponent.process(MoreLikeThisComponent.java:57) at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194) at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at
org.apache.solr.core.SolrCore.execute(SolrCore.java:1368) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356) at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252) 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:102) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864) at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665) at java.lang.Thread.run(Thread.java:679)