Commit 50505c463250ae3a6ed47e3388ed154c7067c1b4
1 parent
74c758d2
Exists in
master
and in
21 other branches
Lock version of elasticsearch-ruby client to support 0.90 and 1.0 - fixes huge i…
…ssues w/ zero-downtime reindexing on 0.90 and elasticsearch-ruby 1.0
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
lib/searchkick/index.rb
@@ -50,11 +50,11 @@ module Searchkick | @@ -50,11 +50,11 @@ module Searchkick | ||
50 | end | 50 | end |
51 | 51 | ||
52 | def retrieve(document_type, id) | 52 | def retrieve(document_type, id) |
53 | - client.get_source( | 53 | + client.get( |
54 | index: name, | 54 | index: name, |
55 | type: document_type, | 55 | type: document_type, |
56 | id: id | 56 | id: id |
57 | - ) | 57 | + )["_source"] |
58 | end | 58 | end |
59 | 59 | ||
60 | protected | 60 | protected |
searchkick.gemspec
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec| | @@ -19,7 +19,7 @@ Gem::Specification.new do |spec| | ||
19 | spec.require_paths = ["lib"] | 19 | spec.require_paths = ["lib"] |
20 | 20 | ||
21 | spec.add_dependency "activemodel" | 21 | spec.add_dependency "activemodel" |
22 | - spec.add_dependency "elasticsearch" | 22 | + spec.add_dependency "elasticsearch", "~> 0.4.11" |
23 | spec.add_dependency "patron" # persistent http connections for performance | 23 | spec.add_dependency "patron" # persistent http connections for performance |
24 | spec.add_dependency "hashie" | 24 | spec.add_dependency "hashie" |
25 | 25 |