diff --git a/client/milvusclient/read.go b/client/milvusclient/read.go index ab87598c23a80..6d9a3dc981db2 100644 --- a/client/milvusclient/read.go +++ b/client/milvusclient/read.go @@ -71,6 +71,11 @@ func (c *Client) handleSearchResult(schema *entity.Schema, outputFields []string sch: schema, } + // set recall if returned + if i < len(results.Recalls) { + entry.Recall = results.Recalls[i] + } + entry.IDs, entry.Err = column.IDColumns(schema, results.GetIds(), offset, offset+rc) if entry.Err != nil { offset += rc diff --git a/client/milvusclient/results.go b/client/milvusclient/results.go index c5ef9e33f7c20..0f16fecd59989 100644 --- a/client/milvusclient/results.go +++ b/client/milvusclient/results.go @@ -37,6 +37,7 @@ type ResultSet struct { IDs column.Column // auto generated id, can be mapped to the columns from `Insert` API Fields DataSet // output field data Scores []float32 // distance to the target vector + Recall float32 // recall of the query vector's search result (estimated by zilliz cloud) Err error // search error if any }