Skip to content

Commit

Permalink
cherry pick from nebula : fix bug (vesoft-inc#5607) (vesoft-inc#2859)
Browse files Browse the repository at this point in the history
fix bug (vesoft-inc#5607)

Co-authored-by: hs.zhang <22708345+cangfengzhs@users.noreply.github.com>
  • Loading branch information
Sophie-Xie and cangfengzhs authored Jun 21, 2023
1 parent 0ca947b commit 800aae0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,8 @@ Status MetaClient::handleResponse(const RESP& resp) {
return Status::Error("Related fulltext index exists, please drop it first");
case nebula::cpp2::ErrorCode::E_HOST_CAN_NOT_BE_ADDED:
return Status::Error("Could not add a host, which is not a storage and not expired either");
case nebula::cpp2::ErrorCode::E_ACCESS_ES_FAILURE:
return Status::Error("Access elasticsearch failed");
default:
return Status::Error("Unknown error %d!", static_cast<int>(resp.get_code()));
}
Expand Down
3 changes: 3 additions & 0 deletions src/graph/executor/query/FulltextIndexScanExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ StatusOr<plugin::ESQueryResult> FulltextIndexScanExecutor::accessFulltextIndex(
limit = std::numeric_limits<int32_t>::max();
}
int64_t count = limit - offset;
if (count == 0) {
return plugin::ESQueryResult();
}
execFunc = [=, &esAdapter]() { return esAdapter.queryString(index, query, offset, count); };
break;
}
Expand Down

0 comments on commit 800aae0

Please sign in to comment.