summaryrefslogtreecommitdiff
path: root/web.py
diff options
context:
space:
mode:
Diffstat (limited to 'web.py')
-rw-r--r--web.py2
1 files changed, 2 insertions, 0 deletions
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/<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")