enhance: [GoSDK] Support return recall in search result ()

Related to 

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/39586/head
congqixia 2025-01-24 19:05:06 +08:00 committed by GitHub
parent c4ae9f4ece
commit e61a841806
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions
client/milvusclient

View File

@ -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

View File

@ -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
}