summaryrefslogtreecommitdiff
path: root/web.py
diff options
context:
space:
mode:
Diffstat (limited to 'web.py')
-rw-r--r--web.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/web.py b/web.py
index 38a7dbb..577e56f 100644
--- a/web.py
+++ b/web.py
@@ -16,8 +16,8 @@ import werkzeug
app = flask.Flask("booksearch")
-index = open_dir(u"index", mapped=False)
-searcher = index.searcher()
+index_book = open_dir(u"index", u"book")
+index_metadata = open_dir(u"index", u"metadata")
@app.route("/")
def do_index():
@@ -89,8 +89,6 @@ def do_search(skip=0,term=None):
for key, value in facets.categorize(results).items():
categories[key] = map(lambda v: v[0], value)
- print searcher.key_terms(categories[categories.keys()[0]], "content")
-
return flask.jsonify(categories)
"""
terms = [text for fieldname, text in query.all_terms()