rhec/pyelasticsearch — pull request #23 by erikrose (2012-08-31 06:35:25+00:00)
Title: Add open_index, close_index

Here are a couple methods I needed that weren't there yet. And a hello:

Thanks for this project! I've been using ES for a couple of years now—at Mozilla and now at Votizen, and I helped put together elasticutils, a higher-level ES lib. In my current project, something lower-level is called for, but I find neither pyelasticsearch nor pyes 100% suitable. However, pyelasticsearch has the important advantage of not driving me crazy when I try to hack on it. :-) So here we are.

There are a lot of (what I consider) improvements to pyelasticsearch I'd like to make, and I'd value your feedback beforehand so I know whether to run off on my own or try to work them into pyelasticsearch:

* I wonder what the origin of the ``quiet`` kwargs is. It seems strange for the default behavior to be basically swallowing errors. Does someone find it more convenient to check the contents of the returned dicts than to catch exceptions?
* Relatedly, I'd like to make the exceptions made finer-grained so there are, for example, different ones for a programming error like bad JSON and for an environmental error like a failed connection. They could all subclass ElasticSearchError for backward compatibility.
* I'd like to stop calling ES in most of the tests. It'd be a better test to see if the request output is correct rather than, as many cases do now, just seeing whether ES acknowledged the command.
* I'd like to add the update_settings call (nearly done).
* I'd like to add the ability to target connections at any of a list of ES nodes, like in pyes. We have a decent-sized cluster, and targeting just a single URL either means we need a fancy load balancer in front of it or we sacrifice the high availability advantage of a cluster.

To a first order, are these the sorts of directions you're interested in?

Thanks again!