You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/04/19 18:03:14 UTC

[lucene-solr] branch branch_8x updated: SOLR-13336: fix CloudInspectUtil to use filter to eliminate risk of TooManyClausesException

This is an automated email from the ASF dual-hosted git repository.

hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 449dc44  SOLR-13336: fix CloudInspectUtil to use filter to eliminate risk of TooManyClausesException
449dc44 is described below

commit 449dc4438bca5f63f48044e81bc5ba401e8faea6
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Fri Apr 19 10:59:53 2019 -0700

    SOLR-13336: fix CloudInspectUtil to use filter to eliminate risk of TooManyClausesException
    
    (cherry picked from commit 1c3d23e58a987e60a0af08b9fca2211908cf49d3)
---
 .../src/java/org/apache/solr/cloud/CloudInspectUtil.java           | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/CloudInspectUtil.java b/solr/test-framework/src/java/org/apache/solr/cloud/CloudInspectUtil.java
index c66fa0a..a72f06b 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/CloudInspectUtil.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/CloudInspectUtil.java
@@ -209,12 +209,15 @@ public class CloudInspectUtil {
     try {
       // get versions for the mismatched ids
       boolean foundId = false;
-      StringBuilder ids = new StringBuilder("id:(");
+
+      // use filter() to allow being parsed as 'terms in set' query instead of a (weighted/scored)
+      // BooleanQuery so we don't trip too many boolean clauses
+      StringBuilder ids = new StringBuilder("filter(id:(");
       for (Map doc : differences) {
         ids.append(" ").append(doc.get("id"));
         foundId = true;
       }
-      ids.append(")");
+      ids.append("))");
 
       if (foundId) {
         // get versions for those ids that don't match