mirror of https://github.com/apache/lucene.git
SOLR-13336: fix CloudInspectUtil to use filter to eliminate risk of TooManyClausesException
This commit is contained in:
parent
9f644b1c69
commit
1c3d23e58a
|
@ -209,12 +209,15 @@ public class CloudInspectUtil {
|
||||||
try {
|
try {
|
||||||
// get versions for the mismatched ids
|
// get versions for the mismatched ids
|
||||||
boolean foundId = false;
|
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) {
|
for (Map doc : differences) {
|
||||||
ids.append(" ").append(doc.get("id"));
|
ids.append(" ").append(doc.get("id"));
|
||||||
foundId = true;
|
foundId = true;
|
||||||
}
|
}
|
||||||
ids.append(")");
|
ids.append("))");
|
||||||
|
|
||||||
if (foundId) {
|
if (foundId) {
|
||||||
// get versions for those ids that don't match
|
// get versions for those ids that don't match
|
||||||
|
|
Loading…
Reference in New Issue