Scope knowledge and image libraries by brand
This commit is contained in:
@@ -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...))
|
||||
|
||||
Reference in New Issue
Block a user