[ https://issues.apache.org/jira/browse/SOLR-10885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jefferyyuan updated SOLR-10885: ------------------------------- Description: Solr collapse is a great function to collapse data that is related so we only show one in search result. Just found one issue related with it - It throw NullPointerException in some cases. To reproduce it, first ingest some data - AND commit multiple times. 1. When there is no data that matches the query: http://localhost:8983/solr/thecollection/select?defType=edismax&q=non-existType:*&fq={!collapse field=seriesId nullPolicy=expand}&fq={!collapse field=programId nullPolicy=expand} - But the problem only happens if I use both collapse fqs, if I just use one of them, it would be fine. *2. When the data that matches the query doesn't have the collapse fields - This is kind of a big problem as we may store different kinds of docs in one collection, one query may match different kinds of docs. If some docs (docType1) have same value for field1, we want to collapse them, if other dosc(docType2) have some value for field2, do same things.* - channel data doesn't have seriesId or programId http://localhost:8983/solr/thecollection/select?defType=edismax&q=docType:channel&fq={!collapse field=seriesId nullPolicy=expand}&fq={!collapse field=programId nullPolicy=expand} - But the problem only happens if I use both collapse fqs, if I just use one of them, it would be fine. Exception from log: Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/searchItems_shard1_replica3: java.lang.NullPointerException at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:617) at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:667) at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:256) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1823) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1640) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2299) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691) 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) int nextDocBase = currentContext + 1 < this.contexts.length ? this.contexts[(currentContext + 1)].docBase : this.maxDoc; - 617 from solr 6.4.1 CollapsingQParserPlugin.java Seems related with https://issues.apache.org/jira/browse/SOLR-8807 - But SOLR-8807 only fixes issue related with spell checker. I may test this with latest solr 6.6.0 when I have time. was: Solr collapse is a great function to collapse data that is related so we only show one in search result. Just found one issue related with it - It throw NullPointerException in some cases. To reproduce it, first ingest some data - AND commit multiple times. 1. When there is no data that matches the query: http://localhost:8983/solr/thecollection/select?defType=edismax&q=non-existType:*&fq={!collapse field=seriesId nullPolicy=expand}&fq={!collapse field=programId nullPolicy=expand} - But the problem only happens if I use both collapse fqs, if I just use one of them, it would be fine. 2. When the data that matches the query doesn't have the collapse fields - channel data doesn't have seriesId or programId http://localhost:8983/solr/thecollection/select?defType=edismax&q=docType:channel&fq={!collapse field=seriesId nullPolicy=expand}&fq={!collapse field=programId nullPolicy=expand} - But the problem only happens if I use both collapse fqs, if I just use one of them, it would be fine. Exception from log: Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/searchItems_shard1_replica3: java.lang.NullPointerException at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:617) at org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:667) at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:256) at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1823) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1640) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2299) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691) 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) int nextDocBase = currentContext + 1 < this.contexts.length ? this.contexts[(currentContext + 1)].docBase : this.maxDoc; - 617 from solr 6.4.1 CollapsingQParserPlugin.java Seems related with https://issues.apache.org/jira/browse/SOLR-8807 - But SOLR-8807 only fixes issue related with spell checker. I may test this with latest solr 6.6.0 when I have time. > NullPointerException when run collapse filter > ---------------------------------------------- > > Key: SOLR-10885 > URL: https://issues.apache.org/jira/browse/SOLR-10885 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: search > Affects Versions: 6.4.1 > Reporter: jefferyyuan > Priority: Critical > > Solr collapse is a great function to collapse data that is related so we only > show one in search result. > Just found one issue related with it - It throw NullPointerException in some > cases. > To reproduce it, first ingest some data - AND commit multiple times. > 1. When there is no data that matches the query: > http://localhost:8983/solr/thecollection/select?defType=edismax&q=non-existType:*&fq={!collapse > field=seriesId nullPolicy=expand}&fq={!collapse field=programId > nullPolicy=expand} > - But the problem only happens if I use both collapse fqs, if I just use one > of them, it would be fine. > *2. When the data that matches the query doesn't have the collapse fields > - This is kind of a big problem as we may store different kinds of docs in > one collection, one query may match different kinds of docs. > If some docs (docType1) have same value for field1, we want to collapse > them, if other dosc(docType2) have some value for field2, do same things.* > - channel data doesn't have seriesId or programId > http://localhost:8983/solr/thecollection/select?defType=edismax&q=docType:channel&fq={!collapse > field=seriesId nullPolicy=expand}&fq={!collapse field=programId > nullPolicy=expand} > - But the problem only happens if I use both collapse fqs, if I just use one > of them, it would be fine. > Exception from log: > Caused by: > org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error > from server at http://localhost:8983/solr/searchItems_shard1_replica3: > java.lang.NullPointerException > at > org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:617) > at > org.apache.solr.search.CollapsingQParserPlugin$OrdScoreCollector.finish(CollapsingQParserPlugin.java:667) > at > org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:256) > at > org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1823) > at > org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1640) > at > org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2299) > at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691) > 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) > int nextDocBase = currentContext + 1 < this.contexts.length ? > this.contexts[(currentContext + 1)].docBase : this.maxDoc; - 617 from solr > 6.4.1 CollapsingQParserPlugin.java > Seems related with https://issues.apache.org/jira/browse/SOLR-8807 > - But SOLR-8807 only fixes issue related with spell checker. > I may test this with latest solr 6.6.0 when I have time. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org