PoseBiz/stretcher — pull request #28 by cmaitchison (2013-06-05 13:41:33+00:00)
Title: Correctly pass through the 'fields' options when using the 'get' operation.

The spec, in this case, was not in fact correctly asserting that the fields operation had correctly pruned unnamed fields.

The API could have been implemented as :fields => ['a', 'b'] or :fields => 'a,b'.

I chose the latter, as it reflects the syntax of the HTTP request to elasticsearch, and the former would require a special translation somewhere to get it into the syntax of the latter by the time it got to the HTTP request anyway.

I guess this API decision is not a typical Ruby multi-value idiom, but the theme of this library is to err on the side of tightly mapping to the elasticsearch API, and it adds the least complexity to the code, so in my mind it makes sense.