track results up to 200

This commit is contained in:
Victor Shyba 2021-03-08 23:33:57 -03:00
parent f26394fd3b
commit 891b1e7782

View file

@ -220,7 +220,7 @@ class SearchIndex:
if cache_item.result: if cache_item.result:
result = json.loads(zlib.decompress(cache_item.result)) result = json.loads(zlib.decompress(cache_item.result))
else: else:
result = await self.client.search(expand_query(**kwargs), index=self.index) result = await self.client.search(expand_query(**kwargs), index=self.index, track_total_hits=200)
cache_item.result = zlib.compress(json.dumps(result).encode(), 1) cache_item.result = zlib.compress(json.dumps(result).encode(), 1)
except NotFoundError: except NotFoundError:
# index has no docs, fixme: log something # index has no docs, fixme: log something