summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-11-20 18:09:25 -0200
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-11-20 18:21:31 -0200
commiteae1c25b3fdf48f234cbc83dc0667c66a2239b44 (patch)
tree6f7513c8e4f66eecb0348718e10e371a65c04879 /service
parent2e14cb77127ed9fe466b3bc47383a6e8c803786c (diff)
Issue #526 - Changed way that we use whoosh
Now we are captilizing string for don't miss name that starts with an uppercase letter
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/adapter/search/contacts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/adapter/search/contacts.py b/service/pixelated/adapter/search/contacts.py
index d981e0bb..f1ea2575 100644
--- a/service/pixelated/adapter/search/contacts.py
+++ b/service/pixelated/adapter/search/contacts.py
@@ -44,9 +44,10 @@ def search_addresses(searcher, query):
results = []
for field in ['to', 'cc', 'bcc', 'sender']:
query_parser = QueryParser(field, searcher.schema)
+ query_parsed = query_parser.parse("*%s* OR *%s*" % (query.title(), query))
results.append(
searcher.search(
- query_parser.parse("*%s*" % query),
+ query_parsed,
limit=None,
mask=restrict_q,
groupedby=sorting.FieldFacet(