From 6fb5c1f8274b788a4d5f83c785e4fa94c36ea006 Mon Sep 17 00:00:00 2001 From: ryjiang Date: Mon, 16 Dec 2024 11:52:23 +0800 Subject: [PATCH] support recalls in search result (#387) Signed-off-by: ryjiang --- milvus/grpc/Data.ts | 2 ++ milvus/types/Data.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/milvus/grpc/Data.ts b/milvus/grpc/Data.ts index b9a6c435..7b7f44bd 100644 --- a/milvus/grpc/Data.ts +++ b/milvus/grpc/Data.ts @@ -520,6 +520,7 @@ export class Data extends Collection { return { status: originSearchResult.status, results: [], + recalls: [], }; } @@ -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, }; } diff --git a/milvus/types/Data.ts b/milvus/types/Data.ts index 01ec069c..0dfb2152 100644 --- a/milvus/types/Data.ts +++ b/milvus/types/Data.ts @@ -262,6 +262,7 @@ export interface SearchResultData { export interface SearchResults extends resStatusResponse { results: SearchResultData[]; + recalls: number[]; } export interface ImportResponse extends resStatusResponse { @@ -422,6 +423,7 @@ export interface SearchRes extends resStatusResponse { topks: number[]; output_fields: string[]; group_by_field_value: string; + recalls: number[]; }; }