mirror of https://github.com/milvus-io/milvus.git
fix: [GoSDK] Compose result set for result zero hit case (#34129)
See also #33952 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/34169/head
parent
f9a0f7bb25
commit
b1a34732b1
|
@ -78,24 +78,22 @@ func (c *Client) handleSearchResult(schema *entity.Schema, outputFields []string
|
|||
ResultCount: rc,
|
||||
Scores: results.GetScores()[offset : offset+rc],
|
||||
}
|
||||
// parse result set if current nq is not empty
|
||||
if rc > 0 {
|
||||
entry.IDs, entry.Err = column.IDColumns(schema, results.GetIds(), offset, offset+rc)
|
||||
|
||||
entry.IDs, entry.Err = column.IDColumns(schema, results.GetIds(), offset, offset+rc)
|
||||
if entry.Err != nil {
|
||||
offset += rc
|
||||
continue
|
||||
}
|
||||
// parse group-by values
|
||||
if gb != nil {
|
||||
entry.GroupByValue, entry.Err = column.FieldDataColumn(gb, offset, offset+rc)
|
||||
if entry.Err != nil {
|
||||
offset += rc
|
||||
continue
|
||||
}
|
||||
// parse group-by values
|
||||
if gb != nil {
|
||||
entry.GroupByValue, entry.Err = column.FieldDataColumn(gb, offset, offset+rc)
|
||||
if entry.Err != nil {
|
||||
offset += rc
|
||||
continue
|
||||
}
|
||||
}
|
||||
entry.Fields, entry.Err = c.parseSearchResult(schema, outputFields, fieldDataList, i, offset, offset+rc)
|
||||
sr = append(sr, entry)
|
||||
}
|
||||
entry.Fields, entry.Err = c.parseSearchResult(schema, outputFields, fieldDataList, i, offset, offset+rc)
|
||||
sr = append(sr, entry)
|
||||
|
||||
offset += rc
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue