[
https://issues.apache.org/jira/browse/SOLR-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14536971#comment-14536971
]
Eric Wheeler commented on SOLR-7520:
------------------------------------
Steps to replicate:
# tar xzf solr-4.8.0.tgz
# tar xzf solrGroupTestEx.tgz
# ant -f SolrGroupTest/build.xml -Dsolr.example=solr-4.8.0/example clean deploy
# cd solr-4.8.0
# cp -rp example example2
# grep -rl 8983 example2 | xargs perl -i.bak -pe 's/8983/9983/;'
# cd example
# java -jar start.jar &
# cd exampledocs
# ./post.sh gb18030-example.xml
# cd ../../example2
# java -jar start.jar &
# cd exampledocs
# ./post.sh money.xml
# curl
'http://localhost:8983/solr/collection1/select?q=*%3A*&wt=json&indent=true&group=true&group.field=price&shards=localhost:8983/solr,localhost:9983/solr&fq=\{!groupTest\}'
Note that the result of the curl will be an empty result:
{noformat}
{
"responseHeader":{
"status":0,
"QTime":180,
"params":{
"shards":"localhost:8983/solr,localhost:9983/solr",
"indent":"true",
"q":"*:*",
"group.field":"price",
"group":"true",
"wt":"json",
"fq":"{!groupTest}"}},
"grouped":{
"price":{
"matches":0,
"groups":[]}}}
{noformat}
Additionally, for testing, ensure that "matches" is properly populated after
implementation of the patch.
> DelegatingCollector.finish not called for multi-shard queries specifying
> grouping
> ----------------------------------------------------------------------------------
>
> Key: SOLR-7520
> URL: https://issues.apache.org/jira/browse/SOLR-7520
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 4.8
> Reporter: Eric Wheeler
>
> The finish method for a DelegatingCollector post filter is not being called
> for queries specifying a fq filter, multiple shards, and grouping options.
> Recommend adding the following code to
> org.apache.solr.search.grouping.CommandHandler.searchWithTimeLimiter to call
> finish (if a DelegatingCollector is available) after calling search, but
> before obtaining totalHitCount:
> {code: title=org.apache.solr.search.grouping.CommandHandler line ~218}
> try {
> searcher.search(query, luceneFilter, collector);
> } catch (TimeLimitingCollector.TimeExceededException x) {
> partialResults = true;
> logger.warn( "Query: " + query + "; " + x.getMessage() );
> }
> /* Call finish of DelegatingCollector to complete post processing
> for multi-shard queries */
> if (filter.postFilter != null) {
> filter.postFilter.finish();
> }
> /* END: Call finish of DelegatingCollector to complete post processing
> for multi-shard queries */
> if (includeHitCount) {
> totalHitCount = hitCountCollector.getTotalHits();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]