[ https://issues.apache.org/jira/browse/SOLR-16570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642191#comment-17642191 ]
Chris M. Hostetter commented on SOLR-16570: ------------------------------------------- Here's the full stack trace of the error from the logs (running against {{{}branch_9_1{}}}) ... {noformat} 2022-12-01 21:59:52.452 INFO (qtp334593716-25) [c:gettingstarted s:shard1 r:core_node5 x:gettingstarted_shard1_replica_n2] o.a.s.c.S.Request webapp=/solr path=/select params={q=*:*&distrib=false&fq={!collapse+nullPolicy%3Dexpand+field%3Dfoo_s+hint%3Dtop_fc}} status=500 QTime=45 2022-12-01 21:59:52.454 ERROR (qtp334593716-25) [c:gettingstarted s:shard1 r:core_node5 x:gettingstarted_shard1_replica_n2] o.a.s.s.HttpSolrCall java.lang.NullPointerException => java.lang.NullPointerException at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621) java.lang.NullPointerException: null at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621) ~[?:?] at org.apache.solr.search.CollapsingQParserPlugin$CollectorFactory.getCollector(CollapsingQParserPlugin.java:2125) ~[?:?] at org.apache.solr.search.CollapsingQParserPlugin$CollapsingPostFilter.getFilterCollector(CollapsingQParserPlugin.java:460) ~[?:?] at org.apache.solr.search.SolrIndexSearcher.getProcessedFilter(SolrIndexSearcher.java:1267) ~[?:?] at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1788) ~[?:?] at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1673) ~[?:?] at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:711) ~[?:?] at org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1637) ~[?:?] at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:421) ~[?:?] at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:420) ~[?:?] at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:224) ~[?:?] at org.apache.solr.core.SolrCore.execute(SolrCore.java:2865) ~[?:?] at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:887) ~[?:?] at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:606) ~[?:?] at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:250) ~[?:?] at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:218) ~[?:?] at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:257) ~[?:?] at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:227) ~[?:?] at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:213) ~[?:?] at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195) ~[?:?] at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:201) ~[jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1626) ~[jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:552) ~[jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600) ~[jetty-security-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505) ~[jetty-servlet-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322) ~[jetty-rewrite-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[jetty-server-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[jetty-io-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622] at java.lang.Thread.run(Thread.java:829) ~[?:?] 2022-12-01 21:59:58.970 INFO (qtp334593716-19) [c:gettingstarted s:shard1 r:core_node5 x:gettingstarted_shard1_replica_n2] o.a.s.c.S.Request webapp=/solr path=/select params={q=*:*&distrib=false&fq={!collapse+nullPolicy%3Dexpand+field%3Dfoo_s}} hits=0 status=0 QTime=24 2022-12-01 22:00:00.803 INFO (qtp334593716-24) [c:gettingstarted s:shard1 r:core_node5 x:gettingstarted_shard1_replica_n2] o.a.s.c.S.Request webapp=/solr path=/select params={q=*:*&distrib=false&fq={!collapse+nullPolicy%3Dexpand+field%3Dfoo_s+hint%3Dtop_fc}} hits=0 status=0 QTime=5 {noformat} > collapse w/ nullPolicy=expand + hint=top_fc can NPE on empty collection > ----------------------------------------------------------------------- > > Key: SOLR-16570 > URL: https://issues.apache.org/jira/browse/SOLR-16570 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 9.1 > Reporter: Chris M. Hostetter > Priority: Major > > Here's a weird one i just encountered (but haven't dug into in depth)... > * empty index > * collapse on a string field > * using both {{nullPolicy=expand}} and {{hint=top_fc}} causes a > NullPointerException > ** Using only one of these options, or neither of these options, returns > expected (empty) result set > What makes this bug particularly bizare, is that if you (successfully) query > using {{nullPolicy=expand}} *WITH OUT* using {{hint=top_fc}}, and then you > add {{hint=top_fc}} on a subsequent request, the NPE doesn't manifest... > {noformat} > hossman@slate:~/lucene/solr [j11] [branch_9_1] $ > ./solr/packaging/build/dev/bin/solr -e cloud -noprompt > ... > hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff > 'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s+hint=top_fc}' > { > "responseHeader":{ > "zkConnected":true, > "status":500, > "QTime":45, > "params":{ > "q":"*:*", > "distrib":"false", > "fq":"{!collapse nullPolicy=expand field=foo_s hint=top_fc}"}}, > "error":{ > "trace":"java.lang.NullPointerException\n\tat > org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.<init>(CollapsingQParserPlugin.java:621)... > ... > hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff > 'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s}' > { > "responseHeader":{ > "zkConnected":true, > "status":0, > "QTime":24, > "params":{ > "q":"*:*", > "distrib":"false", > "fq":"{!collapse nullPolicy=expand field=foo_s}"}}, > "response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[] > }} > hossman@slate:~/lucene/solr [j11] [branch_9_1] $ curl --globoff > 'http://localhost:8983/solr/gettingstarted_shard1_replica_n2/select?q=*:*&distrib=false&fq={!collapse+nullPolicy=expand+field=foo_s+hint=top_fc}' > { > "responseHeader":{ > "zkConnected":true, > "status":0, > "QTime":5, > "params":{ > "q":"*:*", > "distrib":"false", > "fq":"{!collapse nullPolicy=expand field=foo_s hint=top_fc}"}}, > "response":{"numFound":0,"start":0,"numFoundExact":true,"docs":[] > }} > {noformat} > (Note: this doesn't appear to be a "new" bug, it reproduces in 8.11 as well > .. probably been around for a while) -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org