diff options
-rw-r--r-- | service/pixelated/adapter/search/contacts.py | 3 |
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( |