Fix text index logic on label removal
This commit is contained in:
parent
e9aaf82985
commit
743f7b343a
@ -576,6 +576,10 @@ class DbAccessor final {
|
||||
|
||||
void TextIndexUpdateVertex(VertexAccessor *vertex) { accessor_->TextIndexUpdateVertex(&vertex->impl_); }
|
||||
|
||||
void TextIndexUpdateVertex(VertexAccessor *vertex, std::vector<storage::LabelId> removed_labels) {
|
||||
accessor_->TextIndexUpdateVertex(&vertex->impl_, removed_labels);
|
||||
}
|
||||
|
||||
std::vector<storage::Gid> TextIndexSearch(std::string index_name, std::string search_query) const {
|
||||
return accessor_->TextIndexSearch(index_name, search_query);
|
||||
}
|
||||
|
@ -3304,7 +3304,7 @@ bool RemoveLabels::RemoveLabelsCursor::Pull(Frame &frame, ExecutionContext &cont
|
||||
}
|
||||
|
||||
if (flags::run_time::GetTextSearchEnabled()) {
|
||||
context.db_accessor->TextIndexUpdateVertex(&vertex);
|
||||
context.db_accessor->TextIndexUpdateVertex(&vertex, self_.labels_);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -239,6 +239,10 @@ class Storage {
|
||||
storage_->indices_.text_index_->UpdateNode(vertex->vertex_, storage_, storage_->timestamp_);
|
||||
}
|
||||
|
||||
void TextIndexUpdateVertex(VertexAccessor *vertex, std::vector<LabelId> removed_labels) {
|
||||
storage_->indices_.text_index_->UpdateNode(vertex->vertex_, storage_, storage_->timestamp_, removed_labels);
|
||||
}
|
||||
|
||||
std::vector<Gid> TextIndexSearch(std::string index_name, std::string search_query) const {
|
||||
return storage_->indices_.text_index_->Search(index_name, search_query);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user