diff --git a/x-pack/plugin/async-search/src/main/java/org/elasticsearch/xpack/search/MutableSearchResponse.java b/x-pack/plugin/async-search/src/main/java/org/elasticsearch/xpack/search/MutableSearchResponse.java index a3f4a48fdf1..4c45c38b5ec 100644 --- a/x-pack/plugin/async-search/src/main/java/org/elasticsearch/xpack/search/MutableSearchResponse.java +++ b/x-pack/plugin/async-search/src/main/java/org/elasticsearch/xpack/search/MutableSearchResponse.java @@ -44,7 +44,7 @@ class MutableSearchResponse { /** * How we get the reduced aggs when {@link #finalResponse} isn't populated. * We default to returning no aggs, this {@code -> null}. We'll replace - * this as we receive updates on the search progress listener. + * this as we receive updates on the search progress listener. */ private Supplier reducedAggsSource = () -> null; private int reducePhase; @@ -77,6 +77,7 @@ class MutableSearchResponse { this.shardFailures = totalShards == -1 ? null : new AtomicArray<>(totalShards-skippedShards); this.isPartial = true; this.threadContext = threadContext; + this.totalHits = new TotalHits(0L, TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO); } /** @@ -150,7 +151,7 @@ class MutableSearchResponse { return finalResponse; } if (clusters == null) { - // An error occurred before we got the shard list + // An error occurred before we got the shard list return null; } /* diff --git a/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchActionIT.java b/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchActionIT.java index 7e579e74cf0..c54b28e389c 100644 --- a/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchActionIT.java +++ b/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchActionIT.java @@ -123,7 +123,6 @@ public class AsyncSearchActionIT extends AsyncSearchIntegTestCase { } } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/55920") public void testTermsAggregation() throws Exception { int step = numShards > 2 ? randomIntBetween(2, numShards) : 2; int numFailures = randomBoolean() ? randomIntBetween(0, numShards) : 0;