From d9c4a6cf1423615ab89a2fb80b2373c0b2523b4a Mon Sep 17 00:00:00 2001 From: "hs.zhang" <22708345+cangfengzhs@users.noreply.github.com> Date: Wed, 9 Nov 2022 10:36:43 +0800 Subject: [PATCH] remove truncate text before write into es (#4836) --- src/common/plugin/fulltext/FTUtils.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/common/plugin/fulltext/FTUtils.h b/src/common/plugin/fulltext/FTUtils.h index 81c5b0cadef..901d37427e5 100644 --- a/src/common/plugin/fulltext/FTUtils.h +++ b/src/common/plugin/fulltext/FTUtils.h @@ -145,15 +145,7 @@ struct DocIDTraits { } static std::string val(const std::string& v) { - if (v.size() <= MAX_INDEX_TYPE_LENGTH) { - return v; - } - size_t len = MAX_INDEX_TYPE_LENGTH; - const int utf8Mask = 1 << 7; // 10000000 - while (len < v.size() && (v[len - 1] & utf8Mask)) { - len++; - } - return v.substr(0, len); + return v; } static std::string normalizedJson(const std::string& v) {