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 committed Dec 16, 2024
1 parent 1be538f commit dc57be7
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 @@ -490,6 +490,7 @@ export class Data extends Collection {
return {
status: originSearchResult.status,
results: [],
recalls: [],
};
}

Expand All @@ -503,6 +504,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 @@ -244,6 +244,7 @@ export interface SearchResultData {

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

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

Expand Down

0 comments on commit dc57be7

Please sign in to comment.