From 513212520d6e79db8b3041103c917790efaa3fad Mon Sep 17 00:00:00 2001 From: "hs.zhang" <22708345+cangfengzhs@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:44:56 +0800 Subject: [PATCH] fix bug (#5214) * fix bug * fix bug Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> --- src/kvstore/listener/elasticsearch/ESListener.cpp | 6 ++++++ tests/Makefile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kvstore/listener/elasticsearch/ESListener.cpp b/src/kvstore/listener/elasticsearch/ESListener.cpp index cdc4fe5205d..66927c8c5da 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(); } @@ -125,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(); } 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