elastic-rails 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0035b5db3d49f0a734e2f8a2d77162ac50867cc
4
- data.tar.gz: 0223a10c669b8f637b14c50afe88b73ef4714a17
3
+ metadata.gz: fe32a7a77a7e053e18632c534e4c21b85e97c458
4
+ data.tar.gz: 93f9a804abe3d625fa78d5cfad063d2de7b3f381
5
5
  SHA512:
6
- metadata.gz: f95a7f7abbaae72da092ec05cbfc2fc5cdec442438d48acbcfab152a716a84c0deb1f3e2e1ae60196a756608d73753203861f8337ccabd9a1353110f720fb19d
7
- data.tar.gz: 4f3fe1093d986f8fcda505c37623a5da5398a93bb0a407408c32863ffe33e14d161244617fa0b6247e4dfc1b946695d23931136ab9b9512d437e8db82aa28dfd
6
+ metadata.gz: ecf4e97ae1a82ebad07987ac54a717cc1127186786154e85d71dcdae89e341e4e360679c044cc62b9ab44c6406d33421c9878f05f02a47ebadfaf28260b91276
7
+ data.tar.gz: aca7470236c934518ff8187766c3d3b457bbd122a8a7d2f839e2a8f29560cb403783bc7013c38dbc5057043a59539f39cf52c931e2f0ecd71611352622a48b06
@@ -26,7 +26,8 @@ module Elastic::Nodes::Agg
26
26
  end
27
27
 
28
28
  def handle_result(_raw, _formatter)
29
- raw_value = _raw['hits'] ? _raw['hits']['hits'].first['_source'][@field.to_s] : nil
29
+ hit = _raw['hits']['hits'].first
30
+ raw_value = hit ? hit['_source'][@field.to_s] : nil
30
31
 
31
32
  # TODO: apply formatter to value
32
33
  Elastic::Results::Metric.new raw_value
@@ -1,3 +1,3 @@
1
1
  module Elastic
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elasticsearch