From 5437e820cbd662fd4ff16e1942e18caad5f23233 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Thu, 16 Dec 2021 18:12:44 +0100 Subject: matching: we do not need exact match counts up to 100 or even will be ok; see also: https://www.elastic.co/guide/en/elasticsearch/reference/7.16/search-your-data.html#track-total-hits --- fuzzycat/matching.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fuzzycat/matching.py') diff --git a/fuzzycat/matching.py b/fuzzycat/matching.py index 0d87e10..7ba58c9 100644 --- a/fuzzycat/matching.py +++ b/fuzzycat/matching.py @@ -153,7 +153,7 @@ class FuzzyReleaseMatcher: body={ "query": query, "size": self.size, - "track_total_hits": True + "track_total_hits": 100, }) if es_compat_hits_total(resp) == 0: return result @@ -199,7 +199,7 @@ class FuzzyReleaseMatcher: body={ "query": query, "size": self.size, - "track_total_hits": True + "track_total_hits": 100, }) if es_compat_hits_total(resp) == 0: return result @@ -243,7 +243,7 @@ class FuzzyReleaseMatcher: body={ "query": query, "size": self.size, - "track_total_hits": True + "track_total_hits": 100, }) if es_compat_hits_total(resp) == 0: return result @@ -289,7 +289,7 @@ class FuzzyReleaseMatcher: body={ "query": query, "size": self.size, - "track_total_hits": True + "track_total_hits": 100, }) if es_compat_hits_total(resp) == 0: return result -- cgit v1.2.3