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

Chris Russell edited comment on SOLR-2894 at 4/23/12 9:04 PM:
--------------------------------------------------------------

Hi Dan.
I have been working with your patch, 2894, to Solr and I am having some issues 
with unit testing.

First of all the patch doesn't seem to apply cleanly:
crussell@WAT-CRUSSELL /cygdrive/d/matrixdev/solr_1297102/CBSolr/SolrLucene
$ patch -p0 -i SOLR-2894.patch
patching file 
solr/core/src/java/org/apache/solr/handler/component/EntryCountComparator.java
patching file 
solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
Hunk #10 FAILED at 797.
1 out of 16 hunks FAILED -- saving rejects to file 
solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java.rej
patching file 
solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
Hunk #2 FAILED at 106.
1 out of 2 hunks FAILED -- saving rejects to file 
solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java.rej
patching file 
solr/core/src/java/org/apache/solr/handler/component/PivotNamedListCountComparator.java
patching file solr/core/src/java/org/apache/solr/util/NamedListHelper.java
patching file solr/core/src/java/org/apache/solr/util/PivotListEntry.java
patching file 
solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotTest.java
patching file solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
$ patch --version
patch 2.5.8
Copyright (C) 1988 Larry Wall
Copyright (C) 2002 Free Software Foundation, Inc.

A lot of the contents of your original patch seemed to be formatting changes 
like where line breaks should go and how spacing should be handled.
I was able to examine the patch and manually incorporate the changes from the 
failed chunks.
One question, on this line (1119) of your patch, why did you choose not to 
initialize the map as the ones above it are? Couldn't that cause an NRE?
+    public SimpleOrderedMap<List<NamedList<Object>>> pivotFacets;

While looking at DistributedFacetPivotTest.java I noticed an error on line 42.  
Your "q" should probably be *:* instead of "*".

I've attached the patch file I came up with.  I added the initialization and 
test correction I mentioned.

When I ran the solr/lucene unit tests after I patched, there are some unit test 
failures like this one:
    [junit] Testsuite: org.apache.solr.TestDistributedGrouping
    [junit] Testcase: 
testDistribSearch(org.apache.solr.TestDistributedGrouping):       FAILED
    [junit] .facet_counts.size()==5,4skipped=0,0
    [junit] junit.framework.AssertionFailedError: 
.facet_counts.size()==5,4skipped=0,0
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.compareResponses(BaseDistributedSearchTestCase.java:656)
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.query(BaseDistributedSearchTestCase.java:383)
    [junit]     at 
org.apache.solr.TestDistributedGrouping.doTest(TestDistributedGrouping.java:51)
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.testDistribSearch(BaseDistributedSearchTestCase.java:671)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:20)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$SubclassSetupTeardownRule$1.evaluate(LuceneTestCase.java:736)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$InternalSetupTeardownRule$1.evaluate(LuceneTestCase.java:632)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:22)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$TestResultInterceptorRule$1.evaluate(LuceneTestCase.java:531)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$RememberThreadRule$1.evaluate(LuceneTestCase.java:593)
    [junit]     at 
org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:165)
    [junit]     at 
org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:57)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:20)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:22)
    [junit]
    [junit]
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 2.685 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] 2520 T1 oas.BaseDistributedSearchTestCase.compareResponses SEVERE 
Mismatched responses:
    [junit]     
{responseHeader={status=0,QTime=19},grouped={a_si={matches=0,groups=[]}},facet_counts={facet_queries={},facet_fields={a_t={}},facet_dates={},facet_ranges={},facet_pivot={}}}
    [junit]     
{responseHeader={status=0,QTime=18},grouped={a_si={matches=0,groups=[]}},facet_counts={facet_queries={},facet_fields={a_t={}},facet_dates={},facet_ranges={}}}
    [junit] NOTE: reproduce with: ant test -Dtestcase=TestDistributedGrouping 
-Dtestmethod=testDistribSearch 
-Dtests.seed=-c7cfa73dbca93c9:-4751af558bf6f59:3e523b50870b3b1b 
-Dargs="-Dfile.encoding=Cp1252"

It looks like the facet_pivot is being included in the results of one query, 
and not the other.  I'm trying to figure out why this is occurring.
Any insight would be appreciated.
                
      was (Author: selah):
    Hi Dan.
I have been working with your patch, 2894, to Solr and I am having some issues 
with unit testing.

First of all the patch doesn't seem to apply cleanly:
crussell@WAT-CRUSSELL /cygdrive/d/matrixdev/solr_1297102/CBSolr/SolrLucene
$ patch -p0 -i SOLR-2894.patch
patching file 
solr/core/src/java/org/apache/solr/handler/component/EntryCountComparator.java
patching file 
solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
Hunk #10 FAILED at 797.
1 out of 16 hunks FAILED -- saving rejects to file 
solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java.rej
patching file 
solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
Hunk #2 FAILED at 106.
1 out of 2 hunks FAILED -- saving rejects to file 
solr/core/src/java/org/apache/solr/handler/component/PivotFacetHelper.java.rej
patching file 
solr/core/src/java/org/apache/solr/handler/component/PivotNamedListCountComparator.java
patching file solr/core/src/java/org/apache/solr/util/NamedListHelper.java
patching file solr/core/src/java/org/apache/solr/util/PivotListEntry.java
patching file 
solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotTest.java
patching file solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
$ patch --version
patch 2.5.8
Copyright (C) 1988 Larry Wall
Copyright (C) 2002 Free Software Foundation, Inc.

A lot of the contents of your original patch seemed to be formatting changes 
like where line breaks should go and how spacing should be handled.
I was able to examine the patch and manually incorporate the changes from the 
failed chunks.
One question, on this line (1119) of your patch, why did you choose not to 
initialize the map as the ones above it are? Couldn't that cause an NRE?
+    public SimpleOrderedMap<List<NamedList<Object>>> pivotFacets;

While looking at DistributedFacetPivotTest.java I noticed an error on line 42.  
Your "q" should probably be "*:*" instead of "*".

I've attached the patch file I came up with.  I added the initialization and 
test correction I mentioned.

When I ran the solr/lucene unit tests after I patched, there are some unit test 
failures like this one:
    [junit] Testsuite: org.apache.solr.TestDistributedGrouping
    [junit] Testcase: 
testDistribSearch(org.apache.solr.TestDistributedGrouping):       FAILED
    [junit] .facet_counts.size()==5,4skipped=0,0
    [junit] junit.framework.AssertionFailedError: 
.facet_counts.size()==5,4skipped=0,0
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.compareResponses(BaseDistributedSearchTestCase.java:656)
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.query(BaseDistributedSearchTestCase.java:383)
    [junit]     at 
org.apache.solr.TestDistributedGrouping.doTest(TestDistributedGrouping.java:51)
    [junit]     at 
org.apache.solr.BaseDistributedSearchTestCase.testDistribSearch(BaseDistributedSearchTestCase.java:671)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:20)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$SubclassSetupTeardownRule$1.evaluate(LuceneTestCase.java:736)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$InternalSetupTeardownRule$1.evaluate(LuceneTestCase.java:632)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:22)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$TestResultInterceptorRule$1.evaluate(LuceneTestCase.java:531)
    [junit]     at 
org.apache.lucene.util.LuceneTestCase$RememberThreadRule$1.evaluate(LuceneTestCase.java:593)
    [junit]     at 
org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:165)
    [junit]     at 
org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:57)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:20)
    [junit]     at 
org.apache.lucene.util.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:22)
    [junit]
    [junit]
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 2.685 sec
    [junit]
    [junit] ------------- Standard Error -----------------
    [junit] 2520 T1 oas.BaseDistributedSearchTestCase.compareResponses SEVERE 
Mismatched responses:
    [junit]     
{responseHeader={status=0,QTime=19},grouped={a_si={matches=0,groups=[]}},facet_counts={facet_queries={},facet_fields={a_t={}},facet_dates={},facet_ranges={},facet_pivot={}}}
    [junit]     
{responseHeader={status=0,QTime=18},grouped={a_si={matches=0,groups=[]}},facet_counts={facet_queries={},facet_fields={a_t={}},facet_dates={},facet_ranges={}}}
    [junit] NOTE: reproduce with: ant test -Dtestcase=TestDistributedGrouping 
-Dtestmethod=testDistribSearch 
-Dtests.seed=-c7cfa73dbca93c9:-4751af558bf6f59:3e523b50870b3b1b 
-Dargs="-Dfile.encoding=Cp1252"

It looks like the facet_pivot is being included in the results of one query, 
and not the other.  I'm trying to figure out why this is occurring.
Any insight would be appreciated.
                  
> Implement distributed pivot faceting
> ------------------------------------
>
>                 Key: SOLR-2894
>                 URL: https://issues.apache.org/jira/browse/SOLR-2894
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Erik Hatcher
>             Fix For: 4.0
>
>         Attachments: SOLR-2894.patch, distributed_pivot.patch
>
>
> Following up on SOLR-792, pivot faceting currently only supports 
> undistributed mode.  Distributed pivot faceting needs to be implemented.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to