mirror of https://github.com/milvus-io/milvus.git
enhance: [GoSDK] Support return recall in search result (#39580)
Related to #37899 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/39586/head
parent
c4ae9f4ece
commit
e61a841806
client/milvusclient
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue