karmi / retire

A rich Ruby API and DSL for the Elasticsearch search engine
http://karmi.github.com/retire/
MIT License
1.86k stars 533 forks source link

Cast field data that is wrapped in an array from elasticsearch v1 #947

Open esmarkowski opened 10 years ago

esmarkowski commented 10 years ago

Elasticsearch v1 returns field values as an array when using fields option.

https://github.com/elasticsearch/elasticsearch/issues/4542

karmi commented 10 years ago

Hi Spencer, I guess it makes sense to make this change (although the change in Elasticsearch is correct). So, what about:

  1. Squashing the commits into a single one,
  2. Adding a unit test for the behaviour.