add missing open_index import

This commit is contained in:
crunk 2024-07-11 19:46:20 +02:00
parent f71152cc78
commit 9cecc2f30b

View File

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