enabled ALWAYS tracking total hits to avoid 10000 cuts on data count in elastic client
This commit is contained in:
@@ -261,11 +261,10 @@ async def search(
|
||||
payload["sort"] = sort
|
||||
if aggs is not None:
|
||||
payload["aggs"] = aggs
|
||||
if track_total_hits:
|
||||
payload["track_total_hits"] = True
|
||||
if highlight is not None:
|
||||
payload["highlight"] = highlight
|
||||
|
||||
|
||||
payload["track_total_hits"] = True # always track total hits for accurate pagination and counts
|
||||
if len(payload) == 0:
|
||||
raise ValueError(
|
||||
"At least one of 'query', 'body', 'source', 'size', 'offset', 'sort', 'aggs' must be provided"
|
||||
|
||||
Reference in New Issue
Block a user