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
mlissner authored and ERosendo committed Nov 18, 2024
2 parents 5eb6c7f + 4d2090c commit 4a8d2be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ IA_SECRET_KEY=""
FTM_KEY=""

# CL API key for cloning data
CL_API_KEY=""
CL_API_TOKEN=""
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 4a8d2be

Please sign in to comment.