Skip to content

Commit

Permalink
fix: partitionIDs should be union of partitionIDs of each subquery
Browse files Browse the repository at this point in the history
Signed-off-by: zhenshan.cao <[email protected]>
  • Loading branch information
czs007 committed Apr 11, 2024
1 parent 35f3959 commit 6470349
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/proxy/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,7 @@ func (node *Proxy) hybridSearch(ctx context.Context, request *milvuspb.HybridSea

metrics.ProxySearchVectors.
WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), request.GetDbName(), request.GetCollectionName()).
Add(float64(len(request.GetRequests())))
Add(float64(len(request.GetRequests()) * int(qt.SearchRequest.GetNq())))

searchDur := tr.ElapseSpan().Milliseconds()
metrics.ProxySQLatency.WithLabelValues(
Expand Down
4 changes: 4 additions & 0 deletions internal/proxy/task_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ func (t *searchTask) initAdvancedSearchRequest(ctx context.Context) error {
zap.Int64s("plan.OutputFieldIds", plan.GetOutputFieldIds()),
zap.Stringer("plan", plan)) // may be very large if large term passed.
}
// used for requery
if t.partitionKeyMode {
t.SearchRequest.PartitionIDs = t.partitionIDsSet.Collect()
}
var err error
t.reScorers, err = NewReScorers(len(t.request.GetSubReqs()), t.request.GetSearchParams())
if err != nil {
Expand Down

0 comments on commit 6470349

Please sign in to comment.