Scope knowledge and image libraries by brand
Frontend CI / Frontend (push) Successful in 2m59s
Backend CI / Backend (push) Successful in 14m58s

This commit is contained in:
2026-06-30 12:30:10 +08:00
parent 95ddb3057f
commit ced0c4ec0f
35 changed files with 1136 additions and 326 deletions
@@ -38,6 +38,7 @@ type VectorPoint struct {
type SearchRequest struct {
Vector []float64
TenantID int64
BrandID int64
GroupIDs []int64
Limit int
}
@@ -193,6 +194,9 @@ func (s *qdrantStore) Search(ctx context.Context, req SearchRequest) ([]SearchPo
sdk.NewMatchKeyword("status", "active"),
},
}
if req.BrandID > 0 {
filter.Must = append(filter.Must, sdk.NewMatchInt("brand_id", req.BrandID))
}
groupIDs := normalizeGroupIDs(req.GroupIDs)
if len(groupIDs) > 0 {
filter.Must = append(filter.Must, sdk.NewMatchInts("group_id", groupIDs...))