From 1927f321b6e8e713861edd956d8560b485d332ca Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Tue, 8 Oct 2024 21:52:05 +0100 Subject: [PATCH] spotless --- .../search/retriever/KnnRetrieverBuilder.java | 12 ++++++------ .../xpack/rank/rrf/RRFRetrieverBuilderIT.java | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/search/retriever/KnnRetrieverBuilder.java b/server/src/main/java/org/elasticsearch/search/retriever/KnnRetrieverBuilder.java index 072a8efa66b22..5974dea23b577 100644 --- a/server/src/main/java/org/elasticsearch/search/retriever/KnnRetrieverBuilder.java +++ b/server/src/main/java/org/elasticsearch/search/retriever/KnnRetrieverBuilder.java @@ -154,13 +154,13 @@ public RetrieverBuilder rewrite(QueryRewriteContext ctx) throws IOException { toSet.set(v); if (v == null) { ll.onFailure( - new IllegalArgumentException( - format( - "[%s] with name [%s] returned null query_vector", - QUERY_VECTOR_BUILDER_FIELD.getPreferredName(), - queryVectorBuilder.getWriteableName() - ) + new IllegalArgumentException( + format( + "[%s] with name [%s] returned null query_vector", + QUERY_VECTOR_BUILDER_FIELD.getPreferredName(), + queryVectorBuilder.getWriteableName() ) + ) ); return; } diff --git a/x-pack/plugin/rank-rrf/src/internalClusterTest/java/org/elasticsearch/xpack/rank/rrf/RRFRetrieverBuilderIT.java b/x-pack/plugin/rank-rrf/src/internalClusterTest/java/org/elasticsearch/xpack/rank/rrf/RRFRetrieverBuilderIT.java index 2c5c7b5e8573a..def26a613775a 100644 --- a/x-pack/plugin/rank-rrf/src/internalClusterTest/java/org/elasticsearch/xpack/rank/rrf/RRFRetrieverBuilderIT.java +++ b/x-pack/plugin/rank-rrf/src/internalClusterTest/java/org/elasticsearch/xpack/rank/rrf/RRFRetrieverBuilderIT.java @@ -697,20 +697,20 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws var knn = new KnnRetrieverBuilder("vector", null, vectorBuilder, 10, 10, null); var standard = new StandardRetrieverBuilder(new KnnVectorQueryBuilder("vector", vectorBuilder, 10, 10, null)); var rrf = new RRFRetrieverBuilder( - List.of( - new CompoundRetrieverBuilder.RetrieverSource(knn, null), - new CompoundRetrieverBuilder.RetrieverSource(standard, null) - ), 10, 10); + List.of(new CompoundRetrieverBuilder.RetrieverSource(knn, null), new CompoundRetrieverBuilder.RetrieverSource(standard, null)), + 10, + 10 + ); assertResponse( - client().prepareSearch(INDEX).setSource(new SearchSourceBuilder().retriever(rrf)), - searchResponse -> assertThat(searchResponse.getHits().getTotalHits().value, is(4L)) + client().prepareSearch(INDEX).setSource(new SearchSourceBuilder().retriever(rrf)), + searchResponse -> assertThat(searchResponse.getHits().getTotalHits().value, is(4L)) ); assertThat(numAsyncCalls.get(), equalTo(2)); // check that we use the rewritten vector to build the explain query assertResponse( - client().prepareSearch(INDEX).setSource(new SearchSourceBuilder().retriever(rrf).explain(true)), - searchResponse -> assertThat(searchResponse.getHits().getTotalHits().value, is(4L)) + client().prepareSearch(INDEX).setSource(new SearchSourceBuilder().retriever(rrf).explain(true)), + searchResponse -> assertThat(searchResponse.getHits().getTotalHits().value, is(4L)) ); assertThat(numAsyncCalls.get(), equalTo(4)); }