From 2c19227c22522a7edcb71399d000ba514adf811d Mon Sep 17 00:00:00 2001 From: "hs.zhang" <22708345+cangfengzhs@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:13:45 +0800 Subject: [PATCH 1/2] fix bug --- src/kvstore/listener/elasticsearch/ESListener.cpp | 3 +++ tests/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kvstore/listener/elasticsearch/ESListener.cpp b/src/kvstore/listener/elasticsearch/ESListener.cpp index cdc4fe5205d..d1c1223e12d 100644 --- a/src/kvstore/listener/elasticsearch/ESListener.cpp +++ b/src/kvstore/listener/elasticsearch/ESListener.cpp @@ -95,6 +95,9 @@ void ESListener::pickTagAndEdgeData(BatchLogType type, } auto field = index.second.get_fields().front(); auto v = reader->getValueByName(field); + if (v.type() == Value::Type::NULLVALUE) { + continue; + } if (v.type() != Value::Type::STRING) { LOG(ERROR) << "Can't create fulltext index on type " << v.type(); } diff --git a/tests/Makefile b/tests/Makefile index 5200dc86219..8e33ae1efc8 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -15,7 +15,7 @@ BUILD_DIR ?= $(CURR_DIR)/../build DEBUG ?= true J ?= 10 ENABLE_FT_INDEX ?= false -ES_ADDRESS ?= "locahost:9200" +ES_ADDRESS ?= 127.0.0.1:9200 ENABLE_SSL ?= false ENABLE_GRAPH_SSL ?= false ENABLE_META_SSL ?= false From 1dc20eb3f1b974caa1f2cc249221e541051759b4 Mon Sep 17 00:00:00 2001 From: "hs.zhang" <22708345+cangfengzhs@users.noreply.github.com> Date: Fri, 6 Jan 2023 14:42:45 +0800 Subject: [PATCH 2/2] fix bug --- src/kvstore/listener/elasticsearch/ESListener.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kvstore/listener/elasticsearch/ESListener.cpp b/src/kvstore/listener/elasticsearch/ESListener.cpp index d1c1223e12d..66927c8c5da 100644 --- a/src/kvstore/listener/elasticsearch/ESListener.cpp +++ b/src/kvstore/listener/elasticsearch/ESListener.cpp @@ -128,6 +128,9 @@ void ESListener::pickTagAndEdgeData(BatchLogType type, } auto field = index.second.get_fields().front(); auto v = reader->getValueByName(field); + if (v.type() == Value::Type::NULLVALUE) { + continue; + } if (v.type() != Value::Type::STRING) { LOG(ERROR) << "Can't create fulltext index on type " << v.type(); }