diff --git a/src/storage/v2/indices/indices.cpp b/src/storage/v2/indices/indices.cpp index ccf92ea30..d0ab7695f 100644 --- a/src/storage/v2/indices/indices.cpp +++ b/src/storage/v2/indices/indices.cpp @@ -41,16 +41,19 @@ void Indices::RemoveObsoleteEntries(uint64_t oldest_active_start_timestamp) cons void Indices::UpdateOnAddLabel(LabelId label, Vertex *vertex, const Transaction &tx) const { label_index_->UpdateOnAddLabel(label, vertex, tx); label_property_index_->UpdateOnAddLabel(label, vertex, tx); + text_index_->UpdateOnAddLabel(label, vertex, tx); } void Indices::UpdateOnRemoveLabel(LabelId label, Vertex *vertex, const Transaction &tx) const { label_index_->UpdateOnRemoveLabel(label, vertex, tx); label_property_index_->UpdateOnRemoveLabel(label, vertex, tx); + text_index_->UpdateOnRemoveLabel(label, vertex, tx); } void Indices::UpdateOnSetProperty(PropertyId property, const PropertyValue &value, Vertex *vertex, const Transaction &tx) const { label_property_index_->UpdateOnSetProperty(property, value, vertex, tx); + text_index_->UpdateOnSetProperty(property, value, vertex, tx); } Indices::Indices(const Config &config, StorageMode storage_mode) { diff --git a/src/storage/v2/indices/text_index.cpp b/src/storage/v2/indices/text_index.cpp index b1d2afce5..fa3eef575 100644 --- a/src/storage/v2/indices/text_index.cpp +++ b/src/storage/v2/indices/text_index.cpp @@ -17,12 +17,18 @@ namespace memgraph::storage { -void TextIndex::UpdateOnAddLabel(LabelId added_label, Vertex *vertex_after_update, const Transaction &tx) const {} +void TextIndex::UpdateOnAddLabel(LabelId added_label, Vertex *vertex_after_update, const Transaction &tx) const { + // Add node to this label's text index +} -void TextIndex::UpdateOnRemoveLabel(LabelId removed_label, Vertex *vertex_after_update, const Transaction &tx) const {} +void TextIndex::UpdateOnRemoveLabel(LabelId removed_label, Vertex *vertex_after_update, const Transaction &tx) const { + // Remove node from this label's text index +} void TextIndex::UpdateOnSetProperty(PropertyId property, const PropertyValue &value, Vertex *vertex, - const Transaction &tx) const {} + const Transaction &tx) const { + // Delete this node's document and re-add the it with the new value +} std::vector TextIndex::GetApplicableTextIndices(Vertex *vertex) { std::vector applicable_text_indices;