feat: analysis user del

This commit is contained in:
zzw
2026-11-03 10:25:14 +08:00
parent fe3ca6f2c9
commit 8cbd2a7d8b
19 changed files with 567 additions and 170 deletions
+12
View File
@@ -144,6 +144,18 @@ func UpsertFace(userID int64, vector []float32) error {
return err
}
func DeleteFace(userID int64) error {
c := getMilvus()
if c == nil {
return errors.New("milvus client is nil")
}
if userID < utils.NumberOne {
return errors.New("invalid face delete args")
}
ctx := context.Background()
return c.Delete(ctx, collectionName, "", fmt.Sprintf("%s == %d", faceUserIDField, userID))
}
func SearchUser(vector []float32) (int64, float32, error) {
c := getMilvus()
if c == nil {