[ 
https://issues.apache.org/jira/browse/SOLR-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14650400#comment-14650400
 ] 

Eric Wheeler edited comment on SOLR-7520 at 8/1/15 4:56 PM:
------------------------------------------------------------

This issue still occurs with Solr 5.2.1, specifically during multi-shard 
searches.  This fix remains the same.

Please see updated test client in SolrGroupTest-5.2.1.tgz

Steps to test with Solr 5.2.1:
# tar xzf solr-5.2.1.tgz
# tar xzf SolrGroupTest-5.2.1.tgz
# ant -f SolrGroupTest/build.xml

The test portion of the ant script will generate:
{code}
test:
     [exec] {
     [exec]   "responseHeader":{
     [exec]     "status":0,
     [exec]     "QTime":71,
     [exec]     "params":{
     [exec]       "q":"*:*",
     [exec]       "indent":"true",
     [exec]       "fq":"{!groupTest}",
     [exec]       "wt":"json",
     [exec]       "group.field":"manu_id_s",
     [exec]       "group":"true"}},
     [exec]   "grouped":{
     [exec]     "manu_id_s":{
     [exec]       "matches":0,
     [exec]       "groups":[]}}}
{code}

The fix can be deployed and tested by running:

# ./solr-5.2.1/bin/solr stop -all 
# ant -f SolrGroupTest/build.xml fix_cloud_and_test

Expected results:

