karmi/tire — pull request #328 by nz (2012-04-30 21:40:09+00:00)
Title: Index should bulk store to its own URL endpoint (fixes #327)

The `Index#bulk_import` method ([index.rb:123](https://github.com/karmi/tire/blob/master/lib/tire/index.rb#L123)), 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 the `bulk_import` method to use this index-level endpoint rather than the cluster-level URL endpoint.

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.