Skip to content

Commit 4df4be2

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent dbdbc6d commit 4df4be2

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldTypeTests.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -681,12 +681,18 @@ public void testRescoreOversampleQueryOverrides() {
681681

682682
public void testFilterSearchThreshold() {
683683
List<Tuple<DenseVectorFieldMapper.ElementType, Function<Query, KnnSearchStrategy>>> cases = List.of(
684-
Tuple.tuple(FLOAT, q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ?
685-
null : ((ESKnnFloatVectorQuery) q).getStrategy()),
686-
Tuple.tuple(BYTE, q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ?
687-
null : ((ESKnnByteVectorQuery) q).getStrategy()),
688-
Tuple.tuple(BIT, q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ?
689-
null : ((ESKnnByteVectorQuery) q).getStrategy())
684+
Tuple.tuple(
685+
FLOAT,
686+
q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ? null : ((ESKnnFloatVectorQuery) q).getStrategy()
687+
),
688+
Tuple.tuple(
689+
BYTE,
690+
q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ? null : ((ESKnnByteVectorQuery) q).getStrategy()
691+
),
692+
Tuple.tuple(
693+
BIT,
694+
q -> q instanceof PatienceKnnVectorQuery patienceKnnVectorQuery ? null : ((ESKnnByteVectorQuery) q).getStrategy()
695+
)
690696
);
691697
for (var tuple : cases) {
692698
DenseVectorFieldType fieldType = new DenseVectorFieldType(
@@ -718,7 +724,7 @@ public void testFilterSearchThreshold() {
718724
assertThat(((KnnSearchStrategy.Hnsw) strategy).filteredSearchThreshold(), equalTo(0));
719725

720726
query = fieldType.createKnnQuery(
721-
VectorData.fromFloats(new float[]{1, 4, 10}),
727+
VectorData.fromFloats(new float[] { 1, 4, 10 }),
722728
10,
723729
100,
724730
0f,

0 commit comments

Comments
 (0)