Skip to content

Commit

Permalink
support recalls in search result (#387)
Browse files Browse the repository at this point in the history
Signed-off-by: ryjiang <[email protected]>
  • Loading branch information
shanghaikid authored Dec 16, 2024
1 parent b9c900f commit 6fb5c1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions milvus/grpc/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export class Data extends Collection {
return {
status: originSearchResult.status,
results: [],
recalls: [],
};
}

Expand All @@ -533,6 +534,7 @@ export class Data extends Collection {
status: originSearchResult.status,
// nq === 1, return the first object of results array
results: nq === 1 ? results[0] || [] : results,
recalls: originSearchResult.results.recalls,
};
}

Expand Down
2 changes: 2 additions & 0 deletions milvus/types/Data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export interface SearchResultData {

export interface SearchResults extends resStatusResponse {
results: SearchResultData[];
recalls: number[];
}

export interface ImportResponse extends resStatusResponse {
Expand Down Expand Up @@ -422,6 +423,7 @@ export interface SearchRes extends resStatusResponse {
topks: number[];
output_fields: string[];
group_by_field_value: string;
recalls: number[];
};
}

Expand Down

0 comments on commit 6fb5c1f

Please sign in to comment.