-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
delete_by_query alternatives? #307
Comments
As mentioned (here)[https://www.elastic.co/guide/en/elasticsearch/reference/1.7/docs-delete-by-query.html] you can use the scan/scroll API to find the matching IDs and use the BULK API to delete all those documents in bulk. The simplest example would be to use the |
I understand that, but was wondering if elasticsearch-py had considered leaving the delete_by_query call (for those that installed the plugin). Offering a plugin, yet removing the SDK support is counter-intuitive. |
There are several ways to call and API that is not supported by the raw client. First is to manually call the underlying es = Elasticsearch() You will still get most of the benefits of the library:
Alternatively you can write a plugin for the client itself, you can have a look at https://github.com/elastic/elasticsearch-watcher-py to see how that'd look. Hope this helps |
This API has been removed. In the official plugin we don't intend to support all available plugins. For now you can use the transport directly as mentioned above or we might create a set of python plugins in the future following the pattern in Please let me know if this is an acceptable solution for you, thanks! |
Is it me, or did the API come back in ES 5.0 ? Also, this function is still mentionned in the documentation, even thought it is not existing in the actual code. |
Delete by query is present in the code released as |
Indeed, I was still using the version 2.x of the library, thanks :) |
Now that delete_by_query has been removed from ES 2.x and only available as a plugin, what are the alternatives within the py lib for calling that API when the plugin is actually installed? Is the idea that it won't be supported at all in the py lib?
The text was updated successfully, but these errors were encountered: