Solr
  1. Solr
  2. SOLR-5416

CollapsingQParserPlugin breaks Tag/Exclude Faceting

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.6
    • Fix Version/s: 4.6.1, 6.0
    • Component/s: search
    • Labels:

      Description

      Trying to use CollapsingQParserPlugin with facet tagging throws an exception.

       ModifiableSolrParams params = new ModifiableSolrParams();
          params.add("q", "*:*");
          params.add("fq", "{!collapse field=group_s}");
          params.add("defType", "edismax");
          params.add("bf", "field(test_ti)");
          params.add("fq","{!tag=test_ti}test_ti:5");
          params.add("facet","true");
          params.add("facet.field","{!ex=test_ti}test_ti");
          assertQ(req(params), "*[count(//doc)=1]", "//doc[./int[@name='test_ti']='5']");
      
      1. CollapseQParserPluginPatch-solr-4.5.1.patch
        46 kB
        David Boychuck
      2. CollapsingQParserPlugin.java
        29 kB
        Joel Bernstein
      3. SOLR-5416.patch
        23 kB
        Joel Bernstein
      4. SOLR-5416.patch
        22 kB
        Joel Bernstein
      5. SOLR-5416.patch
        11 kB
        Joel Bernstein
      6. SOLR-5416.patch
        10 kB
        Joel Bernstein
      7. SOLR-5416.patch
        2 kB
        Joel Bernstein
      8. SOLR-5416.patch
        6 kB
        David Boychuck
      9. SolrIndexSearcher.java
        86 kB
        Joel Bernstein
      10. TestCollapseQParserPlugin.java
        8 kB
        Joel Bernstein

        Issue Links

          Activity

          Hide
          David Boychuck added a comment -

          This patch assumes that only tagged documents have a ord > -1 and scorer = null in the collect() method

          If there is a better way to identify tagged documents in this collect() method then it should probably be used in place of ord > -1 && scorer == null

          Show
          David Boychuck added a comment - This patch assumes that only tagged documents have a ord > -1 and scorer = null in the collect() method If there is a better way to identify tagged documents in this collect() method then it should probably be used in place of ord > -1 && scorer == null
          Hide
          David Boychuck added a comment -

          This fix uncovers/creates a new bug:

          Error during auto-warming of key:org.apache.solr.search.QueryResultKey@48dfd36d:java.lang.ArrayIndexOutOfBoundsException: 0
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:401)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1636)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1363)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2051)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          Show
          David Boychuck added a comment - This fix uncovers/creates a new bug: Error during auto-warming of key:org.apache.solr.search.QueryResultKey@48dfd36d:java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:401) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1636) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1363) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2051) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
          Hide
          David Boychuck added a comment -

          Adding a fix for setNextReader function when contexts.length = 0

          Show
          David Boychuck added a comment - Adding a fix for setNextReader function when contexts.length = 0
          Hide
          Joel Bernstein added a comment -

          Hi David,

          I've read through the patch. I don't think we'll be able to solve this issue though from inside of the CollapsingQParserPlugin. The main problem is that the CollapsingQParserPlugin really needs the scorer to be present to work properly. So to get this working we'll need to make sure that the method that builds the docset, builds it in such a way that scorer can be accessed.

          I'll take a look at finding an approach for this.

          Joel

          Show
          Joel Bernstein added a comment - Hi David, I've read through the patch. I don't think we'll be able to solve this issue though from inside of the CollapsingQParserPlugin. The main problem is that the CollapsingQParserPlugin really needs the scorer to be present to work properly. So to get this working we'll need to make sure that the method that builds the docset, builds it in such a way that scorer can be accessed. I'll take a look at finding an approach for this. Joel
          Hide
          David Boychuck added a comment -

          Joel,

          I'm currently using my patch and the facet counts are correct and the performance is good. We were looking to roll this out in production where I work. Would you advise against it? What kind of problems could this cause?

          Show
          David Boychuck added a comment - Joel, I'm currently using my patch and the facet counts are correct and the performance is good. We were looking to roll this out in production where I work. Would you advise against it? What kind of problems could this cause?
          Hide
          Joel Bernstein added a comment -

          David,

          Here is the flow as I see it with the patch:
          1) The intitial search executes and produces a result based on collapsing the groups by score.
          2) The facet component needs to regenerate the docset because of the tag/exclude parameters. But the scorer is not present when regenerating the docset, so it is using logic that overwrites the group-head each time. This will result in the document that is found latest in the index becoming the group-head, for each group.

          So, the result set used to calculate the facet, will be different from the result set used to generate the search results.

          To keep these in sync you would need to have step 2, also collapse based on score.

          Show
          Joel Bernstein added a comment - David, Here is the flow as I see it with the patch: 1) The intitial search executes and produces a result based on collapsing the groups by score. 2) The facet component needs to regenerate the docset because of the tag/exclude parameters. But the scorer is not present when regenerating the docset, so it is using logic that overwrites the group-head each time. This will result in the document that is found latest in the index becoming the group-head, for each group. So, the result set used to calculate the facet, will be different from the result set used to generate the search results. To keep these in sync you would need to have step 2, also collapse based on score.
          Hide
          David Boychuck added a comment -

          Oh I see.... that won't actually be a problem for me since all of the documents in the group should have the same facet counts. Thanks for the reply. I will wait for a fix. But for now, if I understand your reply correctly, I don't think that will affect my facet counts in a negative manner.

          Show
          David Boychuck added a comment - Oh I see.... that won't actually be a problem for me since all of the documents in the group should have the same facet counts. Thanks for the reply. I will wait for a fix. But for now, if I understand your reply correctly, I don't think that will affect my facet counts in a negative manner.
          Hide
          Joel Bernstein added a comment -

          Yes, if all the documents in the same group have the same facet counts then you won't notice this problem.

          Show
          Joel Bernstein added a comment - Yes, if all the documents in the same group have the same facet counts then you won't notice this problem.
          Hide
          Joel Bernstein added a comment - - edited

          I uploaded a patch created from trunk which I believe resolves the issues. I started out attempting to fix this in a more generic way but ended up needing to get very specific to not break other test cases.

          The issue with the other test cases is that the patch I added won't work if the main query is excluded. But for the CollapsingQParserPlugin, then main query is always needed anyway to support collapsing by score. So to not break a test case which excluded the main query, I routed only requests that use the CollapsingQParserPlugin to the new method that scores while creating the docset.

          The next step is to throw an exception if someone tries to exclude the main query while using the CollapsingQParserPlugin.

          David, when you get a chance could you test this patch out and see if it resolves the issue for you. If the patch doesn't apply for you I'll create one for your version of Solr.

          Joel

          Show
          Joel Bernstein added a comment - - edited I uploaded a patch created from trunk which I believe resolves the issues. I started out attempting to fix this in a more generic way but ended up needing to get very specific to not break other test cases. The issue with the other test cases is that the patch I added won't work if the main query is excluded. But for the CollapsingQParserPlugin, then main query is always needed anyway to support collapsing by score. So to not break a test case which excluded the main query, I routed only requests that use the CollapsingQParserPlugin to the new method that scores while creating the docset. The next step is to throw an exception if someone tries to exclude the main query while using the CollapsingQParserPlugin. David, when you get a chance could you test this patch out and see if it resolves the issue for you. If the patch doesn't apply for you I'll create one for your version of Solr. Joel
          Hide
          Joel Bernstein added a comment -

          Added a test case for tag/exclude and also revamped all the tests to better exercise sorting following the collapse.

          Show
          Joel Bernstein added a comment - Added a test case for tag/exclude and also revamped all the tests to better exercise sorting following the collapse.
          Hide
          David Boychuck added a comment -

          Hi Joel I will try to patch it into 4.5.1 and let you know if it works

          Show
          David Boychuck added a comment - Hi Joel I will try to patch it into 4.5.1 and let you know if it works
          Hide
          Joel Bernstein added a comment -

          Hi David,

          It's probably easiest to put two files in place rather then try to patch 4.5.1. I'll attache my version of the CollapsingQParserPlugin and SolrIndexSearcher. You can then just copy them to org/apache/solr/search.

          Joel

          Show
          Joel Bernstein added a comment - Hi David, It's probably easiest to put two files in place rather then try to patch 4.5.1. I'll attache my version of the CollapsingQParserPlugin and SolrIndexSearcher. You can then just copy them to org/apache/solr/search. Joel
          Hide
          David Boychuck added a comment -

          Could you also attach your tests and I'll see if it works

          Show
          David Boychuck added a comment - Could you also attach your tests and I'll see if it works
          Hide
          David Boychuck added a comment -

          patched it into 4.6. Going to upgrade my servers and do some testing with my index

          Show
          David Boychuck added a comment - patched it into 4.6. Going to upgrade my servers and do some testing with my index
          Hide
          Joel Bernstein added a comment -

          Added empty SearchFilter interface so SolrIndexSearcher can reference something more generic. If a postfilter also implements SearchFilter then the SolrIndexSearcher will call getDocSetScore() rather the getDocSet() when building docsets.

          Show
          Joel Bernstein added a comment - Added empty SearchFilter interface so SolrIndexSearcher can reference something more generic. If a postfilter also implements SearchFilter then the SolrIndexSearcher will call getDocSetScore() rather the getDocSet() when building docsets.
          Hide
          David Boychuck added a comment -

          4.6 had some bugs in the DIH. Going to try to patch this into my 4.5.1.

          Show
          David Boychuck added a comment - 4.6 had some bugs in the DIH. Going to try to patch this into my 4.5.1.
          Hide
          David Boychuck added a comment -

          Joel,

          This test is failing:

          params = new ModifiableSolrParams();
              params.add("q", "*:*");
              params.add("fq", "{!collapse field=group_s min=test_ti}");
              params.add("sort", "score desc,id asc");
              params.add("defType", "edismax");
              params.add("bf", "field(id)");
              assertQ(req(params), "*[count(//doc)=2]",
                                    "//result/doc[1]/float[@name='id'][.='5.0']",
                                    "//result/doc[2]/float[@name='id'][.='1.0']");
          

          I'm assuming it's not a problem with the parser and a problem with the test.

          Show
          David Boychuck added a comment - Joel, This test is failing: params = new ModifiableSolrParams(); params.add( "q" , "*:*" ); params.add( "fq" , "{!collapse field=group_s min=test_ti}" ); params.add( "sort" , "score desc,id asc" ); params.add( "defType" , "edismax" ); params.add( "bf" , "field(id)" ); assertQ(req(params), "*[count( //doc)=2]" , " //result/doc[1]/ float [@name='id'][.='5.0']" , " //result/doc[2]/ float [@name='id'][.='1.0']" ); I'm assuming it's not a problem with the parser and a problem with the test.
          Hide
          Joel Bernstein added a comment - - edited

          The test should be ok. It runs successfully for me. This specifically tests SOLR-5408. Probably you don't have that patch applied. If you overlay the attached java files you'll get both patches.

          Show
          Joel Bernstein added a comment - - edited The test should be ok. It runs successfully for me. This specifically tests SOLR-5408 . Probably you don't have that patch applied. If you overlay the attached java files you'll get both patches.
          Hide
          David Boychuck added a comment -

          Overlaying the files doesn't work I get errors resolving:

          import org.apache.lucene.index.StorableField;
          import org.apache.lucene.index.StoredDocument;

          Would you be able to create a patch for 4.5.1?

          Show
          David Boychuck added a comment - Overlaying the files doesn't work I get errors resolving: import org.apache.lucene.index.StorableField; import org.apache.lucene.index.StoredDocument; Would you be able to create a patch for 4.5.1?
          Hide
          David Boychuck added a comment -

          I just checked the patch from SOLR-5408 and it looks like I have that code already.

          Show
          David Boychuck added a comment - I just checked the patch from SOLR-5408 and it looks like I have that code already.
          Hide
          David Boychuck added a comment -

          oh wait nevermind. I patched solrIndexsearcher with just your changes... then I overlay your CollapsingQParserPlugin... this might work.

          Show
          David Boychuck added a comment - oh wait nevermind. I patched solrIndexsearcher with just your changes... then I overlay your CollapsingQParserPlugin... this might work.
          Hide
          David Boychuck added a comment -

          bah... no good

          Show
          David Boychuck added a comment - bah... no good
          Hide
          David Boychuck added a comment -

          whew! Ok I applied the patches from SOLR-5027, SOLR-5408, and from your latest patch attached to this tracker. All tests now pass. Going to upgrade my servers and see if this works for me. In my current implementation I am getting a lot of errors from SolrCache (the patch I provided) and am running into heap memory errors. I'm wondering if the errors are caused by my patch.

          Show
          David Boychuck added a comment - whew! Ok I applied the patches from SOLR-5027 , SOLR-5408 , and from your latest patch attached to this tracker. All tests now pass. Going to upgrade my servers and see if this works for me. In my current implementation I am getting a lot of errors from SolrCache (the patch I provided) and am running into heap memory errors. I'm wondering if the errors are caused by my patch.
          Hide
          David Boychuck added a comment -

          I have patched 4.5.1 with your changes. Functionally everything works correctly. But I am seeing the following errors:

          1672828 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@ad693c4:java.lang.NullPointerException

          1672831 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@e7384164:java.lang.NullPointerException

          1672834 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@569af2fd:java.lang.NullPointerException

          1672837 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@45c8d9aa:java.lang.NullPointerException

          1672899 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d8a57011:java.lang.NullPointerException

          1672904 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@eb4c3b23:java.lang.NullPointerException

          Show
          David Boychuck added a comment - I have patched 4.5.1 with your changes. Functionally everything works correctly. But I am seeing the following errors: 1672828 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@ad693c4:java.lang.NullPointerException 1672831 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@e7384164:java.lang.NullPointerException 1672834 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@569af2fd:java.lang.NullPointerException 1672837 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@45c8d9aa:java.lang.NullPointerException 1672899 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d8a57011:java.lang.NullPointerException 1672904 [searcherExecutor-5-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@eb4c3b23:java.lang.NullPointerException
          Hide
          David Boychuck added a comment -

          Joel,

          Is it possible that the tagged documents are ending up in the solr query cache with null values?

          Show
          David Boychuck added a comment - Joel, Is it possible that the tagged documents are ending up in the solr query cache with null values?
          Hide
          Joel Bernstein added a comment -

          David,

          I'm not gettting the auto-warm cache errors. I have debug logging on, and autowarming turned on. I ran collapse queries to populate the QueryResultCache and then loaded data. The cache seems to warm properly.

          Try turning debug logging on and see if we can get more of the strack trace.

          Joel

          Show
          Joel Bernstein added a comment - David, I'm not gettting the auto-warm cache errors. I have debug logging on, and autowarming turned on. I ran collapse queries to populate the QueryResultCache and then loaded data. The cache seems to warm properly. Try turning debug logging on and see if we can get more of the strack trace. Joel
          Hide
          David Boychuck added a comment -

          7668111 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@cec848a0:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          7668114 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d9756dd8:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          7668123 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d38b6b9c:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          7668165 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@9fe9299c:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          7668169 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@94d684c6:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          7668175 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@31f8a000:java.lang.ArrayIndexOutOfBoundsException: 1
          at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618)
          at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297)
          at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662)
          at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389)
          at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118)
          at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465)
          at org.apache.solr.search.LRUCache.warm(LRUCache.java:188)
          at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077)
          at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
          at java.lang.Thread.run(Thread.java:722)

          Show
          David Boychuck added a comment - 7668111 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@cec848a0:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 7668114 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d9756dd8:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 7668123 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@d38b6b9c:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 7668165 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@9fe9299c:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 7668169 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@94d684c6:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 7668175 [searcherExecutor-18-thread-1] ERROR org.apache.solr.search.SolrCache – Error during auto-warming of key:org.apache.solr.search.QueryResultKey@31f8a000:java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.solr.search.CollapsingQParserPlugin$CollapsingScoreCollector.setNextReader(CollapsingQParserPlugin.java:402) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:618) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:297) at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1662) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1389) at org.apache.solr.search.SolrIndexSearcher.access$000(SolrIndexSearcher.java:118) at org.apache.solr.search.SolrIndexSearcher$3.regenerateItem(SolrIndexSearcher.java:465) at org.apache.solr.search.LRUCache.warm(LRUCache.java:188) at org.apache.solr.search.SolrIndexSearcher.warm(SolrIndexSearcher.java:2077) at org.apache.solr.core.SolrCore$4.call(SolrCore.java:1631) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
          Hide
          Joel Bernstein added a comment - - edited

          OK, I believe I see the problem. I'll update this ticket with a new patch shortly.

          Show
          Joel Bernstein added a comment - - edited OK, I believe I see the problem. I'll update this ticket with a new patch shortly.
          Hide
          Joel Bernstein added a comment -

          David,

          This was actually a pretty nasty bug, that pointed to possible memory leaks as well. The latest patch should resolve your exceptions around cache warming and eliminate the memory leak issues.

          Thanks for helping track down these bugs.

          Joel

          Show
          Joel Bernstein added a comment - David, This was actually a pretty nasty bug, that pointed to possible memory leaks as well. The latest patch should resolve your exceptions around cache warming and eliminate the memory leak issues. Thanks for helping track down these bugs. Joel
          Hide
          Joel Bernstein added a comment -

          Resolved an issue with sort order when an empty sort param is provided, reported in SOLR-5554.

          Show
          Joel Bernstein added a comment - Resolved an issue with sort order when an empty sort param is provided, reported in SOLR-5554 .
          Hide
          David Boychuck added a comment -

          Thank you for your quick response, I'm actually trying to use your plugin in production as the standard grouping had serious performance issues around facet grouping. I'll try to patch in your latest fix. Thank you for all of your help!

          Show
          David Boychuck added a comment - Thank you for your quick response, I'm actually trying to use your plugin in production as the standard grouping had serious performance issues around facet grouping. I'll try to patch in your latest fix. Thank you for all of your help!
          Hide
          David Boychuck added a comment -

          I am attaching a patch with all of the patches for CollapseQParserPlugin up to todays date. This patch is for those of use who want to use this plugin in Solr 4.5.1

          Show
          David Boychuck added a comment - I am attaching a patch with all of the patches for CollapseQParserPlugin up to todays date. This patch is for those of use who want to use this plugin in Solr 4.5.1
          Hide
          Joel Bernstein added a comment -

          All tests are passing as well as precommit. I'll wait a day or so to see if any review comments come in and if not I'll commit to trunk, 4x and Solr 4.6.1.

          Show
          Joel Bernstein added a comment - All tests are passing as well as precommit. I'll wait a day or so to see if any review comments come in and if not I'll commit to trunk, 4x and Solr 4.6.1.
          Hide
          shruti suri added a comment -

          Joel,

          I am getting the following error when i am applying CollapseQParserPluginPatch-solr-4.5.1.patch in solr-4.5.1.

          Error
          1 out of 1 hunk ignored – saving rejects to file solr/core/src/java/org/apache/solr/search/QParserPlugin.java.rej
          patching file solr/core/ivy.xml
          Hunk #1 FAILED at 42.
          1 out of 1 hunk FAILED – saving rejects to file solr/core/ivy.xml.rej
          patching file solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
          Hunk #1 succeeded at 295 (offset 100 lines).
          patching file solr/core/src/java/org/apache/solr/search/ScoreFilter.java
          patching file solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
          Reversed (or previously applied) patch detected! Assume -R? [n]
          Apply anyway? [n]
          Skipping patch.
          2 out of 2 hunks ignored – saving rejects to file solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java.rej
          patching file solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java
          patching file solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java

          Regards
          Shruti

          Show
          shruti suri added a comment - Joel, I am getting the following error when i am applying CollapseQParserPluginPatch-solr-4.5.1.patch in solr-4.5.1. Error 1 out of 1 hunk ignored – saving rejects to file solr/core/src/java/org/apache/solr/search/QParserPlugin.java.rej patching file solr/core/ivy.xml Hunk #1 FAILED at 42. 1 out of 1 hunk FAILED – saving rejects to file solr/core/ivy.xml.rej patching file solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java Hunk #1 succeeded at 295 (offset 100 lines). patching file solr/core/src/java/org/apache/solr/search/ScoreFilter.java patching file solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] Skipping patch. 2 out of 2 hunks ignored – saving rejects to file solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java.rej patching file solr/core/src/test/org/apache/solr/search/TestCollapseQParserPlugin.java patching file solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java Regards Shruti
          Hide
          Joel Bernstein added a comment -

          Hi Shruti,

          I suspect you have certain parts of the patch already applied. David created this patch, but I believe it applies the CollapsingQParserPlugin all the way back to the original commit.

          Joel

          Show
          Joel Bernstein added a comment - Hi Shruti, I suspect you have certain parts of the patch already applied. David created this patch, but I believe it applies the CollapsingQParserPlugin all the way back to the original commit. Joel
          Hide
          shruti suri added a comment -

          Joel

          Please tell me steps to integrate it with svn checkout lucene_solr_4_5_1

          Shruti

          Show
          shruti suri added a comment - Joel Please tell me steps to integrate it with svn checkout lucene_solr_4_5_1 Shruti
          Hide
          Joel Bernstein added a comment -

          David,

          I'd like to credit your work on this ticket in the CHANGES.txt. Let me know if you'd like to use your last name.

          Joel

          Show
          Joel Bernstein added a comment - David, I'd like to credit your work on this ticket in the CHANGES.txt. Let me know if you'd like to use your last name. Joel
          Hide
          ASF subversion and git services added a comment -

          Commit 1551999 from Joel Bernstein in branch 'dev/trunk'
          [ https://svn.apache.org/r1551999 ]

          SOLR-5416: CollapsingQParserPlugin bug with tagging

          Show
          ASF subversion and git services added a comment - Commit 1551999 from Joel Bernstein in branch 'dev/trunk' [ https://svn.apache.org/r1551999 ] SOLR-5416 : CollapsingQParserPlugin bug with tagging
          Hide
          ASF subversion and git services added a comment -

          Commit 1552027 from Joel Bernstein in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1552027 ]

          SOLR-5416: CollapsingQParserPlugin bug with tagging

          Show
          ASF subversion and git services added a comment - Commit 1552027 from Joel Bernstein in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1552027 ] SOLR-5416 : CollapsingQParserPlugin bug with tagging
          Hide
          David Boychuck added a comment -

          wow thanks Joel! Of course I wouldn't mind. My full name is David Boychuck.

          Show
          David Boychuck added a comment - wow thanks Joel! Of course I wouldn't mind. My full name is David Boychuck.
          Hide
          Joel Bernstein added a comment -

          Thanks David, I think the plan is to get these fixes into Solr 4.6.1. I'll be sure to credit you in the CHANGES.txt

          Joel

          Show
          Joel Bernstein added a comment - Thanks David, I think the plan is to get these fixes into Solr 4.6.1. I'll be sure to credit you in the CHANGES.txt Joel
          Hide
          ASF subversion and git services added a comment -

          Commit 1552876 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_6'
          [ https://svn.apache.org/r1552876 ]

          SOLR-5416: CollapsingQParserPlugin bug with tagging

          Show
          ASF subversion and git services added a comment - Commit 1552876 from Joel Bernstein in branch 'dev/branches/lucene_solr_4_6' [ https://svn.apache.org/r1552876 ] SOLR-5416 : CollapsingQParserPlugin bug with tagging
          Hide
          David Boychuck added a comment -

          Hi Joel,

          I'm noticing that QueryResultCache is not being used when using this plugin. Is it not supposed to?

          Show
          David Boychuck added a comment - Hi Joel, I'm noticing that QueryResultCache is not being used when using this plugin. Is it not supposed to?
          Hide
          Joel Bernstein added a comment -

          Actually the reason why I had to disable the QueryResultCache for the CollapsingQParserPlugin is this bug. You could trigger this bug by also doing

          1) Executing a query with the CollapsingQParsePlugin combined with facets.
          2) The query gets cached in the QueryResultCache. But the docset does not (this is normal for Solr).
          3) Execute the same query again, retrieve the query from the QueryResultCache but the docset needs to be regenerated.
          4) Regenerating the docset threw the same exception you reported in this ticket because they use the same method.

          I knew this bug existed, so I disabled the queryResultCache for the CollapsingQParserPlugin. But I didn't know tag/exclude would trigger the same bug. You pointed that out.

          Now that this issue is fixed, the CollapsingQParserPlugin will work fine with the QueryResultCache. But I haven't re-enabled it. If you want, you can create another ticket for that. I was planning on doing this for Solr 4.7.

          Show
          Joel Bernstein added a comment - Actually the reason why I had to disable the QueryResultCache for the CollapsingQParserPlugin is this bug. You could trigger this bug by also doing 1) Executing a query with the CollapsingQParsePlugin combined with facets. 2) The query gets cached in the QueryResultCache. But the docset does not (this is normal for Solr). 3) Execute the same query again, retrieve the query from the QueryResultCache but the docset needs to be regenerated. 4) Regenerating the docset threw the same exception you reported in this ticket because they use the same method. I knew this bug existed, so I disabled the queryResultCache for the CollapsingQParserPlugin. But I didn't know tag/exclude would trigger the same bug. You pointed that out. Now that this issue is fixed, the CollapsingQParserPlugin will work fine with the QueryResultCache. But I haven't re-enabled it. If you want, you can create another ticket for that. I was planning on doing this for Solr 4.7.
          Hide
          David Boychuck added a comment -

          Is it something that would be easy to re-enable? I'd like to use it in my 4.5.1 solr

          Show
          David Boychuck added a comment - Is it something that would be easy to re-enable? I'd like to use it in my 4.5.1 solr
          Show
          David Boychuck added a comment - https://issues.apache.org/jira/browse/SOLR-5624
          Hide
          Joel Bernstein added a comment -

          The equals and hashCode methods in the CollapsingPostFilter need to be changed. It's a pretty quick fix and easy to backport. I'll try to get to this early next week.

          Show
          Joel Bernstein added a comment - The equals and hashCode methods in the CollapsingPostFilter need to be changed. It's a pretty quick fix and easy to backport. I'll try to get to this early next week.
          Hide
          shruti suri added a comment -

          Hi Joel,

          I am facing an issue with Facet count using shard query and collapse filter.

          Query:-
          http://localhost:8983/solr/core1/select?fq=

          {!collapse%20field=type}

          &q=type:abc&facet=true&facet.field=type&shards=localhost:8983/solr/core1,localhost:8983/solr/core2

          Output:-
          <result name="response" numFound="1" start="0" maxScore="1.0"></result>
          <lst name="facet_counts">
          <lst name="facet_queries"/>
          <lst name="facet_fields">
          <lst name="type">
          <int name="abc">2</int>
          <int name="cde">0</int>
          <int name="swe">0</int>
          </lst>
          </lst>
          <lst name="facet_dates"/>
          <lst name="facet_ranges"/></lst></response>

          Issue:- In the above output numFound="1" and facet count for abc is 2. While merging results from shards unique Facet count should drop.

          Regards
          shruti

          Show
          shruti suri added a comment - Hi Joel, I am facing an issue with Facet count using shard query and collapse filter. Query:- http://localhost:8983/solr/core1/select?fq= {!collapse%20field=type} &q=type:abc&facet=true&facet.field=type&shards=localhost:8983/solr/core1,localhost:8983/solr/core2 Output:- <result name="response" numFound="1" start="0" maxScore="1.0"></result> <lst name="facet_counts"> <lst name="facet_queries"/> <lst name="facet_fields"> <lst name="type"> <int name="abc">2</int> <int name="cde">0</int> <int name="swe">0</int> </lst> </lst> <lst name="facet_dates"/> <lst name="facet_ranges"/></lst></response> Issue:- In the above output numFound="1" and facet count for abc is 2. While merging results from shards unique Facet count should drop. Regards shruti

            People

            • Assignee:
              Joel Bernstein
              Reporter:
              David Boychuck
            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development