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

Delete by query is not working with HTTP (wrong url?) #248

Closed
heeboA opened this issue Jan 24, 2017 · 3 comments
Closed

Delete by query is not working with HTTP (wrong url?) #248

heeboA opened this issue Jan 24, 2017 · 3 comments

Comments

@heeboA
Copy link

heeboA commented Jan 24, 2017

The delete by query function doesn't seem to work.

What I have in my code:
(esd/delete-by-query conn index type {:range {:timestamp {:lte max-timestamp}}})

Returns:
{:found false, :_index "x", :_type "x", :_id "_query", :_version 1, :result "not_found", :_shards {:total 2, :successful 1, :failed 0}}

If I use the same exact same query with "search", it finds the documents. I believe this is due to the fact that delete by query sends a DELETE to http://127.0.0.1:9200/x/x/_query with query as the request body param, while the Elastic docs suggest that the correct method is a POST to http://127.0.0.1:9200/x/x/_delete_by_query with the same body.

@heeboA heeboA changed the title Delete by query it not working with HTTP (wrong url?) Delete by query is not working with HTTP (wrong url?) Jan 24, 2017
@michaelklishin
Copy link
Member

@heeboA if this can be reproduced with ElasticSearch 2.x or 3.x, feel free to submit a pull request (with a test, please). Otherwise it's a 5.0 issue and 5.0 compatibility will be addressed after a 3.x-compatible GA release. There's an issue for that.

@joachimdb
Copy link
Contributor

delete-by-query is not supported anymore by elasticsearch >= 2.0 unless an extension is installed, see https://www.elastic.co/guide/en/elasticsearch/plugins/2.0/delete-by-query-plugin-reason.html

@michaelklishin
Copy link
Member

@joachimdb thank you. Perhaps we should delete the function then? Or just update the docs for Elastisch 3.0 and remove in a later release?

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

No branches or pull requests

3 participants