diff options
author | Bruno Wagner <bwagner@thoughtworks.com> | 2014-10-16 14:18:52 +0200 |
---|---|---|
committer | Bruno Wagner <bwagner@thoughtworks.com> | 2014-10-16 14:18:52 +0200 |
commit | bc237b646dccf490cbd97c45d0173dde8d3ae988 (patch) | |
tree | f66701e7afec7f7962b734cf3f9d92891e4c5c04 /service/pixelated | |
parent | e41fba96f1bfb94f079ba5b304ce5331cec39909 (diff) |
Pagination was breaking new mail indexing, because it doesn't use pages
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/search.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/service/pixelated/adapter/search.py b/service/pixelated/adapter/search.py index 6b579d87..eef97c56 100644 --- a/service/pixelated/adapter/search.py +++ b/service/pixelated/adapter/search.py @@ -116,9 +116,9 @@ class SearchEngine(object): results = searcher.search(query, **options) return results - def search(self, query, window, page): - page = int(page) if (page is not None and int(page) > 0) else 1 - window = int(window) or 25 + def search(self, query, window=25, page=1): + page = int(page) if int(page) > 1 else 1 + window = int(window) query = query.replace('\"', '') query = query.replace('-in:', 'AND NOT tag:') |