jruby-elasticsearch 0.0.14 → 0.0.15
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/lib/jruby-elasticsearch/client.rb +14 -2
- metadata +8 -9
@@ -33,8 +33,20 @@ class ElasticSearch::Client
|
|
33
33
|
if !options[:host].nil?
|
34
34
|
port = (options[:port] or "9300")
|
35
35
|
builder.settings.put("discovery.zen.ping.multicast.enabled", false)
|
36
|
-
|
37
|
-
|
36
|
+
if port =~ /^\d+-\d+$/
|
37
|
+
# port ranges are 'host[port1-port2]' according to
|
38
|
+
# http://www.elasticsearch.org/guide/reference/modules/discovery/zen/
|
39
|
+
# However, it seems to only query the first port.
|
40
|
+
# So generate our own list of unicast hosts to scan.
|
41
|
+
range = Range.new(*port.split("-"))
|
42
|
+
hosts = range.collect { |p| "#{options[:host]}:#{p}" }.join(",")
|
43
|
+
builder.settings.put("discovery.zen.ping.unicast.hosts", hosts)
|
44
|
+
else
|
45
|
+
# only one port, not a range.
|
46
|
+
puts "PORT SETTINGS #{options[:host]}:#{port}"
|
47
|
+
builder.settings.put("discovery.zen.ping.unicast.hosts",
|
48
|
+
"#{options[:host]}:#{port}")
|
49
|
+
end
|
38
50
|
end
|
39
51
|
|
40
52
|
if options[:bind_host]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! '...'
|
15
15
|
email:
|
@@ -18,15 +18,15 @@ executables: []
|
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
21
|
-
- lib/jruby-elasticsearch
|
21
|
+
- lib/jruby-elasticsearch.rb
|
22
|
+
- lib/jruby-elasticsearch/indexrequest.rb
|
22
23
|
- lib/jruby-elasticsearch/searchrequest.rb
|
23
24
|
- lib/jruby-elasticsearch/actionlistener.rb
|
25
|
+
- lib/jruby-elasticsearch/namespace.rb
|
26
|
+
- lib/jruby-elasticsearch/client.rb
|
27
|
+
- lib/jruby-elasticsearch/request.rb
|
24
28
|
- lib/jruby-elasticsearch/bulkstream.rb
|
25
|
-
- lib/jruby-elasticsearch/indexrequest.rb
|
26
29
|
- lib/jruby-elasticsearch/bulkrequest.rb
|
27
|
-
- lib/jruby-elasticsearch/request.rb
|
28
|
-
- lib/jruby-elasticsearch/namespace.rb
|
29
|
-
- lib/jruby-elasticsearch.rb
|
30
30
|
- test/test_integration.rb
|
31
31
|
homepage: https://github.com/jordansissel/jruby-elasticsearch
|
32
32
|
licenses:
|
@@ -50,9 +50,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
version: '0'
|
51
51
|
requirements: []
|
52
52
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.8.
|
53
|
+
rubygems_version: 1.8.25
|
54
54
|
signing_key:
|
55
55
|
specification_version: 3
|
56
56
|
summary: JRuby API for ElasticSearch using the native ES Java API
|
57
57
|
test_files: []
|
58
|
-
has_rdoc:
|