From e8e449dd2dc7a1b520ea81ad86849170c149c25f Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Wed, 26 Feb 2025 16:06:02 -0800 Subject: [PATCH] Fixed imports for 3.0-alpha1. Signed-off-by: AWSHurneyt --- .../org/opensearch/percolator/PercolatorFieldMapperExt.java | 3 +-- .../src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java b/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java index 8ed81e12b..ac5a452e7 100644 --- a/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java +++ b/alerting/src/main/java/org/opensearch/percolator/PercolatorFieldMapperExt.java @@ -31,7 +31,6 @@ package org.opensearch.percolator; -import org.apache.lucene.document.BinaryRange; import org.apache.lucene.document.Field; import org.apache.lucene.document.FieldType; import org.apache.lucene.document.NumericDocValuesField; @@ -293,7 +292,7 @@ Tuple createCandidateQuery(IndexReader indexReader, Versi List extractedTerms = t.v1(); Map> encodedPointValuesByField = t.v2(); // `1 + ` is needed to take into account the EXTRACTION_FAILED should clause - boolean canUseMinimumShouldMatchField = 1 + extractedTerms.size() + encodedPointValuesByField.size() <= BooleanQuery + boolean canUseMinimumShouldMatchField = 1 + extractedTerms.size() + encodedPointValuesByField.size() <= IndexSearcher .getMaxClauseCount(); List subQueries = new ArrayList<>(); diff --git a/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt index b6f492164..093b0bd39 100644 --- a/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt +++ b/alerting/src/main/kotlin/org/opensearch/alerting/util/IndexUtils.kt @@ -11,7 +11,6 @@ import org.opensearch.action.support.clustermanager.AcknowledgedResponse import org.opensearch.alerting.alerts.AlertIndices import org.opensearch.alerting.comments.CommentsIndices import org.opensearch.alerting.core.ScheduledJobIndices -import org.opensearch.transport.client.IndicesAdminClient import org.opensearch.cluster.ClusterState import org.opensearch.cluster.metadata.IndexAbstraction import org.opensearch.cluster.metadata.IndexMetadata @@ -23,6 +22,7 @@ import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.core.action.ActionListener import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.XContentParser +import org.opensearch.transport.client.IndicesAdminClient class IndexUtils {