diff --git a/src/test/java/org/opensearch/neuralsearch/processor/ExplanationPayloadProcessorTests.java b/src/test/java/org/opensearch/neuralsearch/processor/ExplanationPayloadProcessorTests.java index e47ea43d2..2e603d078 100644 --- a/src/test/java/org/opensearch/neuralsearch/processor/ExplanationPayloadProcessorTests.java +++ b/src/test/java/org/opensearch/neuralsearch/processor/ExplanationPayloadProcessorTests.java @@ -125,7 +125,7 @@ public void testParsingOfExplanations_whenFieldSortingAndExplanations_thenSucces searchHit.explanation(explanation); } TotalHits.Relation totalHitsRelation = randomFrom(TotalHits.Relation.values()); - TotalHits totalHits = new TotalHits(randomLongBetween(0, 1000), totalHitsRelation); + TotalHits totalHits = new TotalHits(randomLongBetween(1, 1000), totalHitsRelation); final SortField[] sortFields = new SortField[] { new SortField("random-text-field-1", SortField.Type.INT, randomBoolean()), new SortField("random-text-field-2", SortField.Type.STRING, randomBoolean()) }; @@ -203,7 +203,7 @@ private static SearchHits getSearchHits(float maxScore) { int requestedSize = 2; PriorityQueue priorityQueue = new PriorityQueue<>(new SearchHitComparator(null)); TotalHits.Relation totalHitsRelation = randomFrom(TotalHits.Relation.values()); - TotalHits totalHits = new TotalHits(randomLongBetween(0, 1000), totalHitsRelation); + TotalHits totalHits = new TotalHits(randomLongBetween(1, 1000), totalHitsRelation); final int numDocs = totalHits.value >= requestedSize ? requestedSize : (int) totalHits.value; int scoreFactor = randomIntBetween(1, numResponses);