Skip to content

Commit

Permalink
remove truncate text before write into es (#4836)
Browse files Browse the repository at this point in the history
  • Loading branch information
cangfengzhs authored Nov 9, 2022
1 parent fa7f42b commit d9c4a6c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/common/plugin/fulltext/FTUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d9c4a6c

Please sign in to comment.