From 9cecc2f30bfc1ebb59970415dbc95a9e5b9cfd55 Mon Sep 17 00:00:00 2001 From: crunk Date: Thu, 11 Jul 2024 19:46:20 +0200 Subject: [PATCH] add missing open_index import --- verse/search/search_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/verse/search/search_index.py b/verse/search/search_index.py index e27bd4c..7ab4efe 100644 --- a/verse/search/search_index.py +++ b/verse/search/search_index.py @@ -1,6 +1,6 @@ import os from whoosh.fields import * -from whoosh.index import create_in +from whoosh.index import create_in, open_dir from whoosh.qparser import QueryParser from models.distribusi_model import Distribusis from models.distribusi_file_model import DistribusiFiles @@ -28,7 +28,7 @@ def init_search_index(APP): @scheduler.task("interval", id="update", minutes=60) def update_search_index(): - ix = index.open_dir(SEARCH_DATA_DIR) + ix = open_dir(SEARCH_DATA_DIR) update_writer = ix.writer() index_distribusis(APP, update_writer) index_distribusi_files(APP, update_writer)