File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 2424
2525import java .io .IOException ;
2626import java .util .ArrayList ;
27+ import java .util .Arrays ;
2728import java .util .HashMap ;
2829import java .util .List ;
2930import java .util .Locale ;
3031import java .util .Map ;
3132import java .util .Set ;
33+ import java .util .stream .Collectors ;
3234
3335import static org .elasticsearch .index .IndexSettings .INDEX_MAPPER_SOURCE_MODE_SETTING ;
3436import static org .elasticsearch .index .mapper .SourceFieldMapper .Mode .SYNTHETIC ;
3537import static org .elasticsearch .test .hamcrest .ElasticsearchAssertions .assertAcked ;
3638
3739public class DenseVectorFieldTypeIT extends AbstractEsqlIntegTestCase {
3840
39- public static final Set <String > ALL_DENSE_VECTOR_INDEX_TYPES = Set .of (
40- "int8_hnsw" ,
41- "hnsw" ,
42- "int4_hnsw" ,
43- "bbq_hnsw" ,
44- "int8_flat" ,
45- "int4_flat" ,
46- "bbq_flat" ,
47- "flat"
48- );
41+ public static final Set <String > ALL_DENSE_VECTOR_INDEX_TYPES = Arrays .stream (DenseVectorFieldMapper .VectorIndexType .values ())
42+ .filter (DenseVectorFieldMapper .VectorIndexType ::isEnabled )
43+ .map (v -> v .getName ().toLowerCase (Locale .ROOT ))
44+ .collect (Collectors .toSet ());
4945
5046 public static final float DELTA = 1e-7F ;
5147
You can’t perform that action at this time.
0 commit comments