mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Lookup search lowercases the term again; whoops. #15
This commit is contained in:
parent
8b3614a3c8
commit
20d40364b1
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ def lookup(session, name, exact_only=False):
|
||||||
# Look for exact name. A Term object does an exact match, so we don't have
|
# Look for exact name. A Term object does an exact match, so we don't have
|
||||||
# to worry about a query parser tripping on weird characters in the input
|
# to worry about a query parser tripping on weird characters in the input
|
||||||
searcher = index.searcher()
|
searcher = index.searcher()
|
||||||
query = whoosh.query.Term('name', name)
|
query = whoosh.query.Term('name', name.lower())
|
||||||
results = searcher.search(query)
|
results = searcher.search(query)
|
||||||
|
|
||||||
if not exact_only:
|
if not exact_only:
|
||||||
|
|
Loading…
Reference in a new issue