feat: added index all routes function

This commit is contained in:
Shivam Mishra 2020-06-22 13:29:11 +05:30
parent a60a6fc04a
commit 19f42d1877
2 changed files with 6 additions and 2 deletions

View file

@ -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()

View file

@ -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()