@@ -92,7 +92,7 @@ public class DenseVectorFieldMapperTests extends SyntheticVectorsMapperTestCase
9292
9393 public DenseVectorFieldMapperTests () {
9494 this .elementType = ES93GenericFlatVectorsFormat .GENERIC_VECTOR_FORMAT .isEnabled ()
95- ? randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BFLOAT16 , ElementType .BIT )
95+ ? randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BFLOAT16 , ElementType .BIT )
9696 : randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BIT );
9797 this .indexed = usually ();
9898 this .indexOptionsSet = this .indexed && randomBoolean ();
@@ -1930,18 +1930,18 @@ public void testKnnVectorsFormat() throws IOException {
19301930 knnVectorsFormat = ((LegacyPerFieldMapperCodec ) codec ).getKnnVectorsFormatForField ("field" );
19311931 }
19321932 String expectedString = ES93GenericFlatVectorsFormat .GENERIC_VECTOR_FORMAT .isEnabled ()
1933- ? "ES93HnswVectorsFormat(name=ES93HnswVectorsFormat, maxConn="
1934- + (setM ? m : DEFAULT_MAX_CONN )
1935- + ", beamWidth="
1936- + (setEfConstruction ? efConstruction : DEFAULT_BEAM_WIDTH )
1937- + ", flatVectorFormat=ES93GenericFlatVectorsFormat(name=ES93GenericFlatVectorsFormat"
1938- + ", format=Lucene99FlatVectorsFormat(name=Lucene99FlatVectorsFormat, flatVectorScorer=DefaultFlatVectorScorer())))"
1939- :"Lucene99HnswVectorsFormat(name=Lucene99HnswVectorsFormat, maxConn="
1940- + (setM ? m : DEFAULT_MAX_CONN )
1941- + ", beamWidth="
1942- + (setEfConstruction ? efConstruction : DEFAULT_BEAM_WIDTH )
1943- + ", flatVectorFormat=Lucene99FlatVectorsFormat(vectorsScorer=DefaultFlatVectorScorer())"
1944- + ")" ;
1933+ ? "ES93HnswVectorsFormat(name=ES93HnswVectorsFormat, maxConn="
1934+ + (setM ? m : DEFAULT_MAX_CONN )
1935+ + ", beamWidth="
1936+ + (setEfConstruction ? efConstruction : DEFAULT_BEAM_WIDTH )
1937+ + ", flatVectorFormat=ES93GenericFlatVectorsFormat(name=ES93GenericFlatVectorsFormat"
1938+ + ", format=Lucene99FlatVectorsFormat(name=Lucene99FlatVectorsFormat, flatVectorScorer=DefaultFlatVectorScorer())))"
1939+ : "Lucene99HnswVectorsFormat(name=Lucene99HnswVectorsFormat, maxConn="
1940+ + (setM ? m : DEFAULT_MAX_CONN )
1941+ + ", beamWidth="
1942+ + (setEfConstruction ? efConstruction : DEFAULT_BEAM_WIDTH )
1943+ + ", flatVectorFormat=Lucene99FlatVectorsFormat(vectorsScorer=DefaultFlatVectorScorer())"
1944+ + ")" ;
19451945 assertEquals (expectedString , knnVectorsFormat .toString ());
19461946 }
19471947
@@ -2072,22 +2072,23 @@ public void testKnnBBQHNSWVectorsFormat() throws IOException {
20722072 knnVectorsFormat = ((LegacyPerFieldMapperCodec ) codec ).getKnnVectorsFormatForField ("field" );
20732073 }
20742074 String expectedString = ES93GenericFlatVectorsFormat .GENERIC_VECTOR_FORMAT .isEnabled ()
2075- ? "ES93HnswBinaryQuantizedVectorsFormat(name=ES93HnswBinaryQuantizedVectorsFormat, maxConn="
2076- + m
2077- + ", beamWidth="
2078- + efConstruction
2079- + ", flatVectorFormat=ES93BinaryQuantizedVectorsFormat("
2080- + "name=ES93BinaryQuantizedVectorsFormat, "
2081- + "rawVectorFormat=ES93GenericFlatVectorsFormat(name=ES93GenericFlatVectorsFormat,"
2082- + " format=Lucene99FlatVectorsFormat"
2075+ ? "ES93HnswBinaryQuantizedVectorsFormat(name=ES93HnswBinaryQuantizedVectorsFormat, maxConn="
2076+ + m
2077+ + ", beamWidth="
2078+ + efConstruction
2079+ + ", flatVectorFormat=ES93BinaryQuantizedVectorsFormat("
2080+ + "name=ES93BinaryQuantizedVectorsFormat, "
2081+ + "rawVectorFormat=ES93GenericFlatVectorsFormat(name=ES93GenericFlatVectorsFormat,"
2082+ + " format=Lucene99FlatVectorsFormat"
20832083 : "ES818HnswBinaryQuantizedVectorsFormat(name=ES818HnswBinaryQuantizedVectorsFormat, maxConn="
2084- + m
2085- + ", beamWidth="
2086- + efConstruction
2087- + ", flatVectorFormat=ES818BinaryQuantizedVectorsFormat("
2088- + "name=ES818BinaryQuantizedVectorsFormat, "
2089- + "flatVectorScorer=ES818BinaryFlatVectorsScorer(nonQuantizedDelegate=DefaultFlatVectorScorer())))" ;
2090- assertEquals (expectedString , knnVectorsFormat .toString ());;
2084+ + m
2085+ + ", beamWidth="
2086+ + efConstruction
2087+ + ", flatVectorFormat=ES818BinaryQuantizedVectorsFormat("
2088+ + "name=ES818BinaryQuantizedVectorsFormat, "
2089+ + "flatVectorScorer=ES818BinaryFlatVectorsScorer(nonQuantizedDelegate=DefaultFlatVectorScorer())))" ;
2090+ assertEquals (expectedString , knnVectorsFormat .toString ());
2091+ ;
20912092 assertThat (knnVectorsFormat , hasToString (startsWith (expectedString )));
20922093 }
20932094
@@ -2219,7 +2220,7 @@ protected boolean supportsEmptyInputArray() {
22192220 private static class DenseVectorSyntheticSourceSupport implements SyntheticSourceSupport {
22202221 private final int dims = between (5 , 1000 );
22212222 private final ElementType elementType = ES93GenericFlatVectorsFormat .GENERIC_VECTOR_FORMAT .isEnabled ()
2222- ? randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BFLOAT16 , ElementType .BIT )
2223+ ? randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BFLOAT16 , ElementType .BIT )
22232224 : randomFrom (ElementType .BYTE , ElementType .FLOAT , ElementType .BIT );
22242225 private final boolean indexed = randomBoolean ();
22252226 private final boolean indexOptionsSet = indexed && randomBoolean ();
0 commit comments