我将以下查询发送到我的Solr 7.2服务器:
"responseHeader":{
"status":500,
"QTime":113,
"params":{
"q":"*:*",
"json.facet":"{x:{type:terms,field:SearchTextShingled,facet:{DemandUsers:\"hll(UserId)\"}}}",
"rows":"0"}},
字段SearchTextShingled是一个TextField,在Analyzer中有一个ShingleFilterFactory。 我得到的结果是以下堆栈跟踪:
"response":{"numFound":11862474,"start":0,"docs":[]
},
"error":{
"trace":
null:java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.apache.solr.util.ConcurrentLRUCache.get(ConcurrentLRUCache.java:124)
at org.apache.solr.search.FastLRUCache.get(FastLRUCache.java:161)
at org.apache.solr.search.SolrIndexSearcher.getDocSet(SolrIndexSearcher.java:1209)
at org.apache.solr.search.facet.FacetFieldProcessor.fillBucket(FacetFieldProcessor.java:406)
at org.apache.solr.search.facet.FacetFieldProcessor.findTopSlots(FacetFieldProcessor.java:367)
at org.apache.solr.search.facet.FacetFieldProcessorByArray.calcFacets(FacetFieldProcessorByArray.java:110)
at org.apache.solr.search.facet.FacetFieldProcessorByArray.process(FacetFieldProcessorByArray.java:58)
at org.apache.solr.search.facet.FacetProcessor.processSubs(FacetProcessor.java:460)
at org.apache.solr.search.facet.FacetProcessor.fillBucket(FacetProcessor.java:407)
at org.apache.solr.search.facet.FacetQueryProcessor.process(FacetQuery.java:64)
at org.apache.solr.search.facet.FacetModule.process(FacetModule.java:154)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
将聚合函数从hll更改为其他内容(如min或max)不会改变任何内容。同时使用带有stats组件的遗留方面来获取计数结果会产生相同的错误。
如果我在类似的facet字段上对其分析器链中没有ShingleFilterFactory执行相同的查询,它可以正常工作。原始字段上的常规方面也可以使用ShingleFilterFactory。
从堆栈跟踪中我猜它与缓存有关,但我是初学者,并不知道如何处理它。
任何帮助表示赞赏! 感谢