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