From 260221faaa8c4d35a4be86077c9b82b5a4aaa526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ante=20Pu=C5=A1i=C4=87?= Date: Sun, 18 Feb 2024 19:46:49 +0100 Subject: [PATCH] Simplify the text search module --- query_modules/text_search_module.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/query_modules/text_search_module.cpp b/query_modules/text_search_module.cpp index 56c266239..2f1a7249f 100644 --- a/query_modules/text_search_module.cpp +++ b/query_modules/text_search_module.cpp @@ -33,14 +33,6 @@ void TextSearch::Search(mgp_list *args, mgp_graph *memgraph_graph, mgp_result *r try { const auto *index_name = arguments[0].ValueString().data(); const auto *search_query = arguments[1].ValueString().data(); - - // 1. See if the given index_name is text-indexed - if (!mgp::graph_has_text_index(memgraph_graph, index_name)) { - record_factory.SetErrorMessage(fmt::format("Text index \"{}\" doesn’t exist.", index_name)); - return; - } - - // 2. Run a text search of that index and return the search results for (const auto &node : mgp::RunTextSearchQuery(memgraph_graph, index_name, search_query)) { auto record = record_factory.NewRecord(); record.Insert(TextSearch::kReturnNode.data(), node.ValueNode());