elasticsearch-persistence 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/elasticsearch-persistence.gemspec +1 -1
- data/lib/elasticsearch/persistence/model.rb +1 -0
- data/lib/elasticsearch/persistence/model/base.rb +6 -0
- data/lib/elasticsearch/persistence/version.rb +1 -1
- data/test/unit/model_gateway_test.rb +4 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa44968662509546e9ad4f6c0faad08a34ec95ad
|
4
|
+
data.tar.gz: f3402c6d0c02ad259dbc8a39d0afb1274aa73832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b3dfbf241cf54b1c67d96b5cc2bfdb79cb4ec315d04fd908f56b6ed3b40f32c6b3adc6c72091f42a9dd52dde8652782774783d31fc4537d5024af4a7176552
|
7
|
+
data.tar.gz: 0cb3163aa6afa15846d83e2b1abda34a4ace6bba011c4120a2482a0e8bbb6e86484e2b6d429e1a14cab758bb42c6fb8483668089171608192f440dfb2f2e9611
|
data/CHANGELOG.md
CHANGED
@@ -108,6 +108,7 @@ module Elasticsearch
|
|
108
108
|
object.instance_variable_set :@_index, document['_index']
|
109
109
|
object.instance_variable_set :@_type, document['_type']
|
110
110
|
object.instance_variable_set :@_version, document['_version']
|
111
|
+
object.instance_variable_set :@_source, document['_source']
|
111
112
|
|
112
113
|
# Store the "hit" information (highlighting, score, ...)
|
113
114
|
#
|
@@ -89,11 +89,13 @@ class Elasticsearch::Persistence::ModelGatewayTest < Test::Unit::TestCase
|
|
89
89
|
assert DummyGatewayModel.gateway.deserialize('_id' => 'abc123', '_source' => {}).instance_variable_get(:@persisted)
|
90
90
|
end
|
91
91
|
|
92
|
+
should "allow accessing the raw _source" do
|
93
|
+
assert_equal 'bar', DummyGatewayModel.gateway.deserialize('_source' => { 'foo' => 'bar' })._source['foo']
|
94
|
+
end
|
95
|
+
|
92
96
|
should "allow to access the raw hit from results as Hashie::Mash" do
|
93
97
|
assert_equal 0.42, DummyGatewayModel.gateway.deserialize('_score' => 0.42, '_source' => {}).hit._score
|
94
98
|
end
|
95
99
|
|
96
|
-
|
97
|
-
|
98
100
|
end
|
99
101
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-persistence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elasticsearch
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "<"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
117
|
+
version: '11.0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "<"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
124
|
+
version: '11.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: oj
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|