adapter-elasticsearch 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -4,6 +4,10 @@ ElasticSearch adapter for adapter gem.
4
4
 
5
5
  See examples/ or specs/ for usage.
6
6
 
7
+ ## ToDo
8
+
9
+ * add spec for :parent option
10
+
7
11
  ## Note on Patches/Pull Requests
8
12
 
9
13
  * Fork the project.
@@ -11,7 +11,11 @@ module Adapter
11
11
  end
12
12
 
13
13
  def write(key, value)
14
- client.add(@options[:type], key_for(key), encode(value))
14
+ options = {}
15
+ if @options.key?(:parent) && value.is_a?(Hash)
16
+ options[:parent] = value[@options[:parent].to_s]
17
+ end
18
+ client.add(@options[:type], key_for(key), encode(value), options)
15
19
  end
16
20
 
17
21
  def delete(key)
@@ -1,5 +1,5 @@
1
1
  module Adapter
2
2
  module ElasticSearch
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adapter-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonathan Hoyt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-06 00:00:00 Z
18
+ date: 2012-03-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: adapter