From 6e6721c6d4db2fd551004f53e14059c67226841d Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Wed, 6 Jul 2022 16:10:00 +0800 Subject: [PATCH] fix tag/json tag error --- source/libs/index/src/indexFilter.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/source/libs/index/src/indexFilter.c b/source/libs/index/src/indexFilter.c index 0f0812aa77..cb00bc6c6a 100644 --- a/source/libs/index/src/indexFilter.c +++ b/source/libs/index/src/indexFilter.c @@ -529,11 +529,9 @@ static int32_t sifExecOper(SOperatorNode *node, SIFCtx *ctx, SIFParam *output) { SIFParam *params = NULL; SIF_ERR_RET(sifInitOperParams(¶ms, node, ctx)); - if (node->opType != OP_TYPE_JSON_CONTAINS) { - if (params[0].status == SFLT_NOT_INDEX || (nParam > 1 && params[1].status == SFLT_NOT_INDEX)) { - output->status = SFLT_NOT_INDEX; - return code; - } + if (params[0].status == SFLT_NOT_INDEX && (nParam > 1 && params[1].status == SFLT_NOT_INDEX)) { + output->status = SFLT_NOT_INDEX; + return code; } // ugly code, refactor later @@ -545,11 +543,9 @@ static int32_t sifExecOper(SOperatorNode *node, SIFCtx *ctx, SIFParam *output) { SIF_ERR_RET(operFn(¶ms[0], nParam > 1 ? ¶ms[1] : NULL, output)); } else { // ugly code, refactor later - if (node->opType != OP_TYPE_JSON_CONTAINS) { - if (nParam > 1 && params[1].status == SFLT_NOT_INDEX) { - output->status = SFLT_NOT_INDEX; - return code; - } + if (nParam > 1 && params[1].status == SFLT_NOT_INDEX) { + output->status = SFLT_NOT_INDEX; + return code; } SIF_ERR_RET(sifGetOperFn(node->opType, &operFn, &output->status)); }