From 7ea7d904952e66965be55beefa95c5c4ac490aa7 Mon Sep 17 00:00:00 2001 From: Martin Gaievski Date: Fri, 29 Dec 2023 14:08:45 -0800 Subject: [PATCH] Address Heemin's comments Signed-off-by: Martin Gaievski --- .../org/opensearch/neuralsearch/query/HybridQueryScorer.java | 5 ++--- .../org/opensearch/neuralsearch/query/HybridQueryIT.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) 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": {