This repository has been archived by the owner on Jun 30, 2018. It is now read-only.
Index should bulk store to its own URL endpoint (fixes #327) #328
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.
The
Index#bulk_import
method (index.rb:123), and other index methods, interact with the Cluster URL rather than their own Index URL endpoint.This pull request refactors the index URL endpoint into the
Index#url
getter method, refactors a number of methods to use this new getter for clarity, and changes thebulk_import
method to use this index-level endpoint rather than the cluster-level URL endpoint.Also updated/refactored test expectations accordingly.
This fixes issues (e.g., #327) for users trying to configure Tire to use a single application index and who do not have access to cluster-level methods like
/_bulk
in production.If anyone following along wants to test, try this in your
Gemfile
: