Skip to content

Commit f236ede

Browse files
vanatteveldtclaude
andcommitted
Fix scroll() called with search-only kwargs (sort, etc.)
scroll() only accepts scroll_id and scroll timeout, not the full search kwargs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0c7ed9a commit f236ede

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/amcat4/projects/query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def query_documents(
171171
else:
172172
kwargs["sort"].append({k: dict(v)})
173173
if scroll_id:
174-
result = await es().scroll(scroll_id=scroll_id, **kwargs)
174+
result = await es().scroll(scroll_id=scroll_id, scroll=kwargs.get("scroll", "2m"))
175175
# TODO: check why we return None here instead of just an empty result
176176
if not result["hits"]["hits"]:
177177
return None

0 commit comments

Comments
 (0)