Skip to content

Commit

Permalink
Return recall rate in search result for V2
Browse files Browse the repository at this point in the history
Signed-off-by: yhmo <[email protected]>
  • Loading branch information
yhmo committed Dec 16, 2024
1 parent 546f00a commit 63df4f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public SearchResp search(MilvusServiceGrpc.MilvusServiceBlockingStub blockingStu
return SearchResp.builder()
.searchResults(convertUtils.getEntities(response))
.sessionTs(response.getSessionTs())
.recalls(response.getResults().getRecallsList())
.build();
}

Expand All @@ -197,6 +198,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 @@ -30,6 +30,7 @@
public class SearchResp {
private List<List<SearchResult>> searchResults;
private long sessionTs = 1L; // default eventually ts
private List<Float> recalls;

@Data
@SuperBuilder
Expand Down

0 comments on commit 63df4f7

Please sign in to comment.