diff --git a/src/main/java/org/opensearch/neuralsearch/query/HybridQueryScorer.java b/src/main/java/org/opensearch/neuralsearch/query/HybridQueryScorer.java index 57ad4451f..e3e6a0862 100644 --- a/src/main/java/org/opensearch/neuralsearch/query/HybridQueryScorer.java +++ b/src/main/java/org/opensearch/neuralsearch/query/HybridQueryScorer.java @@ -5,13 +5,12 @@ package org.opensearch.neuralsearch.query; -import static java.util.Locale.ROOT; - import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Objects; @@ -128,7 +127,7 @@ public float[] hybridScores() throws IOException { .orElseThrow( () -> new IllegalStateException( String.format( - ROOT, + Locale.ROOT, "cannot set score for one of hybrid search subquery [%s] and document [%d]", query.toString(), scorer.docID() diff --git a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryIT.java b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryIT.java index 36613ef1b..864ebdc68 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/HybridQueryIT.java +++ b/src/test/java/org/opensearch/neuralsearch/query/HybridQueryIT.java @@ -175,7 +175,7 @@ public void testComplexQuery_whenMultipleSubqueries_thenSuccessful() { } /** - * Tests complex query with multiple nested sub-queries, where soem sub-queries are same + * Tests complex query with multiple nested sub-queries, where some sub-queries are same * { * "query": { * "hybrid": {