From 26a6184b0a6e4ed2be1e3615efea638dfc09b2fb Mon Sep 17 00:00:00 2001 From: ryjiang Date: Thu, 1 Aug 2024 16:44:36 +0800 Subject: [PATCH] types: add segmentLevel for QuerySegmentResponse (#345) Signed-off-by: ryjiang --- milvus/const/milvus.ts | 8 ++++++++ milvus/types/Data.ts | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/milvus/const/milvus.ts b/milvus/const/milvus.ts index 4a26fbb..a76bdab 100644 --- a/milvus/const/milvus.ts +++ b/milvus/const/milvus.ts @@ -30,6 +30,14 @@ export enum SegmentState { Flushing = 'Flushing', } +// segment level enum +export enum SegmentLevel { + Legacy = 0, // zero value for legacy logic + L0 = 1, // L0 segment, contains delta data for current channel + L1 = 2, // L1 segment, normal segment, with no extra compaction attribute + L2 = 3, // L2 segment, segment with extra data distribution info +} + // compaction state enum export enum CompactionState { UndefiedState = 0, diff --git a/milvus/types/Data.ts b/milvus/types/Data.ts index b731ef3..aa52849 100644 --- a/milvus/types/Data.ts +++ b/milvus/types/Data.ts @@ -6,6 +6,7 @@ import { keyValueObj, DataType, SegmentState, + SegmentLevel, ImportState, ConsistencyLevelEnum, collectionNameReq, @@ -192,8 +193,10 @@ export interface QuerySegmentInfo { num_rows: number; index_name: string; indexID: number; - nodeID: number; + nodeID: number; // deployed node id, use nodeIds instead state: SegmentState; + nodeIds: number[]; + level: SegmentLevel; } export interface PersistentSegmentInfo {