Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions complaint_search/es_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ def search(agg_exclude=None, **kwargs):
if hit_total and hit_total > user_batch_size:
# We have more than one page of results and need pagination
pagination_body = copy.deepcopy(body)

# When determining break points, we don't need to recompute
# aggregations, re-highlight, or return result source.
pagination_body.pop("aggs", None)
pagination_body.pop("highlight", None)
pagination_body["_source"] = False
pagination_body["track_total_hits"] = False

# cleaner to get page from frontend, but 'frm' works for now
page = params.get("frm", user_batch_size) / user_batch_size
pagination_body["size"] = get_pagination_query_size(
Expand Down
Loading