Skip to content

Commit

Permalink
Return recall rate in search result for V2 (#1237)
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <[email protected]>
  • Loading branch information
yhmo authored Dec 16, 2024
1 parent a0cced0 commit 65040cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/io/milvus/v2/service/vector/VectorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public SearchResp search(MilvusServiceGrpc.MilvusServiceBlockingStub blockingStu

return SearchResp.builder()
.searchResults(convertUtils.getEntities(response))
.recalls(response.getResults().getRecallsList())
.build();
}

Expand All @@ -194,6 +195,7 @@ public SearchResp hybridSearch(MilvusServiceGrpc.MilvusServiceBlockingStub block

return SearchResp.builder()
.searchResults(convertUtils.getEntities(response))
.recalls(response.getResults().getRecallsList())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
@SuperBuilder
public class SearchResp {
private List<List<SearchResult>> searchResults;
private List<Float> recalls;

@Data
@SuperBuilder
Expand Down

0 comments on commit 65040cc

Please sign in to comment.