summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorFábio Pio <fpio@thoughtworks.com>2014-12-17 17:18:54 -0200
committerFábio Pio <fpio@thoughtworks.com>2014-12-17 17:21:52 -0200
commit129800847138e802040d4ad53adc06b9776ac1c6 (patch)
tree0ac419a91e4b9a71c3fabafc82f59d00343e4d4e /service/pixelated
parent8d71694e252aa517a696403327dae594b43744c0 (diff)
Fix issue #200 search works with base63 bodies
Now the search works with the decoded body too, instead of only with the raw mail
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/adapter/search.py b/service/pixelated/adapter/search.py
index d1e43735..3d71bab7 100644
--- a/service/pixelated/adapter/search.py
+++ b/service/pixelated/adapter/search.py
@@ -22,6 +22,7 @@ from pixelated.support.functional import flatten
from whoosh.index import FileIndex
from whoosh.fields import *
from whoosh.qparser import QueryParser
+from whoosh.qparser import MultifieldParser
from whoosh.query import Term
from whoosh import sorting
from pixelated.support.functional import unique
@@ -175,7 +176,7 @@ class SearchEngine(object):
.replace('-in:', 'AND NOT tag:')
.replace('in:all', '*')
)
- return QueryParser('raw', self._index.schema).parse(query)
+ return MultifieldParser(['raw', 'body'], self._index.schema).parse(query)
def remove_from_index(self, mail_id):
writer = self._index.writer()