{code}
test:
     [exec] {
     [exec]   "responseHeader":{
     [exec]     "status":0,
     [exec]     "QTime":156,
     [exec]     "params":{
     [exec]       "q":"*:*",
     [exec]       "indent":"true",
     [exec]       "fq":"{!groupTest}",
     [exec]       "wt":"json",
     [exec]       "group.field":"manu_id_s",
     [exec]       "group":"true"}},
     [exec]   "grouped":{
     [exec]     "manu_id_s":{
     [exec]       "matches":2,
     [exec]       "groups":[{
     [exec]           "groupValue":"ati",
     [exec]           "doclist":{"numFound":1,"start":0,"docs":[
     [exec]               {
     [exec]                 "id":"100-435805",
     [exec]                 "name":["ATI Radeon X1900 XTX 512 MB PCIE Video 
Card"],
     [exec]                 "manu":["ATI Technologies"],
     [exec]                 "manu_id_s":"ati",
     [exec]                 "cat":["electronics",
     [exec]                   "graphics card"],
     [exec]                 "features":["ATI RADEON X1900 GPU/VPU clocked at 
650MHz",
     [exec]                   "512MB GDDR3 SDRAM clocked at 1.55GHz",
     [exec]                   "PCI Express x16",
     [exec]                   "dual DVI, HDTV, svideo, composite out",
     [exec]                   "OpenGL 2.0, DirectX 9.0"],
     [exec]                 "weight":[48.0],
     [exec]                 "price":[649.99],
     [exec]                 "popularity":[7],
     [exec]                 "inStock":[false],
     [exec]                 "manufacturedate_dt":"2006-02-13T00:00:00Z",
     [exec]                 "store":["40.7143,-74.006"],
     [exec]                 "_version_":1508321764238688256}]
     [exec]           }},
     [exec]         {
     [exec]           "groupValue":"asus",
     [exec]           "doclist":{"numFound":1,"start":0,"docs":[
     [exec]               {
     [exec]                 "id":"EN7800GTX/2DHTV/256M",
     [exec]                 "name":["ASUS Extreme N7800GTX/2DHTV (256 MB)"],
     [exec]                 "manu":["ASUS Computer Inc."],
     [exec]                 "manu_id_s":"asus",
     [exec]                 "cat":["electronics",
     [exec]                   "graphics card"],
     [exec]                 "features":["NVIDIA GeForce 7800 GTX GPU/VPU 
clocked at 486MHz",
     [exec]                   "256MB GDDR3 Memory clocked at 1.35GHz",
     [exec]                   "PCI Express x16",
     [exec]                   "Dual DVI connectors, HDTV out, video input",
     [exec]                   "OpenGL 2.0, DirectX 9.0"],
     [exec]                 "weight":[16.0],
     [exec]                 "price":[479.95],
     [exec]                 "popularity":[7],
     [exec]                 "store":["40.7143,-74.006"],
     [exec]                 "inStock":[false],
     [exec]                 "manufacturedate_dt":"2006-02-13T00:00:00Z",
     [exec]                 "_version_":1508321764295311360}]
     [exec]           }}]}}}
{code}


was (Author: ebwweb):
This issue still occurs with Solr 5.2.1, specifically during multi-shard 
searches.

Please see updated test client in SolrGroupTest-5.2.1.tgz

Steps to test with Solr 5.2.1:
# tar xzf solr-5.2.1.tgz
# tar xzf SolrGroupTest-5.2.1.tgz
# ant -f SolrGroupTest/build.xml

The test portion of the ant script will generate:
{code}
test:
     [exec] {
     [exec]   "responseHeader":{
     [exec]     "status":0,
     [exec]     "QTime":71,
     [exec]     "params":{
     [exec]       "q":"*:*",
     [exec]       "indent":"true",
     [exec]       "fq":"{!groupTest}",
     [exec]       "wt":"json",
     [exec]       "group.field":"manu_id_s",
     [exec]       "group":"true"}},
     [exec]   "grouped":{
     [exec]     "manu_id_s":{
     [exec]       "matches":0,
     [exec]       "groups":[]}}}
{code}

The fix can be deployed and tested by running:

# ./solr-5.2.1/bin/solr stop -all 
# ant -f SolrGroupTest/build.xml fix_cloud_and_test

Expected results:

{code}
test:
     [exec] {
     [exec]   "responseHeader":{
     [exec]     "status":0,
     [exec]     "QTime":156,
     [exec]     "params":{
     [exec]       "q":"*:*",
     [exec]       "indent":"true",
     [exec]       "fq":"{!groupTest}",
     [exec]       "wt":"json",
     [exec]       "group.field":"manu_id_s",
     [exec]       "group":"true"}},
     [exec]   "grouped":{
     [exec]     "manu_id_s":{
     [exec]       "matches":2,
     [exec]       "groups":[{
     [exec]           "groupValue":"ati",
     [exec]           "doclist":{"numFound":1,"start":0,"docs":[
     [exec]               {
     [exec]                 "id":"100-435805",
     [exec]                 "name":["ATI Radeon X1900 XTX 512 MB PCIE Video 
Card"],
     [exec]                 "manu":["ATI Technologies"],
     [exec]                 "manu_id_s":"ati",
     [exec]                 "cat":["electronics",
     [exec]                   "graphics card"],
     [exec]                 "features":["ATI RADEON X1900 GPU/VPU clocked at 
650MHz",
     [exec]                   "512MB GDDR3 SDRAM clocked at 1.55GHz",
     [exec]                   "PCI Express x16",
     [exec]                   "dual DVI, HDTV, svideo, composite out",
     [exec]                   "OpenGL 2.0, DirectX 9.0"],
     [exec]                 "weight":[48.0],
     [exec]                 "price":[649.99],
     [exec]                 "popularity":[7],
     [exec]                 "inStock":[false],
     [exec]                 "manufacturedate_dt":"2006-02-13T00:00:00Z",
     [exec]                 "store":["40.7143,-74.006"],
     [exec]                 "_version_":1508321764238688256}]
     [exec]           }},
     [exec]         {
     [exec]           "groupValue":"asus",
     [exec]           "doclist":{"numFound":1,"start":0,"docs":[
     [exec]               {
     [exec]                 "id":"EN7800GTX/2DHTV/256M",
     [exec]                 "name":["ASUS Extreme N7800GTX/2DHTV (256 MB)"],
     [exec]                 "manu":["ASUS Computer Inc."],
     [exec]                 "manu_id_s":"asus",
     [exec]                 "cat":["electronics",
     [exec]                   "graphics card"],
     [exec]                 "features":["NVIDIA GeForce 7800 GTX GPU/VPU 
clocked at 486MHz",
     [exec]                   "256MB GDDR3 Memory clocked at 1.35GHz",
     [exec]                   "PCI Express x16",
     [exec]                   "Dual DVI connectors, HDTV out, video input",
     [exec]                   "OpenGL 2.0, DirectX 9.0"],
     [exec]                 "weight":[16.0],
     [exec]                 "price":[479.95],
     [exec]                 "popularity":[7],
     [exec]                 "store":["40.7143,-74.006"],
     [exec]                 "inStock":[false],
     [exec]                 "manufacturedate_dt":"2006-02-13T00:00:00Z",
     [exec]                 "_version_":1508321764295311360}]
     [exec]           }}]}}}
{code}

> Post filter 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
>         Attachments: SolrGroupTest-5.2.1.tgz, solrGroupTestEx.tgz
>
>
> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to