From dc57be7859a3b251fa0aa3de588975cd2b1d75c5 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 fb3e764d..8aa828a0 100644 --- a/milvus/grpc/Data.ts +++ b/milvus/grpc/Data.ts @@ -490,6 +490,7 @@ export class Data extends Collection { return { status: originSearchResult.status, results: [], + recalls: [], }; } @@ -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, }; } diff --git a/milvus/types/Data.ts b/milvus/types/Data.ts index b984c2b2..e32ffb1c 100644 --- a/milvus/types/Data.ts +++ b/milvus/types/Data.ts @@ -244,6 +244,7 @@ export interface SearchResultData { export interface SearchResults extends resStatusResponse { results: SearchResultData[]; + recalls: number[]; } export interface ImportResponse extends resStatusResponse { @@ -393,6 +394,7 @@ export interface SearchRes extends resStatusResponse { topks: number[]; output_fields: string[]; group_by_field_value: string; + recalls: number[]; }; }