From 1f1382f21cd3b304522b076b1ffaedcdd678d4ae Mon Sep 17 00:00:00 2001 From: zhichao-aws Date: Wed, 11 Oct 2023 22:03:00 +0800 Subject: [PATCH] tidy Signed-off-by: zhichao-aws --- .../query/NeuralSparseQueryBuilder.java | 1 - .../query/NeuralSparseQueryBuilderTests.java | 24 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilder.java b/src/main/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilder.java index f9085b3dd..d883af23d 100644 --- a/src/main/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilder.java +++ b/src/main/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilder.java @@ -6,7 +6,6 @@ package org.opensearch.neuralsearch.query; import java.io.IOException; -import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; diff --git a/src/test/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilderTests.java b/src/test/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilderTests.java index fbb752a25..d40d70c09 100644 --- a/src/test/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilderTests.java +++ b/src/test/java/org/opensearch/neuralsearch/query/NeuralSparseQueryBuilderTests.java @@ -387,21 +387,21 @@ public void testHashAndEquals() { // Identical to sparseEncodingQueryBuilder_baseline except non-null query tokens supplier NeuralSparseQueryBuilder sparseEncodingQueryBuilder_nonNullQueryTokens = new NeuralSparseQueryBuilder().fieldName(fieldName1) - .queryText(queryText1) - .modelId(modelId1) - .maxTokenScore(maxTokenScore1) - .boost(boost1) - .queryName(queryName1) - .queryTokensSupplier(()->queryTokens1); + .queryText(queryText1) + .modelId(modelId1) + .maxTokenScore(maxTokenScore1) + .boost(boost1) + .queryName(queryName1) + .queryTokensSupplier(() -> queryTokens1); // Identical to sparseEncodingQueryBuilder_baseline except non-null query tokens supplier NeuralSparseQueryBuilder sparseEncodingQueryBuilder_diffQueryTokens = new NeuralSparseQueryBuilder().fieldName(fieldName1) - .queryText(queryText1) - .modelId(modelId1) - .maxTokenScore(maxTokenScore1) - .boost(boost1) - .queryName(queryName1) - .queryTokensSupplier(()->queryTokens2); + .queryText(queryText1) + .modelId(modelId1) + .maxTokenScore(maxTokenScore1) + .boost(boost1) + .queryName(queryName1) + .queryTokensSupplier(() -> queryTokens2); assertEquals(sparseEncodingQueryBuilder_baseline, sparseEncodingQueryBuilder_baseline); assertEquals(sparseEncodingQueryBuilder_baseline.hashCode(), sparseEncodingQueryBuilder_baseline.hashCode());