Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed `Index.retrieve` so that it works with ES 1.0.0 and previous ve…

…rsions

Closes #939
  • Loading branch information...
commit 7289d0fbd28fb8d6219fa3b2ef05a8ac9bcdc9e7 1 parent 3805ff0
Jon Stokes authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tire/index.rb
View
2  lib/tire/index.rb
@@ -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)

1 comment on commit 7289d0f

@metaskills

Can you release 0.6.3 with this?

Please sign in to comment.
Something went wrong with that request. Please try again.