-
Notifications
You must be signed in to change notification settings - Fork 737
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
setRefresh #1475
Comments
Definitively, we should support the above params. Do you want to open a PR with the change? |
ruflin
pushed a commit
that referenced
this issue
Aug 10, 2020
Ref #1475 Currently, `AbstractUpdateAction::setRefresh` only accepts boolean values: - `true` - to perform an immediate refresh - `false` - to not refresh at all The [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html), however, strongly suggests the usage of `wait_for` option to ensure a good cluster performance while doing the refresh operation. But the problem is that `wait_for` is of type `string`; thus, we cannot pass it as an argument to the method. This modifies `AbstractUpdateAction::setRefresh` so that arguments of type `string` such as `wait_for` can also be passed to the method. Additionally, the return type of its getter counterpart, `AbstractUpdateAction::getRefresh`, has also been modified to mirror the accepted types of the setter.
Closing as #1791 got merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found you are accepting Bool only on refresh at lib/Elastica/AbstractUpdateAction.php #L328
While it should be
Empty string or true
Refresh the relevant primary and replica shards (not the whole index) immediately after the operation occurs, so that the updated document appears in search results immediately. This should ONLY be done after careful thought and verification that it does not lead to poor performance, both from an indexing and a search standpoint.
wait_for
Wait for the changes made by the request to be made visible by a refresh before replying. This doesn’t force an immediate refresh, rather, it waits for a refresh to happen. Elasticsearch automatically refreshes shards that have changed every index.refresh_interval which defaults to one second. That setting is dynamic. Calling the Refresh API or setting refresh to true on any of the APIs that support it will also cause a refresh, in turn causing already running requests with refresh=wait_for to return.
false (the default)
Take no refresh related actions. The changes made by this request will be made visible at some point after the request returns.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html
The text was updated successfully, but these errors were encountered: