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

Commit

Permalink
Fixed Index.retrieve so that it works with ES 1.0.0 and previous ve…
Browse files Browse the repository at this point in the history
…rsions

Closes #939
  • Loading branch information
Jon Stokes authored and karmi committed Feb 22, 2014
1 parent 3805ff0 commit 7289d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tire/index.rb
Expand Up @@ -364,7 +364,7 @@ def retrieve(type, id, options={})
wrapper = options[:wrapper] || Configuration.wrapper
if wrapper == Hash then h
else
return nil if h['exists'] == false
return nil if (h['exists'] || h['found']) == false
document = h['_source'] || h['fields'] || {}
document.update('id' => h['_id'], '_type' => h['_type'], '_index' => h['_index'], '_version' => h['_version'])
wrapper.new(document)
Expand Down

1 comment on commit 7289d0f

@metaskills
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you release 0.6.3 with this?

Please sign in to comment.