Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable scrolling in search API endpoint #3334

Open
berggren opened this issue Mar 11, 2025 · 0 comments · May be fixed by #3341
Open

Enable scrolling in search API endpoint #3334

berggren opened this issue Mar 11, 2025 · 0 comments · May be fixed by #3341

Comments

@berggren
Copy link
Contributor

There is no way to fetch scrolled results from the API. You can set scrolling=True but you cannot pass in the scroll_id which make it impossible to build client side streaming.

https://github.com/google/timesketch/blob/cc9032059c0f58bd548400c711e2695f1e0906c1/timesketch/lib/datastores/opensearch.py#L634C9-L634C22

Adding something like:

        if enable_scroll:
            scroll_id = result["_scroll_id"]
            scroll_size = result["hits"]["total"]
        else:
            scroll_id = None
            scroll_size = 0

        return self.client.scroll(scroll_id=scroll_id, scroll="5m")

dark-eternal-05 added a commit to dark-eternal-05/timesketch that referenced this issue Mar 13, 2025
Attempt to solve following Bug

Enable scrolling in search API endpoint google#3334
@dark-eternal-05 dark-eternal-05 linked a pull request Mar 13, 2025 that will close this issue
@jkppr jkppr linked a pull request Mar 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant