|
|
@ -9,6 +9,7 @@ import flask_apscheduler |
|
|
|
SCRIPT_DIR = os.path.dirname(__file__) |
|
|
|
SEARCH_DATA_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, "searchdata")) |
|
|
|
|
|
|
|
|
|
|
|
def init_search_index(APP): |
|
|
|
scheduler = flask_apscheduler.APScheduler() |
|
|
|
scheduler.api_enabled = False |
|
|
@ -31,7 +32,11 @@ def index_distribusis(APP): |
|
|
|
writer = ix.writer() |
|
|
|
distribusis = _visible_distribusis(APP) |
|
|
|
for distribusi in distribusis: |
|
|
|
writer.add_document(title=distribusi.distribusiname, path="/a", content=distribusi.description) |
|
|
|
writer.add_document( |
|
|
|
title=distribusi.distribusiname, |
|
|
|
path="/a", |
|
|
|
content=distribusi.description, |
|
|
|
) |
|
|
|
writer.commit() |
|
|
|
|
|
|
|
|
|
|
|