From 21e71f6eb2f478eceaea218782974041eaa3ac4b Mon Sep 17 00:00:00 2001 From: Bingyi Sun Date: Mon, 21 Jul 2025 10:30:54 +0800 Subject: [PATCH] fix: Check json nested path before validating data type (#43329) issue: #43279 Signed-off-by: sunby --- internal/core/src/segcore/SegmentSealed.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/core/src/segcore/SegmentSealed.h b/internal/core/src/segcore/SegmentSealed.h index fd43b2a041..9442c8f622 100644 --- a/internal/core/src/segcore/SegmentSealed.h +++ b/internal/core/src/segcore/SegmentSealed.h @@ -137,12 +137,14 @@ class SegmentSealed : public SegmentInternalInterface { return path.substr(0, index.nested_path.length()) == index.nested_path; } + if (index.nested_path != path) { + return false; + } if (any_type) { return true; } - return index.nested_path == path && - milvus::index::json::IsDataTypeSupported( - index.cast_type, data_type, is_json_contain); + return milvus::index::json::IsDataTypeSupported( + index.cast_type, data_type, is_json_contain); }); return it != json_indices.end(); }