jruby-elasticsearch 0.0.1 → 0.0.2
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/{elasticsearch → jruby-elasticsearch}/actionlistener.rb +4 -2
- data/lib/{elasticsearch → jruby-elasticsearch}/bulkrequest.rb +2 -2
- data/lib/{elasticsearch → jruby-elasticsearch}/bulkstream.rb +1 -1
- data/lib/{elasticsearch → jruby-elasticsearch}/client.rb +2 -2
- data/lib/{elasticsearch → jruby-elasticsearch}/indexrequest.rb +3 -3
- data/lib/{elasticsearch → jruby-elasticsearch}/namespace.rb +0 -0
- data/lib/{elasticsearch → jruby-elasticsearch}/request.rb +5 -3
- data/lib/{elasticsearch.rb → jruby-elasticsearch.rb} +1 -1
- metadata +10 -10
@@ -1,5 +1,5 @@
|
|
1
1
|
require "java"
|
2
|
-
require "elasticsearch/namespace"
|
2
|
+
require "jruby-elasticsearch/namespace"
|
3
3
|
|
4
4
|
class ElasticSearch::ActionListener
|
5
5
|
include org.elasticsearch.action.ActionListener
|
@@ -20,6 +20,8 @@ class ElasticSearch::ActionListener
|
|
20
20
|
@failure_callbacks << block
|
21
21
|
when :success
|
22
22
|
@success_callbacks << block
|
23
|
+
else
|
24
|
+
raise "Unknown event '#{what}' for #{self.class.name}"
|
23
25
|
end
|
24
26
|
return self
|
25
27
|
end # def on
|
@@ -40,7 +42,7 @@ class ElasticSearch::ActionListener
|
|
40
42
|
@success_callbacks.each { |c| c.call(response) }
|
41
43
|
else
|
42
44
|
# Default if no success callbacks
|
43
|
-
puts "#{self.class.name}#onResponse => #{response.inspect}"
|
45
|
+
puts "#{self.class.name}#onResponse => #{response.inspect} (#{self})"
|
44
46
|
end
|
45
47
|
end # def onResponse
|
46
48
|
end # class ElasticSearch::ActionListener
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require "elasticsearch/namespace"
|
2
|
-
require "elasticsearch/request"
|
1
|
+
require "jruby-elasticsearch/namespace"
|
2
|
+
require "jruby-elasticsearch/request"
|
3
3
|
|
4
4
|
class ElasticSearch::IndexRequest < ElasticSearch::Request
|
5
5
|
# Create a new index request.
|
@@ -11,7 +11,7 @@ class ElasticSearch::IndexRequest < ElasticSearch::Request
|
|
11
11
|
@data = data
|
12
12
|
|
13
13
|
@prep = @client.prepareIndex(index, type, id)
|
14
|
-
super
|
14
|
+
super()
|
15
15
|
end
|
16
16
|
|
17
17
|
# Execute this index request.
|
File without changes
|
@@ -1,5 +1,5 @@
|
|
1
|
-
require "elasticsearch/namespace"
|
2
|
-
require "elasticsearch/actionlistener"
|
1
|
+
require "jruby-elasticsearch/namespace"
|
2
|
+
require "jruby-elasticsearch/actionlistener"
|
3
3
|
|
4
4
|
class ElasticSearch::Request
|
5
5
|
# Create a new index request.
|
@@ -9,7 +9,9 @@ class ElasticSearch::Request
|
|
9
9
|
|
10
10
|
# See ElasticSearch::ActionListener#on
|
11
11
|
def on(event, &block)
|
12
|
-
|
12
|
+
puts "Event[#{event}] => #{block} (#{@handler})"
|
13
|
+
@handler.on(event, &block)
|
14
|
+
return self
|
13
15
|
end
|
14
16
|
|
15
17
|
# Execute this index request.
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jordan Sissel
|
@@ -28,14 +28,14 @@ extensions: []
|
|
28
28
|
extra_rdoc_files: []
|
29
29
|
|
30
30
|
files:
|
31
|
-
- lib/elasticsearch.rb
|
32
|
-
- lib/elasticsearch/namespace.rb
|
33
|
-
- lib/elasticsearch/bulkrequest.rb
|
34
|
-
- lib/elasticsearch/actionlistener.rb
|
35
|
-
- lib/elasticsearch/request.rb
|
36
|
-
- lib/elasticsearch/indexrequest.rb
|
37
|
-
- lib/elasticsearch/client.rb
|
38
|
-
- lib/elasticsearch/bulkstream.rb
|
31
|
+
- lib/jruby-elasticsearch.rb
|
32
|
+
- lib/jruby-elasticsearch/namespace.rb
|
33
|
+
- lib/jruby-elasticsearch/bulkrequest.rb
|
34
|
+
- lib/jruby-elasticsearch/actionlistener.rb
|
35
|
+
- lib/jruby-elasticsearch/request.rb
|
36
|
+
- lib/jruby-elasticsearch/indexrequest.rb
|
37
|
+
- lib/jruby-elasticsearch/client.rb
|
38
|
+
- lib/jruby-elasticsearch/bulkstream.rb
|
39
39
|
has_rdoc: true
|
40
40
|
homepage: https://github.com/jordansissel/jruby-elasticsearch
|
41
41
|
licenses:
|