From 257b0de2bd39a1dfb69a19468f3bc5d0d03bb0ae Mon Sep 17 00:00:00 2001 From: yvesf Date: Wed, 24 Nov 2010 23:20:03 +0100 Subject: lowercase term --- web.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web.py b/web.py index ed46d06..b675c2c 100644 --- a/web.py +++ b/web.py @@ -103,6 +103,7 @@ class MyHtmlFormatter(highlight.HtmlFormatter): @app.route("/excerpt//", 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") -- cgit v1.2.1