diff options
author | yvesf <yvesf-git@xapek.org> | 2010-11-24 23:20:03 +0100 |
---|---|---|
committer | yvesf <yvesf-git@xapek.org> | 2010-11-24 23:20:03 +0100 |
commit | 257b0de2bd39a1dfb69a19468f3bc5d0d03bb0ae (patch) | |
tree | 8f08f8fc504a10ca9c9c3c5a3e6f90ef515ecfcd /web.py | |
parent | 0b2d108aa2dba77f9221245a3f763d0244c79702 (diff) | |
download | booksearch-257b0de2bd39a1dfb69a19468f3bc5d0d03bb0ae.tar.gz booksearch-257b0de2bd39a1dfb69a19468f3bc5d0d03bb0ae.zip |
lowercase term
Diffstat (limited to 'web.py')
-rw-r--r-- | web.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -103,6 +103,7 @@ class MyHtmlFormatter(highlight.HtmlFormatter): @app.route("/excerpt/<int:docnum>/<path:term>", methods=["GET"]) def do_excerpt(docnum, term): + term = term.lower() with index_book.reader() as reader: document = reader.stored_fields(docnum) q = QueryParser("content").parse(term) @@ -122,6 +123,7 @@ def do_search(term=None): if not term: return flask.render_template('search.html', objects=[], term="") + term = term.lower() searcher = index_book.searcher() query = QueryParser("content").parse(term) facets = searching.Facets.from_field(searcher, "path") |