jruby-elasticsearch 0.0.7 → 0.0.8
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.
@@ -16,6 +16,10 @@ class ElasticSearch::Client
|
|
16
16
|
#builder.settings.put("es.transport.tcp.port", port)
|
17
17
|
end
|
18
18
|
|
19
|
+
if options[:bind_host]
|
20
|
+
builder.settings.put('network.host', options[:bind_host])
|
21
|
+
end
|
22
|
+
|
19
23
|
if !options[:cluster].nil?
|
20
24
|
builder.clusterName(options[:cluster])
|
21
25
|
end
|
@@ -10,7 +10,12 @@ class ElasticSearch::IndexRequest < ElasticSearch::Request
|
|
10
10
|
@id = id
|
11
11
|
@data = data
|
12
12
|
|
13
|
-
|
13
|
+
# This should silence jruby warnings for 'multiple java methods for prepareIndex'
|
14
|
+
if id.nil?
|
15
|
+
@prep = @client.prepareIndex(index, type)
|
16
|
+
else
|
17
|
+
@prep = @client.prepareIndex(index, type, id)
|
18
|
+
end
|
14
19
|
super()
|
15
20
|
end
|
16
21
|
|
@@ -93,6 +93,19 @@ class ElasticSearch::SearchRequest < ElasticSearch::Request
|
|
93
93
|
return self
|
94
94
|
end # def histogram
|
95
95
|
|
96
|
+
public
|
97
|
+
def terms(field, name=nil)
|
98
|
+
if name.nil?
|
99
|
+
# TODO(sissel): How do we expose the name of the histogram?
|
100
|
+
name = field
|
101
|
+
end
|
102
|
+
# TODO(sissel): Support 'global' ?
|
103
|
+
builder = org.elasticsearch.search.facet.terms.TermsFacetBuilder.new(name)
|
104
|
+
builder.field(field)
|
105
|
+
@prep.addFacet(builder)
|
106
|
+
return self
|
107
|
+
end # def terms
|
108
|
+
|
96
109
|
public
|
97
110
|
def size(s)
|
98
111
|
@prep.setSize(s)
|
metadata
CHANGED
@@ -1,22 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
|
-
|
13
|
+
- Jordan Sissel
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-
|
18
|
+
date: 2011-05-31 00:00:00 -07:00
|
14
19
|
default_executable:
|
15
20
|
dependencies: []
|
16
21
|
|
17
22
|
description: ...
|
18
23
|
email:
|
19
|
-
|
24
|
+
- jls@semicomplete.com
|
20
25
|
executables: []
|
21
26
|
|
22
27
|
extensions: []
|
@@ -24,41 +29,47 @@ extensions: []
|
|
24
29
|
extra_rdoc_files: []
|
25
30
|
|
26
31
|
files:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
- lib/jruby-elasticsearch.rb
|
33
|
+
- lib/jruby-elasticsearch/searchrequest.rb
|
34
|
+
- lib/jruby-elasticsearch/namespace.rb
|
35
|
+
- lib/jruby-elasticsearch/bulkrequest.rb
|
36
|
+
- lib/jruby-elasticsearch/actionlistener.rb
|
37
|
+
- lib/jruby-elasticsearch/request.rb
|
38
|
+
- lib/jruby-elasticsearch/indexrequest.rb
|
39
|
+
- lib/jruby-elasticsearch/client.rb
|
40
|
+
- lib/jruby-elasticsearch/bulkstream.rb
|
36
41
|
has_rdoc: true
|
37
42
|
homepage: https://github.com/jordansissel/jruby-elasticsearch
|
38
43
|
licenses:
|
39
|
-
|
44
|
+
- Apache License (2.0)
|
40
45
|
post_install_message:
|
41
46
|
rdoc_options: []
|
42
47
|
|
43
48
|
require_paths:
|
44
|
-
|
45
|
-
|
49
|
+
- lib
|
50
|
+
- lib
|
46
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
47
52
|
none: false
|
48
53
|
requirements:
|
49
|
-
|
50
|
-
|
51
|
-
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
52
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
61
|
none: false
|
54
62
|
requirements:
|
55
|
-
|
56
|
-
|
57
|
-
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
hash: 3
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
version: "0"
|
58
69
|
requirements: []
|
59
70
|
|
60
71
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.
|
72
|
+
rubygems_version: 1.6.2
|
62
73
|
signing_key:
|
63
74
|
specification_version: 3
|
64
75
|
summary: JRuby API for ElasticSearch using the native ES Java API
|