diff --git a/src/query/procedure/mg_procedure_impl.cpp b/src/query/procedure/mg_procedure_impl.cpp index 3c48bad39..48181213a 100644 --- a/src/query/procedure/mg_procedure_impl.cpp +++ b/src/query/procedure/mg_procedure_impl.cpp @@ -3375,8 +3375,8 @@ mgp_vertex *GetVertexByGid(mgp_graph *graph, memgraph::storage::Gid id, mgp_memo return nullptr; } -void WrapTextSearch(std::vector vertex_ids, std::string error_msg, mgp_graph *graph, - mgp_memory *memory, mgp_map **result) { +void WrapTextSearch(mgp_graph *graph, mgp_memory *memory, mgp_map **result, + const std::vector &vertex_ids = {}, const std::string &error_msg = "") { if (const auto err = mgp_map_make_empty(memory, result); err != mgp_error::MGP_ERROR_NO_ERROR) { throw std::logic_error("Retrieving text search results failed during creation of a mgp_map"); } @@ -3429,7 +3429,7 @@ mgp_error mgp_graph_search_text_index(mgp_graph *graph, const char *index_name, } catch (memgraph::query::QueryException &e) { error_msg = e.what(); } - WrapTextSearch(search_results, error_msg, graph, memory, result); + WrapTextSearch(graph, memory, result, search_results, error_msg); }); }