Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Elasticsearch responses no longer return the 'ok' return value #28

Open
motorstreak opened this issue Aug 26, 2014 · 1 comment
Open

Comments

@motorstreak
Copy link

Noticed this issue when bulk updates were reported as failed despite completing successfully.
Reference: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/_return_values.html

Possible update required to Flex::Result::Bulk failed/successful methods (code below)

  def failed
    self['items'].reject{|i| i['index']['status'].between?(200,226) }
  end

  def successful
    self['items'].select{|i| i['index']['status'].between?(200,226) }
  end
@ddnexus
Copy link
Owner

ddnexus commented Aug 28, 2014

I see. If you tried that code and it works for both the legacy response and the new one, would you mind submitting a pull request? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants