stretcher 1.20.0 → 1.20.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 866e50cd52c34cc61b4af0a1e7b9e598bdc14a14
4
- data.tar.gz: 3e9d14317d08c4ce1d58a8793c7bff8f3cbe337b
3
+ metadata.gz: 1593e9afaf2d5dd9f6e07b92ba1db3cabd413861
4
+ data.tar.gz: b5d3512303309e836a03e2cff591a8e18e3b1b80
5
5
  SHA512:
6
- metadata.gz: 6365cf04ab6d1a1228fa59080e5b3d56734a829331a127d8e579e4af95e1c6b16ad199ce75dafa436f00cdd769836128fcc490ef650f4dcf450f98e41415ec7e
7
- data.tar.gz: 07c06966381c542a6ddbffc81420f796fd8da8327b79b1ee4cb2cbaf84f3d708d2fce8ab55fd8dc2a68b6b5aa3865dce64d19512ca4cb6d4dcb3f675a60a7d9a
6
+ metadata.gz: ea4270733fe0d805920f9b68787d4d6532009dc4efe98c1af31d90ba30df3736981ba56712d1d0bbed9c95eca99b3c82128b0a4f9cf66cffff3554da93afa655
7
+ data.tar.gz: 659c8f763d062e50765be9d93fb74908cd19913dac9c95fb9d2f78c1c185a75208bca30d8170e6222fa36752d687e5c17c54e93df134b63aeb83be3b269e564a
@@ -54,7 +54,7 @@ module Stretcher
54
54
 
55
55
  body = documents.reduce("") {|post_data, d_raw|
56
56
  d = Hashie::Mash.new(d_raw)
57
- index_meta = { :_index => name, :_id => (d[:id] || d.delete(:_id)) }
57
+ index_meta = { :_id => (d[:id] || d.delete(:_id)) }
58
58
 
59
59
  system_fields = %w{_type _parent _routing}
60
60
  d.keys.reduce(index_meta) do |memo, key|
@@ -65,7 +65,7 @@ module Stretcher
65
65
  post_data << (MultiJson.dump(d) << "\n") unless action == :delete
66
66
  post_data
67
67
  }
68
- @server.bulk body, options
68
+ bulk body, options
69
69
  end
70
70
 
71
71
  # Creates the index, with the supplied hash as the options body (usually mappings: and settings:))
@@ -186,6 +186,12 @@ module Stretcher
186
186
  def delete_percolator_query(query_name)
187
187
  server.request(:delete, percolator_query_path(query_name))
188
188
  end
189
+
190
+ # Perform a raw bulk operation. You probably want to use Stretcher::Index#bulk_index
191
+ # which properly formats a bulk index request.
192
+ def bulk(data, options={})
193
+ request(:post, "_bulk", options, data)
194
+ end
189
195
 
190
196
  # Full path to this index
191
197
  def path_uri(path="/")
@@ -1,3 +1,3 @@
1
1
  module Stretcher
2
- VERSION = "1.20.0"
2
+ VERSION = "1.20.1"
3
3
  end
data/stretcher.gemspec CHANGED
@@ -20,7 +20,6 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  if RUBY_PLATFORM == 'java'
22
22
  gem.add_runtime_dependency('jruby-openssl')
23
- gem.add_runtime_dependency('json-jruby')
24
23
  end
25
24
 
26
25
  if RUBY_VERSION < "1.9"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stretcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Cholakian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-21 00:00:00.000000000 Z
11
+ date: 2013-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday