elastics-client 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3292010647ca4fa25dcf4e8a93a2be9920b4f6e9
4
- data.tar.gz: a28a7e7cc7fd0f15af1e45dabf0c8d1eafb35f51
3
+ metadata.gz: 9dbd5f470bc28f67a8174b4a116b26266eabc09f
4
+ data.tar.gz: c407a63ae3709f164bdd09732e4a704d1ef77dfd
5
5
  SHA512:
6
- metadata.gz: b44327f3e0b873675ddbf2d6268ef25469e50e45263f90fa25826ead713a4dc25278cdabe127544493180c9bd1b94419f79ecb9e367069922c421cba8b3d4c79
7
- data.tar.gz: 5db2ef919864d6a91166609592d50b638e67c3aedaab6b68a44bbf7caf914893aaf1672c347c81ce39a252b852740b3fa164a12a37dd0824ca420f06a8e6cd5b
6
+ metadata.gz: 1f3f9226dd4be94ca78e070156941f82deaf0f07b3a9c88aa3b4a89467a3819ce4361512eb833ed75e5bf149ad427de6d7bccdbf00cdacc2ffe70de84735dba1
7
+ data.tar.gz: e79c9e3ac2242766f554be110b851a550c89f9872e6e17be5f29a5aba1ff8597e1a33254514ccf7e28a6cbf80bc654f0524aa1682e251d0b17f4ff12050b5d20
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.3.0
@@ -137,6 +137,7 @@ module Elastics
137
137
  alias_method :put_index_settings, :update_index_settings
138
138
 
139
139
  alias_method :mlt, :more_like_this
140
+ alias_method :termvector, :termvectors # deprecated (backward compatibility)
140
141
  end
141
142
 
142
143
 
@@ -240,24 +240,25 @@ module Elastics
240
240
  # also aliased by: :bulk
241
241
 
242
242
 
243
- # ########## Elastics.termvector ##########
243
+ # ########## Elastics.termvectors ##########
244
244
  # ------------------
245
245
  # Elastics::Template::API
246
246
  # ---
247
- # termvector:
247
+ # termvectors:
248
248
  # - POST
249
- # - "/<<index>>/<<type>>/<<id>>/_termvector"
249
+ # - "/<<index>>/<<type>>/<<id>>/_termvectors"
250
250
  #
251
251
  #
252
252
  # Usage:
253
- # Elastics.termvector :id => id, # required
254
- # :type => nil,
255
- # :index => nil
253
+ # Elastics.termvectors :id => id, # required
254
+ # :type => nil,
255
+ # :index => nil
256
256
  #
257
- def self.termvector(*vars)
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
- termvector:
131
+ termvectors:
132
132
  - POST
133
- - /<<index>>/<<type>>/<<id>>/_termvector
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 = if @template.is_a?(Elastics::Template::Api) && @template.references['notice']
54
- "\nNotice: #{@template.references['notice']}\n "
55
- end
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
- # implements search_type=count (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-search-type.html#count)
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 => {:search_type => 'count'}, :raw_result => true}, *vars)
63
+ template.render Vars.new({:params => {:size => 0}, :raw_result => true}, *vars)
64
64
  end
65
65
 
66
66
  end
@@ -19,11 +19,6 @@ module Elastics
19
19
  end
20
20
  alias_method :documents, :collection
21
21
 
22
- # deprecated
23
- def facets
24
- self['facets']
25
- end
26
-
27
22
  def aggregations
28
23
  self['aggregations']
29
24
  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.2.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: 2015-11-22 00:00:00.000000000 Z
11
+ date: 2016-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json