Browse Source

add missing open_index import

main
crunk 4 months ago
parent
commit
9cecc2f30b
  1. 4
      verse/search/search_index.py

4
verse/search/search_index.py

@ -1,6 +1,6 @@
import os import os
from whoosh.fields import * from whoosh.fields import *
from whoosh.index import create_in from whoosh.index import create_in, open_dir
from whoosh.qparser import QueryParser from whoosh.qparser import QueryParser
from models.distribusi_model import Distribusis from models.distribusi_model import Distribusis
from models.distribusi_file_model import DistribusiFiles from models.distribusi_file_model import DistribusiFiles
@ -28,7 +28,7 @@ def init_search_index(APP):
@scheduler.task("interval", id="update", minutes=60) @scheduler.task("interval", id="update", minutes=60)
def update_search_index(): def update_search_index():
ix = index.open_dir(SEARCH_DATA_DIR) ix = open_dir(SEARCH_DATA_DIR)
update_writer = ix.writer() update_writer = ix.writer()
index_distribusis(APP, update_writer) index_distribusis(APP, update_writer)
index_distribusi_files(APP, update_writer) index_distribusi_files(APP, update_writer)

Loading…
Cancel
Save