@@ -1028,6 +1028,7 @@ void testStruct() {
10281028 String structField = "clips" ;
10291029 String structScalarField = "desc" ;
10301030 String structVectorField = "clip" ;
1031+ String structBinVectorField = "clip_bin" ;
10311032 int structCapacity = 300 ;
10321033 int varcharLength = 100 ;
10331034 CreateCollectionReq .CollectionSchema collectionSchema = CreateCollectionReq .CollectionSchema .builder ()
@@ -1065,6 +1066,12 @@ void testStruct() {
10651066 .dataType (DataType .FloatVector )
10661067 .dimension (DIMENSION )
10671068 .build ())
1069+ .addStructField (AddFieldReq .builder ()
1070+ .fieldName (structBinVectorField )
1071+ .description ("dummy" )
1072+ .dataType (DataType .BinaryVector )
1073+ .dimension (DIMENSION )
1074+ .build ())
10681075 .build ());
10691076
10701077 client .dropCollection (DropCollectionReq .builder ()
@@ -1084,9 +1091,14 @@ void testStruct() {
10841091 .metricType (IndexParam .MetricType .COSINE )
10851092 .build ());
10861093 indexParams .add (IndexParam .builder ()
1087- .fieldName (structVectorField )
1088- .indexType (IndexParam .IndexType .EMB_LIST_HNSW )
1089- .metricType (IndexParam .MetricType .MAX_SIM )
1094+ .fieldName ("clips[clip]" )
1095+ .indexType (IndexParam .IndexType .HNSW )
1096+ .metricType (IndexParam .MetricType .MAX_SIM_L2 )
1097+ .build ());
1098+ indexParams .add (IndexParam .builder ()
1099+ .fieldName ("clips[clip_bin]" )
1100+ .indexType (IndexParam .IndexType .BIN_IVF_FLAT )
1101+ .metricType (IndexParam .MetricType .MAX_SIM_HAMMING )
10901102 .build ());
10911103 client .createIndex (CreateIndexReq .builder ()
10921104 .collectionName (randomCollectionName )
@@ -1128,8 +1140,8 @@ void testStruct() {
11281140 .build ());
11291141 Assertions .assertEquals (1 , indexDesc .getIndexDescriptions ().size ());
11301142 DescribeIndexResp .IndexDesc desc = indexDesc .getIndexDescriptions ().get (0 );
1131- Assertions .assertEquals (IndexParam .IndexType .EMB_LIST_HNSW , desc .getIndexType ());
1132- Assertions .assertEquals (IndexParam .MetricType .MAX_SIM , desc .getMetricType ());
1143+ Assertions .assertEquals (IndexParam .IndexType .HNSW , desc .getIndexType ());
1144+ Assertions .assertEquals (IndexParam .MetricType .MAX_SIM_COSINE , desc .getMetricType ());
11331145
11341146 // insert
11351147 List <JsonObject > rows = new ArrayList <>();
0 commit comments