-
Notifications
You must be signed in to change notification settings - Fork 24
ElasticSearch refresh parameter unused? #315
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
Comments
Hi @ccancellieri did you ever think of a good solution for this? |
4 tasks
In this pr, refresh can be passed via kwargs, or set globally for all transaction methods #370 |
jonhealy1
added a commit
that referenced
this issue
May 10, 2025
… kwargs (#370) **Related Issue(s):** - #315 **Description:** - Introduced the `DATABASE_REFRESH` environment variable to control whether database operations refresh the index immediately after changes. If set to `true`, changes will be immediately searchable. If set to `false`, changes may not be immediately visible but can improve performance for bulk operations. If set to `wait_for`, changes will wait for the next refresh cycle to become visible. - Refactored CRUD methods in `TransactionsClient` to use the `_resolve_refresh` helper method for consistent and reusable handling of the `refresh` parameter. - Fixed an issue where some routes were not passing the `refresh` parameter from `kwargs` to the database logic, ensuring consistent behavior across all CRUD operations. **PR Checklist:** - [x] Code is formatted and linted (run `pre-commit run --all-files`) - [x] Tests pass (run `make test`) - [x] Documentation has been updated to reflect changes, if applicable - [x] Changes are added to the changelog
reopen if needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The pagination does not work properly after massive items upload over ElasticSearch as the number of items should still be calculated by ES (probably).
After a while the number is correct and the pagination starts to work.
I noticed that in the driver we have the support for the refresh parameter correctly exposed but it is never used by the stac-api as it is an abstraction layer while 'refresh' is something specific for ElasticSearch:
F.e.:
But from the stac-api refresh is never passed. Am I wrong?
Should we hardcode 'wait_for' or at least use the kwargs in some way?
The text was updated successfully, but these errors were encountered: