Skip to content

Commit

Permalink
abandon uppercase letters in fulltext name (#1286)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>

Co-authored-by: hs.zhang <22708345+cangfengzhs@users.noreply.github.com>
Co-authored-by: Sophie <84560950+Sophie-Xie@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 15, 2022
1 parent 77696ed commit 8d32f3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/graph/validator/MaintainValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@ Status CreateFTIndexValidator::validateImpl() {
if (name.substr(0, sizeof(FULLTEXT_INDEX_NAME_PREFIX) - 1) != FULLTEXT_INDEX_NAME_PREFIX) {
return Status::SyntaxError("Index name must begin with \"%s\"", FULLTEXT_INDEX_NAME_PREFIX);
}
bool containUpper = false;
for (auto c : name) {
containUpper |= std::isupper(c);
}
if (containUpper) {
return Status::SyntaxError("Fulltext index names cannot contain uppercase letters");
}
auto tsRet = FTIndexUtils::getTSClients(qctx_->getMetaClient());
NG_RETURN_IF_ERROR(tsRet);
auto tsIndex = FTIndexUtils::checkTSIndex(std::move(tsRet).value(), name);
Expand Down

0 comments on commit 8d32f3e

Please sign in to comment.