diff options
author | yvesf <yvesf-git@xapek.org> | 2010-11-21 13:00:01 +0100 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2010-11-21 13:00:01 +0100 |
commit | 1c34f8b6824b38c5a2698bbbd27a7aa7df51da9c (patch) | |
tree | 51a8a3f3278862fbe8cb3932d74a2941aae1bf84 /web.py | |
parent | 7385d9f5ba2cba49db24ee9c874f08fff641cb20 (diff) | |
download | booksearch-1c34f8b6824b38c5a2698bbbd27a7aa7df51da9c.tar.gz booksearch-1c34f8b6824b38c5a2698bbbd27a7aa7df51da9c.zip |
save
Diffstat (limited to 'web.py')
-rw-r--r-- | web.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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() |