You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/09/07 09:57:34 UTC

[46/50] [abbrv] lucene-solr:apiv2: FOLR-5725: test fix for miserable differnce between cloud and non-cloud facets - when facet.limit=0&facet.missing=true the former responds with missing counts, but later doesn't.

FOLR-5725: test fix for miserable differnce between cloud and non-cloud
facets - when facet.limit=0&facet.missing=true the former responds with
missing counts, but later doesn't.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9ac5c1cf
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9ac5c1cf
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9ac5c1cf

Branch: refs/heads/apiv2
Commit: 9ac5c1cf149fdd393209795226dd7ee792b767b2
Parents: e026ac4
Author: Mikhail Khludnev <mk...@apache.org>
Authored: Sat Sep 3 23:52:47 2016 +0300
Committer: Mikhail Khludnev <mk...@apache.org>
Committed: Sat Sep 3 23:54:50 2016 +0300

----------------------------------------------------------------------
 .../handler/component/DistributedFacetExistsSmallTest.java  | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9ac5c1cf/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
index 4a827be..22dfca3 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java
@@ -133,7 +133,16 @@ public class DistributedFacetExistsSmallTest extends BaseDistributedSearchTestCa
       params.add("facet.mincount", rand.nextBoolean() ? "0": "1" );
     }
     
+    final boolean shardRespondsWithMissingEvenLimitIsZero = 
+          params.getBool("facet.missing", false) && params.getInt("facet.limit", 100)==0;
+    // skip miss count check, here cloud is different to non-distrib
+    if (shardRespondsWithMissingEvenLimitIsZero ) {
+      handle.put(null, SKIP);
+    }
     query(params);
+    if (shardRespondsWithMissingEvenLimitIsZero ) {
+      handle.remove(null);
+    }
   }
   
   private void checkInvalidMincount() throws SolrServerException, IOException {