diff options
-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") |