fix: fix "at most one distinct index is allowed per field" in STRUCT index (#44969)

issue: https://github.com/milvus-io/milvus/issues/42148

Signed-off-by: SpadeA <tangchenjie1210@gmail.com>
This commit is contained in:
Spade A
2025-10-22 19:50:04 +08:00
committed by GitHub
parent cab9ee63f6
commit b6261f0282
+7
View File
@@ -59,6 +59,13 @@ func (s *Server) getFieldNameByID(schema *schemapb.CollectionSchema, fieldID int
return field.Name, nil
}
}
for _, structField := range schema.GetStructArrayFields() {
for _, subField := range structField.GetFields() {
if subField.FieldID == fieldID {
return subField.Name, nil
}
}
}
return "", nil
}