Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用Solr';更像是多核设置的功能?_Solr_Full Text Search_Morelikethis - Fatal编程技术网

如何使用Solr';更像是多核设置的功能?

如何使用Solr';更像是多核设置的功能?,solr,full-text-search,morelikethis,Solr,Full Text Search,Morelikethis,因此,我使用多核功能设置了具有多核的Solr,该功能运行良好: http://localhost:8080/solr/core_one/select/?q=Book 按预期工作并列出结果 现在,我只想向Solr发送相同的查询,并启用MoreLikeThis: http://localhost:8080/solr/core_one/select/?q=Book&mlt=true&mlt.fl=category 我在org.apache.solr.schema.FieldType

因此,我使用多核功能设置了具有多核的Solr,该功能运行良好:

http://localhost:8080/solr/core_one/select/?q=Book
按预期工作并列出结果

现在,我只想向Solr发送相同的查询,并启用MoreLikeThis:

http://localhost:8080/solr/core_one/select/?q=Book&mlt=true&mlt.fl=category
我在org.apache.solr.schema.FieldType.storedToIndexed上获得HTTP状态500-null java.lang.NullPointerException。存在mlt.fl的字段。有趣的是,如果我查询没有任何结果的东西,Solr会正确地返回一个空的结果集

这是一个bug还是我遗漏了什么

这是完整的堆栈跟踪:

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)

更像这需要一个存储的唯一密钥。

看起来像Solr中的一个bug。什么是完整堆栈跟踪?您使用的是什么版本?我尝试了最新版本(3.4.0)和以前的版本(3.2)。请格式化堆栈跟踪,当前它显示在一行中。您的架构中是否定义了唯一字段?是的,我有唯一字段,但我没有存储它。改变后,一切正常。谢谢@MauricioScheffer为我指明了正确的方向!将这个问题标记为已回答的正确方式是什么?