Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

esmarkowski
Copy link

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

elastic/elasticsearch#4542

@karmi
Copy link
Owner

karmi commented Mar 31, 2014

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.

@@ -129,6 +129,9 @@ def __update_attributes(attributes)
# instances and automatically convert UTC formatted strings to Time.
#
def __cast_value(name, value)
default = self.class.property_defaults[name.to_sym]
# elasticsearch v1 returns field data wrapped in an array
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Elasticsearch 1.x

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add the link to elastic/elasticsearch#4542 as well?

karmi referenced this pull request Mar 31, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants