elastics-client 1.2.1 → 1.3.0
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 +4 -4
- data/VERSION +1 -1
- data/lib/elastics-client.rb +1 -0
- data/lib/elastics/api_stubs.rb +8 -7
- data/lib/elastics/api_templates/document_api.yml +4 -3
- data/lib/elastics/class_proxy/templates/doc.rb +3 -3
- data/lib/elastics/class_proxy/templates/search.rb +2 -2
- data/lib/elastics/result/search.rb +0 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9dbd5f470bc28f67a8174b4a116b26266eabc09f
|
|
4
|
+
data.tar.gz: c407a63ae3709f164bdd09732e4a704d1ef77dfd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f3f9226dd4be94ca78e070156941f82deaf0f07b3a9c88aa3b4a89467a3819ce4361512eb833ed75e5bf149ad427de6d7bccdbf00cdacc2ffe70de84735dba1
|
|
7
|
+
data.tar.gz: e79c9e3ac2242766f554be110b851a550c89f9872e6e17be5f29a5aba1ff8597e1a33254514ccf7e28a6cbf80bc654f0524aa1682e251d0b17f4ff12050b5d20
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.3.0
|
data/lib/elastics-client.rb
CHANGED
data/lib/elastics/api_stubs.rb
CHANGED
|
@@ -240,24 +240,25 @@ module Elastics
|
|
|
240
240
|
# also aliased by: :bulk
|
|
241
241
|
|
|
242
242
|
|
|
243
|
-
# ########## Elastics.
|
|
243
|
+
# ########## Elastics.termvectors ##########
|
|
244
244
|
# ------------------
|
|
245
245
|
# Elastics::Template::API
|
|
246
246
|
# ---
|
|
247
|
-
#
|
|
247
|
+
# termvectors:
|
|
248
248
|
# - POST
|
|
249
|
-
# - "/<<index>>/<<type>>/<<id>>/
|
|
249
|
+
# - "/<<index>>/<<type>>/<<id>>/_termvectors"
|
|
250
250
|
#
|
|
251
251
|
#
|
|
252
252
|
# Usage:
|
|
253
|
-
# Elastics.
|
|
254
|
-
#
|
|
255
|
-
#
|
|
253
|
+
# Elastics.termvectors :id => id, # required
|
|
254
|
+
# :type => nil,
|
|
255
|
+
# :index => nil
|
|
256
256
|
#
|
|
257
|
-
def self.
|
|
257
|
+
def self.termvectors(*vars)
|
|
258
258
|
## this is a stub, used for reference
|
|
259
259
|
super
|
|
260
260
|
end
|
|
261
|
+
# also aliased by: :termvector
|
|
261
262
|
|
|
262
263
|
|
|
263
264
|
# ########## Elastics.multi_termvectors ##########
|
|
@@ -128,16 +128,17 @@ post_bulk_string:
|
|
|
128
128
|
#-----------------------------------------------------------------------------#
|
|
129
129
|
### Term Vectors ###
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
termvectors:
|
|
132
132
|
- POST
|
|
133
|
-
- /<<index>>/<<type>>/<<id>>/
|
|
133
|
+
- /<<index>>/<<type>>/<<id>>/_termvectors
|
|
134
134
|
-
|
|
135
135
|
- REFERENCES:
|
|
136
136
|
group: document_api
|
|
137
137
|
api_name: Term Vectors
|
|
138
138
|
api_url: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html
|
|
139
139
|
notice: "You must pass the options as the :data variable."
|
|
140
|
-
|
|
140
|
+
aliases:
|
|
141
|
+
- :termvector
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
#-----------------------------------------------------------------------------#
|
|
@@ -50,9 +50,9 @@ module Elastics
|
|
|
50
50
|
indented = formatted.shift
|
|
51
51
|
indented = [indented] + formatted.map{ |line| indent + line }
|
|
52
52
|
indented = indented.join("\n") + "\n "
|
|
53
|
-
notice
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
notice = if @template.is_a?(Elastics::Template::Api) && @template.references['notice']
|
|
54
|
+
"\nNotice: #{@template.references['notice']}\n "
|
|
55
|
+
end
|
|
56
56
|
indented + notice
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -57,10 +57,10 @@ module Elastics
|
|
|
57
57
|
end
|
|
58
58
|
end
|
|
59
59
|
|
|
60
|
-
#
|
|
60
|
+
# in the default use of query_then_search setting the size=0 will cause the same
|
|
61
61
|
def count_search(template, *vars)
|
|
62
62
|
template = template.is_a?(Elastics::Template) ? template : templates[template]
|
|
63
|
-
template.render Vars.new({:params => {:
|
|
63
|
+
template.render Vars.new({:params => {:size => 0}, :raw_result => true}, *vars)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elastics-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Domizio Demichelis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-08-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_json
|