From 0461ddf7766bc05e1fee635d134d498c2493a1a7 Mon Sep 17 00:00:00 2001 From: Spade A <71589810+SpadeA-Tang@users.noreply.github.com> Date: Thu, 16 Jan 2025 22:05:01 +0800 Subject: [PATCH] fix: phrase match does not support offset input (#39338) fix: #39337 Signed-off-by: SpadeA-Tang --- internal/core/src/common/Types.h | 3 +++ internal/core/src/exec/expression/UnaryExpr.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/core/src/common/Types.h b/internal/core/src/common/Types.h index 10fd1e9e7d..d97399a31d 100644 --- a/internal/core/src/common/Types.h +++ b/internal/core/src/common/Types.h @@ -701,6 +701,9 @@ struct fmt::formatter : formatter { case milvus::OpType::TextMatch: name = "TextMatch"; break; + case milvus::OpType::PhraseMatch: + name = "PhraseMatch"; + break; } return formatter::format(name, ctx); } diff --git a/internal/core/src/exec/expression/UnaryExpr.h b/internal/core/src/exec/expression/UnaryExpr.h index 159fe5abb4..ee779225c3 100644 --- a/internal/core/src/exec/expression/UnaryExpr.h +++ b/internal/core/src/exec/expression/UnaryExpr.h @@ -330,7 +330,8 @@ class PhyUnaryRangeFilterExpr : public SegmentExpr { bool SupportOffsetInput() override { - if (expr_->op_type_ == proto::plan::OpType::TextMatch) { + if (expr_->op_type_ == proto::plan::OpType::TextMatch || + expr_->op_type_ == proto::plan::OpType::PhraseMatch) { return false; } return true;