Fix the path for indices exists_type? method #461
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ElasticSearch version 5+ has a breaking change which means the endpoint for checking
exists_type?has changed from:HEAD index_name/type_nametoHEAD index_name/_mapping/type_name.Currently, the elasticsearch-ruby gem has not been updated to reflect this change and the result for us after upgrading is a
Elasticsearch::Transport::Transport::Errors::BadRequest [400]when usingclient.indices.exists_type?. As I am currently working on project with ES 5.5.3, I have targeted this PR at the5.xbranch but as the change exists in v6.0 too I presume it should also be fixed inmaster.