[
https://issues.apache.org/jira/browse/SOLR-6156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394961#comment-17394961
]
Christine Poerschke commented on SOLR-6156:
-------------------------------------------
{quote}While debugging found that the create() method under
SearchGroupsFieldCommand class return an empty list of collectors if topNGroups
< 0 and if includeGroupCount is false. ...
{quote}
Returning to this investigation here today [~modassar]'s analysis above proved
very helpful, thank you!
As a minimal example:
* {{group=true&group.field=foobar&rows=0}} works
* {{group=true&group.field=foobar&rows=0&timeAllowed=12345}} does not work.
* {{group=true&group.field=foobar&rows=0}} is the same as
* {{group=true&group.field=foobar&rows=0&group.ngroups=false}} and one might
wonder why one would run a query like that?
** explicitly to get the {{numFound}} count i.e. the number of matches is one
possibility and in that case {{rows=0}} i.e. not using grouping would supply
the same number though in a different output format which would not suit all
use cases.
** implicitly i.e. some other query generating sub-queries with {{rows=0}} but
that's not something I've investigated.
I'll open a pull request with a test and code change shortly, the fixed
proposed is to use a {{NoOpCollector}} instead of the {{null}} collector that
is causing the {{NullPointerException}} currently.
> Exception while using group with timeAllowed on SolrCloud.
> ----------------------------------------------------------
>
> Key: SOLR-6156
> URL: https://issues.apache.org/jira/browse/SOLR-6156
> Project: Solr
> Issue Type: Bug
> Components: search
> Reporter: Modassar Ather
> Priority: Major
>
> Following exception is thrown when using grouping with timeAllowed. Solr
> version used is 4.8.0.
> SEVERE:
> null:org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
> java.lang.NullPointerException
> at
> org.apache.lucene.search.TimeLimitingCollector.setNextReader(TimeLimitingCollector.java:158)
> at
> org.apache.lucene.search.MultiCollector.setNextReader(MultiCollector.java:113)
> at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:612)
> at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
> at
> org.apache.solr.search.grouping.CommandHandler.searchWithTimeLimiter(CommandHandler.java:219)
> at
> org.apache.solr.search.grouping.CommandHandler.execute(CommandHandler.java:156)
> at
> org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:338)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952)
> at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]