Skip to content

Commit

Permalink
Merge pull request #16 from fishpenguin/0.2.0-yukun
Browse files Browse the repository at this point in the history
Search won't return status when return nq = 0
  • Loading branch information
fishpenguin authored Apr 2, 2020
2 parents 6edf378 + 6625853 commit 4440421
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
---
- \#5 - Search interface bug
- \#10 - When the collection is empty, the search client throws exceptions
- \#15 - Search won't return status when return nq = 0

### Improvement
---
Expand Down
2 changes: 1 addition & 1 deletion milvus/ClientProxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (client *Milvusclient) Search(searchParam SearchParam) (TopkQueryResult, St
}
nq := topkQueryResult.GetRowNum()
if nq == 0 {
return TopkQueryResult{nil}, nil, err
return TopkQueryResult{nil}, status{int64(topkQueryResult.Status.ErrorCode), topkQueryResult.Status.Reason,}, err
}
var result = make([]QueryResult, nq)
topk := int64(len(topkQueryResult.GetIds())) / nq
Expand Down
2 changes: 1 addition & 1 deletion milvus/MilvusClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package milvus

import ()

var clientVersion string = "0.1.0"
var clientVersion string = "0.2.0"

// MetricType metric type
type MetricType int64
Expand Down

0 comments on commit 4440421

Please sign in to comment.