feat: analysis user del
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user