Skip to content

Commit

Permalink
comment to explain the top_domains aggregation in overview
Browse files Browse the repository at this point in the history
  • Loading branch information
Paige Gulley committed Jul 26, 2024
1 parent fafa04f commit 3dbaef0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ def aggregator_query(

# Only return the total and matches if explicitly requested
if "overview" in options:
# We use a sum of the top_domains to supplement the total, as elasticsearch has a hard limit
# of 10,000 results per page in a source query, but aggregators can go around this.
#
if QueryBuilder.Aggregators.TOP_DOMAINS not in aggs:
raise HTTPException(
status_code=500,
Expand Down

0 comments on commit 3dbaef0

Please sign in to comment.