Skip to content

Commit

Permalink
fix(elasticsearch): Remove size parameter from auxiliary queries
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Nov 18, 2024
1 parent 1f1fbc8 commit 1d5df53
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cl/lib/elasticsearch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3216,19 +3216,13 @@ def do_es_sweep_alert_query(
multi_search = multi_search.add(main_query)
if parent_query:
parent_search = search_query.query(parent_query)
parent_search = parent_search.extra(
from_=0, size=settings.SCHEDULED_ALERT_HITS_LIMIT
)
parent_search = parent_search.extra(from_=0)
parent_search = parent_search.source(includes=["docket_id"])
multi_search = multi_search.add(parent_search)

if child_query:
child_search = child_search_query.query(child_query)
child_search = child_search.extra(
from_=0,
size=settings.SCHEDULED_ALERT_HITS_LIMIT
* settings.RECAP_CHILD_HITS_PER_RESULT,
)
child_search = child_search.extra(from_=0)
child_search = child_search.source(includes=["id"])
multi_search = multi_search.add(child_search)

Expand Down

0 comments on commit 1d5df53

Please sign in to comment.