From 19f42d187759d75f4d04d4766353ef93e8057ff2 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 22 Jun 2020 13:29:11 +0530 Subject: [PATCH] feat: added index all routes function --- frappe/migrate.py | 4 ++-- frappe/modules/full_text_search.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frappe/migrate.py b/frappe/migrate.py index 544e0f6b6f..40c9bd4068 100644 --- a/frappe/migrate.py +++ b/frappe/migrate.py @@ -83,8 +83,8 @@ Otherwise, check the server logs and ensure that all the required services are r # add static pages to global search if not skip_search_index: - global_search.update_global_search_for_all_web_pages() - full_text_search.build_index_for_all_routes() + # global_search.update_global_search_for_all_web_pages() + full_text_search.build_index_for_all_routes("web_routes") # updating installed applications data frappe.get_single('Installed Applications').update_versions() diff --git a/frappe/modules/full_text_search.py b/frappe/modules/full_text_search.py index f626ea8490..b1003ecc97 100644 --- a/frappe/modules/full_text_search.py +++ b/frappe/modules/full_text_search.py @@ -222,3 +222,7 @@ def update_index_for_path(index_name, path): def remove_document_from_index(index_name, path): fts = FullTextSearch(index_name) return fts.remove_document_from_index(path) + +def build_index_for_all_routes(index_name): + fts = FullTextSearch(index_name) + return fts.build() \ No newline at end of file