From 102bf1df5e2b83ebffd219509d804455881453ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ante=20Pu=C5=A1i=C4=87?= Date: Fri, 5 Jan 2024 13:32:45 +0100 Subject: [PATCH] Fix minor errors --- query_modules/text_search.cpp | 8 ++++++++ src/storage/v2/property_store.cpp | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/query_modules/text_search.cpp b/query_modules/text_search.cpp index 770a3aa9a..6c149ca6e 100644 --- a/query_modules/text_search.cpp +++ b/query_modules/text_search.cpp @@ -10,6 +10,8 @@ // licenses/APL.txt. #include +// #include "query/procedure/mg_procedure_impl.hpp" +#include "utils/memcxx.hpp" namespace TextSearch { constexpr std::string_view kProcedureSearch = "search"; @@ -29,9 +31,15 @@ void Search(mgp_list *args, mgp_graph *memgraph_graph, mgp_result *result, mgp_m // TODO antepusic: // 1. Match the label to the appropriate text index + // auto label_id = memgraph_graph->impl->NameToLabel(label); + // 2. Run text search of that index // * Add metadata to the return fields before search + + // text_index.search(label, search_string); + // 3. Get the graph elements from their IDs in the search results + // 4. Return records (one per element) } diff --git a/src/storage/v2/property_store.cpp b/src/storage/v2/property_store.cpp index e0196892c..e5763ab18 100644 --- a/src/storage/v2/property_store.cpp +++ b/src/storage/v2/property_store.cpp @@ -1364,20 +1364,21 @@ std::vector> PropertyStore: } template bool PropertyStore::DoInitProperties>( - const std::map &); + const std::map &, bool external = false, std::optional gid = std::nullopt); template bool PropertyStore::DoInitProperties>>( - const std::vector> &); + const std::vector> &, bool external = false, + std::optional gid = std::nullopt); bool PropertyStore::InitProperties(const std::map &properties, bool external, std::optional gid) { - return DoInitProperties(properties, external, node_id); + return DoInitProperties(properties, external, gid); } bool PropertyStore::InitProperties(std::vector> properties, bool external, std::optional gid) { std::sort(properties.begin(), properties.end()); - return DoInitProperties(properties, external, node_id); + return DoInitProperties(properties, external, gid); } bool PropertyStore::ClearProperties(bool external, std::optional gid) {