elastics-client 1.1.11 → 1.2.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0c02f2ac3c2b9b6bb4e171602857f15e55a5c7e2
4
+ data.tar.gz: 3c896bc4ce82299716aead954fbb21d4ce8389e7
5
+ SHA512:
6
+ metadata.gz: b2fbd808a7a9743aac6d5496a3b44ac6d394ec0cfdb492cf12f62f0a128ce19976f521534df3d26a1bb5929c27764777c47b6f60336f2888590cab6114bd9d2c
7
+ data.tar.gz: b650f110ca1e64876a538052ec3d8b93c815d2db62a8634a0fd9e82b22231b78243ccc6e7a2e263d141a35e20a426a92f47b2028ed303fd49a958372b05a7d05
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.11
1
+ 1.2.0
@@ -1,6 +1,9 @@
1
1
  require 'date'
2
- version_path = %w[../VERSION ../../VERSION].detect{|v| File.exist?(File.expand_path(v, __FILE__))}
3
- version = File.read(File.expand_path(version_path, __FILE__)).strip
2
+ version_path = %w[VERSION ../VERSION].detect{|v| File.exist?(v)}
3
+ version = File.read(version_path).strip
4
+ extra_files = []
5
+ extra_files << 'VERSION' if File.exist?('VERSION')
6
+ extra_files << 'LICENSE' if File.exist?('LICENSE')
4
7
 
5
8
  Gem::Specification.new do |s|
6
9
  s.name = 'elastics-client'
@@ -11,7 +14,7 @@ Elasticsearch API Methods, Templating System, Cascading Variables Management, Re
11
14
  s.authors = ['Domizio Demichelis']
12
15
  s.email = 'dd.nexus@gmail.com'
13
16
  s.require_paths = %w[lib]
14
- s.files = `git ls-files -z`.split("\0") + %w[VERSION LICENSE]
17
+ s.files = `git ls-files -z`.split("\0") + extra_files
15
18
  s.version = version
16
19
  s.date = Date.today.to_s
17
20
  s.required_rubygems_version = '>= 1.3.6'
@@ -28,6 +28,7 @@ require 'elastics/template/common'
28
28
  require 'elastics/template/partial'
29
29
  require 'elastics/template/logger'
30
30
  require 'elastics/template'
31
+ require 'elastics/template/api'
31
32
  require 'elastics/template/search'
32
33
  require 'elastics/template/slim_search'
33
34
  require 'elastics/template/tags'
@@ -60,20 +61,33 @@ module Elastics
60
61
  include ApiStubs
61
62
 
62
63
  include Templates
63
- elastics.load_source File.expand_path('../elastics/api_templates/core_api.yml' , __FILE__)
64
- elastics.load_source File.expand_path('../elastics/api_templates/indices_api.yml', __FILE__)
65
- elastics.load_source File.expand_path('../elastics/api_templates/cluster_api.yml', __FILE__)
64
+ elastics.load_api_source File.expand_path('../elastics/api_templates/document_api.yml' , __FILE__)
65
+ elastics.load_api_source File.expand_path('../elastics/api_templates/search_api.yml' , __FILE__)
66
+ elastics.load_api_source File.expand_path('../elastics/api_templates/indices_api.yml' , __FILE__)
67
+ elastics.load_api_source File.expand_path('../elastics/api_templates/cat_api.yml' , __FILE__)
68
+ elastics.load_api_source File.expand_path('../elastics/api_templates/cluster_api.yml' , __FILE__)
69
+ elastics.load_api_source File.expand_path('../elastics/api_templates/elastics_additions.yml' , __FILE__)
66
70
 
67
71
  extend self
68
72
  extend UtilityMethods
69
73
 
70
- elastics.wrap :post_bulk_string, :bulk do |*vars|
74
+ ### wrapped methods ###
75
+
76
+ elastics.wrap :cat do |*vars|
77
+ if vars.first.is_a?(String)
78
+ super :path => vars.first
79
+ else
80
+ super *vars
81
+ end
82
+ end
83
+
84
+ elastics.wrap :post_bulk_string do |*vars|
71
85
  vars = Vars.new(*vars)
72
86
  return if vars[:bulk_string].nil? || vars[:bulk_string].empty?
73
87
  super vars
74
88
  end
75
89
 
76
- # get a document without using the get API (which doesn't support fields '*')
90
+ # get a document without using the get API and without raising any error if missing
77
91
  elastics.wrap :search_by_id do |*vars|
78
92
  vars = Vars.new(*vars)
79
93
  result = super(vars)
@@ -85,7 +99,7 @@ module Elastics
85
99
  end
86
100
 
87
101
  # support for live-reindex
88
- elastics.wrap :store, :put_store, :post_store do |*vars|
102
+ elastics.wrap :store, :post_store do |*vars|
89
103
  vars = Vars.new(*vars)
90
104
  vars[:index] = LiveReindex.prefix_index(vars[:index]) if LiveReindex.should_prefix_index?
91
105
  result = super(vars)
@@ -97,7 +111,7 @@ module Elastics
97
111
  end
98
112
 
99
113
  # support for live-reindex
100
- elastics.wrap :delete, :remove do |*vars|
114
+ elastics.wrap :delete do |*vars|
101
115
  vars = Vars.new(*vars)
102
116
  vars[:index] = LiveReindex.prefix_index(vars[:index]) if LiveReindex.should_prefix_index?
103
117
  if LiveReindex.should_track_change?
@@ -107,4 +121,23 @@ module Elastics
107
121
  super(vars)
108
122
  end
109
123
 
124
+ ### alias methods ###
125
+
126
+ class << self
127
+ alias_method :put_store, :store # for symmetry with post_store
128
+ alias_method :remove, :delete
129
+ alias_method :multi_get, :multi_get_ids # deprecated (backward compatibility)
130
+ alias_method :bulk, :post_bulk_string # deprecated (backward compatibility)
131
+
132
+ alias_method :create_index, :put_index
133
+ alias_method :index_exists, :indices_exists
134
+ alias_method :exist?, :indices_exists # deprecated (backward compatibility)
135
+ alias_method :put_mapping, :put_index_mapping
136
+ alias_method :type_exists, :types_exists
137
+ alias_method :put_index_settings, :update_index_settings
138
+
139
+ alias_method :mlt, :more_like_this
140
+ end
141
+
142
+
110
143
  end
@@ -2,1303 +2,1370 @@ module Elastics
2
2
  module ApiStubs
3
3
 
4
4
  # The following lines are autogenerated by Elastics.doc
5
-
6
- ######################## Core API ########################
5
+ # Notice: :index and :type variables are always shown as nil (default), although they may be required by elasticsearch
7
6
 
8
7
  # ########## Elastics.store ##########
9
- # --------------
8
+ # ------------------
10
9
  # Elastics::Template
11
10
  # ---
12
11
  # store:
13
12
  # - PUT
14
- # - /<<index>>/<<type>>/<<id>>
13
+ # - "/<<index>>/<<type>>/<<id>>"
15
14
  #
16
15
  #
17
16
  # Usage:
18
- # Elastics.store :id => id, # required
17
+ # Elastics.store :id => id, # required
19
18
  # :type => nil,
20
- # :index => "elastics_test_index"
19
+ # :index => nil
21
20
  #
22
- def Elastics.store(*vars)
21
+ def self.store(*vars)
23
22
  ## this is a stub, used for reference
24
23
  super
25
24
  end
25
+ # also aliased by: :put_store
26
26
 
27
- # ########## Elastics.put_store ##########
28
- # --------------
29
- # Elastics::Template
30
- # ---
31
- # put_store:
32
- # - PUT
33
- # - /<<index>>/<<type>>/<<id>>
34
- #
35
- #
36
- # Usage:
37
- # Elastics.put_store :id => id, # required
38
- # :type => nil,
39
- # :index => "elastics_test_index"
40
- #
41
- def Elastics.put_store(*vars)
42
- ## this is a stub, used for reference
43
- super
44
- end
45
27
 
46
28
  # ########## Elastics.post_store ##########
47
- # --------------
29
+ # ------------------
48
30
  # Elastics::Template
49
31
  # ---
50
32
  # post_store:
51
33
  # - POST
52
- # - /<<index>>/<<type>>
34
+ # - "/<<index>>/<<type>>"
53
35
  #
54
36
  #
55
37
  # Usage:
56
- # Elastics.post_store :index => "elastics_test_index",
38
+ # Elastics.post_store :index => nil,
57
39
  # :type => nil
58
40
  #
59
- def Elastics.post_store(*vars)
60
- ## this is a stub, used for reference
61
- super
62
- end
63
-
64
- # ########## Elastics.delete ##########
65
- # --------------
66
- # Elastics::Template
67
- # ---
68
- # delete:
69
- # - DELETE
70
- # - /<<index>>/<<type>>/<<id>>
71
- #
72
- #
73
- # Usage:
74
- # Elastics.delete :id => id, # required
75
- # :type => nil,
76
- # :index => "elastics_test_index"
77
- #
78
- def Elastics.delete(*vars)
41
+ def self.post_store(*vars)
79
42
  ## this is a stub, used for reference
80
43
  super
81
44
  end
82
45
 
83
- # ########## Elastics.remove ##########
84
- # --------------
85
- # Elastics::Template
86
- # ---
87
- # remove:
88
- # - DELETE
89
- # - /<<index>>/<<type>>/<<id>>
90
- #
91
- #
92
- # Usage:
93
- # Elastics.remove :id => id, # required
94
- # :type => nil,
95
- # :index => "elastics_test_index"
96
- #
97
- def Elastics.remove(*vars)
98
- ## this is a stub, used for reference
99
- super
100
- end
101
46
 
102
47
  # ########## Elastics.get ##########
103
- # --------------
48
+ # ------------------
104
49
  # Elastics::Template
105
50
  # ---
106
51
  # get:
107
52
  # - GET
108
- # - /<<index>>/<<type>>/<<id>>
53
+ # - "/<<index>>/<<type>>/<<id>>"
109
54
  #
110
55
  #
111
56
  # Usage:
112
- # Elastics.get :id => id, # required
57
+ # Elastics.get :id => id, # required
113
58
  # :type => nil,
114
- # :index => "elastics_test_index"
59
+ # :index => nil
115
60
  #
116
- def Elastics.get(*vars)
61
+ def self.get(*vars)
117
62
  ## this is a stub, used for reference
118
63
  super
119
64
  end
120
65
 
66
+
121
67
  # ########## Elastics.get_source ##########
122
- # --------------
68
+ # ------------------
123
69
  # Elastics::Template
124
70
  # ---
125
71
  # get_source:
126
72
  # - GET
127
- # - /<<index>>/<<type>>/<<id>>/_source
73
+ # - "/<<index>>/<<type>>/<<id>>/_source"
128
74
  #
129
75
  #
130
76
  # Usage:
131
- # Elastics.get_source :id => id, # required
77
+ # Elastics.get_source :id => id, # required
132
78
  # :type => nil,
133
- # :index => "elastics_test_index"
79
+ # :index => nil
134
80
  #
135
- def Elastics.get_source(*vars)
81
+ def self.get_source(*vars)
136
82
  ## this is a stub, used for reference
137
83
  super
138
84
  end
139
85
 
140
- # ########## Elastics.multi_get ##########
141
- # --------------
86
+
87
+ # ########## Elastics.delete ##########
88
+ # ------------------
142
89
  # Elastics::Template
143
90
  # ---
144
- # multi_get:
145
- # - GET
146
- # - /<<index>>/<<type>>/_mget
147
- # - ids: << ids >>
91
+ # delete:
92
+ # - DELETE
93
+ # - "/<<index>>/<<type>>/<<id>>"
148
94
  #
149
95
  #
150
96
  # Usage:
151
- # Elastics.multi_get :ids => ids, # required
152
- # :type => nil,
153
- # :index => "elastics_test_index"
97
+ # Elastics.delete :id => id, # required
98
+ # :type => nil,
99
+ # :index => nil
154
100
  #
155
- def Elastics.multi_get(*vars)
101
+ def self.delete(*vars)
156
102
  ## this is a stub, used for reference
157
103
  super
158
104
  end
105
+ # also aliased by: :remove
106
+
159
107
 
160
108
  # ########## Elastics.update ##########
161
- # --------------
109
+ # ------------------
162
110
  # Elastics::Template
163
111
  # ---
164
112
  # update:
165
113
  # - POST
166
- # - /<<index>>/<<type>>/<<id>>/_update
114
+ # - "/<<index>>/<<type>>/<<id>>/_update"
167
115
  #
168
116
  #
169
117
  # Usage:
170
- # Elastics.update :id => id, # required
118
+ # Elastics.update :id => id, # required
171
119
  # :type => nil,
172
- # :index => "elastics_test_index"
120
+ # :index => nil
173
121
  #
174
- def Elastics.update(*vars)
122
+ def self.update(*vars)
175
123
  ## this is a stub, used for reference
176
124
  super
177
125
  end
178
126
 
179
- # ########## Elastics.suggest ##########
127
+
128
+ # ########## Elastics.multi_get_ids ##########
180
129
  # ------------------
181
130
  # Elastics::Template
182
131
  # ---
183
- # suggest:
184
- # - POST
185
- # - /<<index>>/<<type>>/_suggest
132
+ # multi_get_ids:
133
+ # - GET
134
+ # - "/<<index>>/<<type>>/_mget"
135
+ # - ids: "<< ids >>"
186
136
  #
187
137
  #
188
138
  # Usage:
189
- # Elastics.suggest :index => "elastics_test_index",
190
- # :type => nil
139
+ # Elastics.multi_get_ids :ids => ids, # required
140
+ # :type => nil,
141
+ # :index => nil
191
142
  #
192
- def Elastics.suggest(*vars)
143
+ def self.multi_get_ids(*vars)
193
144
  ## this is a stub, used for reference
194
145
  super
195
146
  end
147
+ # also aliased by: :multi_get
196
148
 
197
- # ########## Elastics.percolate ##########
198
- # --------------
149
+
150
+ # ########## Elastics.multi_get_docs ##########
151
+ # ------------------
199
152
  # Elastics::Template
200
153
  # ---
201
- # percolate:
154
+ # multi_get_docs:
202
155
  # - GET
203
- # - /<<index>>/<<type>>/_percolate
156
+ # - "/<<index>>/<<type>>/_mget"
157
+ # - docs: "<< docs >>"
204
158
  #
205
159
  #
206
160
  # Usage:
207
- # Elastics.percolate :index => "elastics_test_index",
208
- # :type => nil
161
+ # Elastics.multi_get_docs :docs => docs, # required
162
+ # :type => nil,
163
+ # :index => nil
209
164
  #
210
- def Elastics.percolate(*vars)
165
+ def self.multi_get_docs(*vars)
211
166
  ## this is a stub, used for reference
212
167
  super
213
168
  end
214
169
 
215
- # ########## Elastics.put_percolator ##########
216
- # --------------
170
+
171
+ # ########## Elastics.post_bulk_string ##########
172
+ # ------------------
217
173
  # Elastics::Template
218
174
  # ---
219
- # put_percolator:
220
- # - PUT
221
- # - /_percolator/<<index>>/<<percolator>>
175
+ # post_bulk_string:
176
+ # - POST
177
+ # - "/_bulk"
178
+ # - "<< bulk_string >>"
222
179
  #
223
180
  #
224
181
  # Usage:
225
- # Elastics.put_percolator :percolator => percolator, # required
226
- # :index => "elastics_test_index"
182
+ # Elastics.post_bulk_string :bulk_string => bulk_string # required
227
183
  #
228
- def Elastics.put_percolator(*vars)
184
+ def self.post_bulk_string(*vars)
229
185
  ## this is a stub, used for reference
230
186
  super
231
187
  end
188
+ # also aliased by: :bulk
232
189
 
233
- # ########## Elastics.delete_percolator ##########
234
- # --------------
190
+
191
+ # ########## Elastics.termvector ##########
192
+ # ------------------
235
193
  # Elastics::Template
236
194
  # ---
237
- # delete_percolator:
238
- # - DELETE
239
- # - /_percolator/<<index>>/<<percolator>>
195
+ # termvector:
196
+ # - POST
197
+ # - "/<<index>>/<<type>>/<<id>>/_termvector"
240
198
  #
241
199
  #
242
200
  # Usage:
243
- # Elastics.delete_percolator :percolator => percolator, # required
244
- # :index => "elastics_test_index"
201
+ # Elastics.termvector :id => id, # required
202
+ # :type => nil,
203
+ # :index => nil
245
204
  #
246
- def Elastics.delete_percolator(*vars)
205
+ def self.termvector(*vars)
247
206
  ## this is a stub, used for reference
248
207
  super
249
208
  end
250
209
 
251
- # ########## Elastics.post_bulk_string ##########
252
- # --------------
210
+
211
+ # ########## Elastics.multi_termvectors ##########
212
+ # ------------------
253
213
  # Elastics::Template
254
214
  # ---
255
- # post_bulk_string:
215
+ # multi_termvectors:
256
216
  # - POST
257
- # - /_bulk
258
- # - << bulk_string >>
217
+ # - "/<<index>>/<<type>>/_mtermvectors"
218
+ # - docs: "<<docs= ~ >>"
259
219
  #
260
220
  #
261
221
  # Usage:
262
- # Elastics.bulk :bulk_string => bulk_string # required
222
+ # Elastics.multi_termvectors :index => nil,
223
+ # :type => nil,
224
+ # :docs => nil
263
225
  #
264
- def Elastics.post_bulk_string(*vars)
226
+ def self.multi_termvectors(*vars)
265
227
  ## this is a stub, used for reference
266
228
  super
267
229
  end
268
230
 
269
- # ########## Elastics.count ##########
270
- # --------------
231
+
232
+ # ########## Elastics.search_shards ##########
233
+ # ------------------
271
234
  # Elastics::Template
272
235
  # ---
273
- # count:
236
+ # search_shards:
274
237
  # - GET
275
- # - /<<index>>/<<type>>/_count
238
+ # - "/<<index>>/<<type>>/_search_shards"
276
239
  #
277
240
  #
278
241
  # Usage:
279
- # Elastics.count :index => "elastics_test_index",
280
- # :type => nil
242
+ # Elastics.search_shards :index => nil,
243
+ # :type => nil
281
244
  #
282
- def Elastics.count(*vars)
245
+ def self.search_shards(*vars)
283
246
  ## this is a stub, used for reference
284
247
  super
285
248
  end
286
249
 
287
- # ########## Elastics.delete_by_query ##########
288
- # --------------
289
- # Elastics::Template
290
- # ---
291
- # delete_by_query:
292
- # - DELETE
293
- # - /<<index>>/<<type>>/_query
294
- #
295
- #
296
- # Usage:
297
- # Elastics.delete_by_query :index => "elastics_test_index",
298
- # :type => nil
299
- #
300
- def Elastics.delete_by_query(*vars)
301
- ## this is a stub, used for reference
302
- super
303
- end
304
250
 
305
- # ########## Elastics.more_like_this ##########
306
- # --------------
251
+ # ########## Elastics.count ##########
252
+ # ------------------
307
253
  # Elastics::Template
308
254
  # ---
309
- # more_like_this:
255
+ # count:
310
256
  # - GET
311
- # - /<<index>>/<<type>>/<<id>>/_mlt
257
+ # - "/<<index>>/<<type>>/_count"
312
258
  #
313
259
  #
314
260
  # Usage:
315
- # Elastics.more_like_this :id => id, # required
316
- # :type => nil,
317
- # :index => "elastics_test_index"
261
+ # Elastics.count :index => nil,
262
+ # :type => nil
318
263
  #
319
- def Elastics.more_like_this(*vars)
264
+ def self.count(*vars)
320
265
  ## this is a stub, used for reference
321
266
  super
322
267
  end
323
268
 
324
- # ########## Elastics.mlt ##########
325
- # --------------
269
+
270
+ # ########## Elastics.search_exists ##########
271
+ # ------------------
326
272
  # Elastics::Template
327
273
  # ---
328
- # mlt:
274
+ # search_exists:
329
275
  # - GET
330
- # - /<<index>>/<<type>>/<<id>>/_mlt
276
+ # - "/<<index>>/<<type>>/<<id= ~ >>/_search/exists"
331
277
  #
332
278
  #
333
279
  # Usage:
334
- # Elastics.mlt :id => id, # required
335
- # :type => nil,
336
- # :index => "elastics_test_index"
280
+ # Elastics.search_exists :index => nil,
281
+ # :type => nil,
282
+ # :id => nil
337
283
  #
338
- def Elastics.mlt(*vars)
284
+ def self.search_exists(*vars)
339
285
  ## this is a stub, used for reference
340
286
  super
341
287
  end
342
288
 
289
+
343
290
  # ########## Elastics.validate ##########
344
- # --------------
291
+ # ------------------
345
292
  # Elastics::Template
346
293
  # ---
347
294
  # validate:
348
295
  # - GET
349
- # - /<<index>>/<<type>>/_validate/query
296
+ # - "/<<index>>/<<type>>/<<id= ~ >>/_validate/query"
350
297
  #
351
298
  #
352
299
  # Usage:
353
- # Elastics.validate :index => "elastics_test_index",
354
- # :type => nil
300
+ # Elastics.validate :index => nil,
301
+ # :type => nil,
302
+ # :id => nil
355
303
  #
356
- def Elastics.validate(*vars)
304
+ def self.validate(*vars)
357
305
  ## this is a stub, used for reference
358
306
  super
359
307
  end
360
308
 
309
+
361
310
  # ########## Elastics.explain ##########
362
- # --------------
311
+ # ------------------
363
312
  # Elastics::Template
364
313
  # ---
365
314
  # explain:
366
315
  # - GET
367
- # - /<<index>>/<<type>>/<<id>>/_explain
316
+ # - "/<<index>>/<<type>>/<<id= ~ >>/_explain"
368
317
  #
369
318
  #
370
319
  # Usage:
371
- # Elastics.explain :id => id, # required
320
+ # Elastics.explain :index => nil,
372
321
  # :type => nil,
373
- # :index => "elastics_test_index"
322
+ # :id => nil
374
323
  #
375
- def Elastics.explain(*vars)
324
+ def self.explain(*vars)
376
325
  ## this is a stub, used for reference
377
326
  super
378
327
  end
379
328
 
380
- # ########## Elastics.match_all ##########
381
- # --------------
382
- # Elastics::Template
383
- # ---
384
- # match_all:
385
- # - GET
386
- # - /<<index>>/<<type>>/_search
387
- # - query:
388
- # match_all: {}
389
- #
390
- #
391
- # Usage:
392
- # Elastics.match_all :index => "elastics_test_index",
393
- # :type => nil
394
- #
395
- def Elastics.match_all(*vars)
396
- ## this is a stub, used for reference
397
- super
398
- end
399
329
 
400
- # ########## Elastics.search_by_id ##########
401
- # --------------
330
+ # ########## Elastics.percolate ##########
331
+ # ------------------
402
332
  # Elastics::Template
403
333
  # ---
404
- # search_by_id:
334
+ # percolate:
405
335
  # - GET
406
- # - /<<index>>/<<type>>/_search
407
- # - query:
408
- # term:
409
- # _id: <<id>>
336
+ # - "/<<index>>/<<type>>/_percolate"
410
337
  #
411
338
  #
412
339
  # Usage:
413
- # Elastics.search_by_id :id => id, # required
414
- # :type => nil,
415
- # :index => "elastics_test_index",
340
+ # Elastics.percolate :index => nil,
341
+ # :type => nil
416
342
  #
417
- def Elastics.search_by_id(*vars)
343
+ def self.percolate(*vars)
418
344
  ## this is a stub, used for reference
419
345
  super
420
346
  end
421
347
 
422
- ######################## Indices API ########################
423
-
424
- # ########## Elastics.post_index_aliases ##########
425
- # --------------
426
- # Elastics::Template
427
- # ---
428
- # post_index_aliases:
429
- # - POST
430
- # - /_aliases
431
- # - actions: <<actions>>
432
- #
433
- #
434
- # Usage:
435
- # Elastics.post_index_aliases :actions => actions
436
- #
437
- def Elastics.post_index_aliases(*vars)
438
- ## this is a stub, used for reference
439
- super
440
- end
441
348
 
442
- # ########## Elastics.get_index_aliases ##########
443
- # --------------
349
+ # ########## Elastics.percolate_count ##########
350
+ # ------------------
444
351
  # Elastics::Template
445
352
  # ---
446
- # get_index_aliases:
353
+ # percolate_count:
447
354
  # - GET
448
- # - /<<index>>/_aliases
355
+ # - "/<<index>>/<<type>>/_percolate/count"
449
356
  #
450
357
  #
451
358
  # Usage:
452
- # Elastics.get_index_aliases :index => "elastics_test_index"
359
+ # Elastics.percolate_count :index => nil,
360
+ # :type => nil
453
361
  #
454
- def Elastics.get_index_aliases(*vars)
362
+ def self.percolate_count(*vars)
455
363
  ## this is a stub, used for reference
456
364
  super
457
365
  end
458
366
 
459
- # ########## Elastics.add_index_alias ##########
460
- # --------------
367
+
368
+ # ########## Elastics.put_percolator ##########
369
+ # ------------------
461
370
  # Elastics::Template
462
371
  # ---
463
- # add_index_alias:
372
+ # put_percolator:
464
373
  # - PUT
465
- # - /<<index>>/_alias/<<alias>>
374
+ # - "/<<index>>/.percolator/<<id>>"
466
375
  #
467
376
  #
468
377
  # Usage:
469
- # Elastics.add_index_alias :alias => alias, # required
470
- # :index => "elastics_test_index"
378
+ # Elastics.put_percolator :id => id, # required
379
+ # :index => nil
471
380
  #
472
- def Elastics.add_index_alias(*vars)
381
+ def self.put_percolator(*vars)
473
382
  ## this is a stub, used for reference
474
383
  super
475
384
  end
476
385
 
477
- # ########## Elastics.delete_index_alias ##########
478
- # --------------
386
+
387
+ # ########## Elastics.delete_percolator ##########
388
+ # ------------------
479
389
  # Elastics::Template
480
390
  # ---
481
- # delete_index_alias:
391
+ # delete_percolator:
482
392
  # - DELETE
483
- # - /<<index>>/_alias/<<alias>>
393
+ # - "/<<index>>/.percolator/<<id>>"
484
394
  #
485
395
  #
486
396
  # Usage:
487
- # Elastics.delete_index_alias :alias => alias, # required
488
- # :index => "elastics_test_index"
397
+ # Elastics.delete_percolator :id => id, # required
398
+ # :index => nil
489
399
  #
490
- def Elastics.delete_index_alias(*vars)
400
+ def self.delete_percolator(*vars)
491
401
  ## this is a stub, used for reference
492
402
  super
493
403
  end
494
404
 
495
- # ########## Elastics.get_index_alias ##########
496
- # --------------
405
+
406
+ # ########## Elastics.more_like_this ##########
407
+ # ------------------
497
408
  # Elastics::Template
498
409
  # ---
499
- # get_index_alias:
410
+ # more_like_this:
500
411
  # - GET
501
- # - /<<index>>/_alias/<<alias= '*' >>
412
+ # - "/<<index>>/<<type>>/<<id>>/_mlt"
502
413
  #
503
414
  #
504
415
  # Usage:
505
- # Elastics.get_index_alias :index => "elastics_test_index",
506
- # :alias => "*"
416
+ # Elastics.more_like_this :id => id, # required
417
+ # :type => nil,
418
+ # :index => nil
507
419
  #
508
- def Elastics.get_index_alias(*vars)
420
+ def self.more_like_this(*vars)
509
421
  ## this is a stub, used for reference
510
422
  super
511
423
  end
424
+ # also aliased by: :mlt
512
425
 
513
- # ########## Elastics.analyze_index ##########
514
- # --------------
426
+
427
+ # ########## Elastics.put_index ##########
428
+ # ------------------
515
429
  # Elastics::Template
516
430
  # ---
517
- # analyze_index:
518
- # - GET
519
- # - /<<index>>/_analyze
431
+ # put_index:
432
+ # - PUT
433
+ # - "/<<index>>"
434
+ # - settings:
435
+ # number_of_shards: "<<number_of_shards= 5 >>"
436
+ # number_of_replicas: "<<number_of_replicas= 1 >>"
520
437
  #
521
438
  #
522
439
  # Usage:
523
- # Elastics.analyze_index :index => "elastics_test_index"
440
+ # Elastics.put_index :index => nil,
441
+ # :number_of_shards => 5,
442
+ # :number_of_replicas => 1
524
443
  #
525
- def Elastics.analyze_index(*vars)
444
+ def self.put_index(*vars)
526
445
  ## this is a stub, used for reference
527
446
  super
528
447
  end
448
+ # also aliased by: :create_index
529
449
 
530
- # ########## Elastics.put_index ##########
531
- # --------------
450
+
451
+ # ########## Elastics.post_index ##########
452
+ # ------------------
532
453
  # Elastics::Template
533
454
  # ---
534
- # put_index:
535
- # - PUT
536
- # - /<<index>>
455
+ # post_index:
456
+ # - POST
457
+ # - "/<<index>>"
537
458
  # - settings:
538
- # number_of_shards: <<number_of_shards= 5 >>
539
- # number_of_replicas: <<number_of_replicas= 1 >>
459
+ # number_of_shards: "<<number_of_shards= 5 >>"
460
+ # number_of_replicas: "<<number_of_replicas= 1 >>"
540
461
  #
541
462
  #
542
463
  # Usage:
543
- # Elastics.put_index :index => "elastics_test_index",
544
- # :number_of_shards => 5,
545
- # :number_of_replicas => 1
464
+ # Elastics.post_index :index => nil,
465
+ # :number_of_shards => 5,
466
+ # :number_of_replicas => 1
546
467
  #
547
- def Elastics.put_index(*vars)
468
+ def self.post_index(*vars)
548
469
  ## this is a stub, used for reference
549
470
  super
550
471
  end
551
472
 
552
- # ########## Elastics.create_index ##########
553
- # --------------
473
+
474
+ # ########## Elastics.delete_index ##########
475
+ # ------------------
554
476
  # Elastics::Template
555
477
  # ---
556
- # create_index:
557
- # - PUT
558
- # - /<<index>>
559
- # - settings:
560
- # number_of_shards: <<number_of_shards= 5 >>
561
- # number_of_replicas: <<number_of_replicas= 1 >>
478
+ # delete_index:
479
+ # - DELETE
480
+ # - "/<<index>>"
562
481
  #
563
482
  #
564
483
  # Usage:
565
- # Elastics.create_index :index => "elastics_test_index",
566
- # :number_of_shards => 5,
567
- # :number_of_replicas => 1
484
+ # Elastics.delete_index :index => nil
568
485
  #
569
- def Elastics.create_index(*vars)
486
+ def self.delete_index(*vars)
570
487
  ## this is a stub, used for reference
571
488
  super
572
489
  end
573
490
 
574
- # ########## Elastics.post_index ##########
575
- # --------------
491
+
492
+ # ########## Elastics.get_index ##########
493
+ # ------------------
576
494
  # Elastics::Template
577
495
  # ---
578
- # post_index:
579
- # - POST
580
- # - /<<index>>
581
- # - settings:
582
- # number_of_shards: <<number_of_shards= 5 >>
583
- # number_of_replicas: <<number_of_replicas= 1 >>
496
+ # get_index:
497
+ # - GET
498
+ # - "/<<index>>/<<features= ~ >>"
584
499
  #
585
500
  #
586
501
  # Usage:
587
- # Elastics.post_index :index => "elastics_test_index",
588
- # :number_of_shards => 5,
589
- # :number_of_replicas => 1
502
+ # Elastics.get_index :index => nil,
503
+ # :features => nil
590
504
  #
591
- def Elastics.post_index(*vars)
505
+ def self.get_index(*vars)
592
506
  ## this is a stub, used for reference
593
507
  super
594
508
  end
595
509
 
596
- # ########## Elastics.delete_index ##########
597
- # --------------
510
+
511
+ # ########## Elastics.indices_exists ##########
512
+ # ------------------
598
513
  # Elastics::Template
599
514
  # ---
600
- # delete_index:
601
- # - DELETE
602
- # - /<<index>>
515
+ # indices_exists:
516
+ # - HEAD
517
+ # - "/<<index>>"
603
518
  #
604
519
  #
605
520
  # Usage:
606
- # Elastics.delete_index :index => "elastics_test_index"
521
+ # Elastics.indices_exists :index => nil
607
522
  #
608
- def Elastics.delete_index(*vars)
523
+ def self.indices_exists(*vars)
609
524
  ## this is a stub, used for reference
610
525
  super
611
526
  end
527
+ # also aliased by: :index_exists, :exist?
528
+
612
529
 
613
530
  # ########## Elastics.close_index ##########
614
- # --------------
531
+ # ------------------
615
532
  # Elastics::Template
616
533
  # ---
617
534
  # close_index:
618
535
  # - POST
619
- # - /<<index>>/_close
536
+ # - "/<<index>>/_close"
620
537
  #
621
538
  #
622
539
  # Usage:
623
- # Elastics.close_index :index => "elastics_test_index"
540
+ # Elastics.close_index :index => nil
624
541
  #
625
- def Elastics.close_index(*vars)
542
+ def self.close_index(*vars)
626
543
  ## this is a stub, used for reference
627
544
  super
628
545
  end
629
546
 
547
+
630
548
  # ########## Elastics.open_index ##########
631
- # --------------
549
+ # ------------------
632
550
  # Elastics::Template
633
551
  # ---
634
552
  # open_index:
635
553
  # - POST
636
- # - /<<index>>/_close
554
+ # - "/<<index>>/_open"
637
555
  #
638
556
  #
639
557
  # Usage:
640
- # Elastics.open_index :index => "elastics_test_index"
558
+ # Elastics.open_index :index => nil
641
559
  #
642
- def Elastics.open_index(*vars)
560
+ def self.open_index(*vars)
643
561
  ## this is a stub, used for reference
644
562
  super
645
563
  end
646
564
 
647
- # ########## Elastics.get_index_settings ##########
648
- # --------------
565
+
566
+ # ########## Elastics.put_index_mapping ##########
567
+ # ------------------
649
568
  # Elastics::Template
650
569
  # ---
651
- # get_index_settings:
652
- # - GET
653
- # - /<<index>>/_settings
570
+ # put_index_mapping:
571
+ # - PUT
572
+ # - "/<<index>>/_mapping/<<type>>"
573
+ # - "<<type>>":
574
+ # properties: "<<properties>>"
654
575
  #
655
576
  #
656
577
  # Usage:
657
- # Elastics.get_index_settings :index => "elastics_test_index"
578
+ # Elastics.put_index_mapping :properties => properties, # required
579
+ # :type => nil,
580
+ # :index => nil
658
581
  #
659
- def Elastics.get_index_settings(*vars)
582
+ def self.put_index_mapping(*vars)
660
583
  ## this is a stub, used for reference
661
584
  super
662
585
  end
586
+ # also aliased by: :put_mapping
663
587
 
664
- # ########## Elastics.get_settings ##########
665
- # --------------
588
+
589
+ # ########## Elastics.get_index_mapping ##########
590
+ # ------------------
666
591
  # Elastics::Template
667
592
  # ---
668
- # get_settings:
593
+ # get_index_mapping:
669
594
  # - GET
670
- # - /<<index>>/_settings
595
+ # - "/<<index>>/_mapping/<<type>>"
671
596
  #
672
597
  #
673
598
  # Usage:
674
- # Elastics.get_settings :index => "elastics_test_index"
599
+ # Elastics.get_index_mapping :index => nil,
600
+ # :type => nil
675
601
  #
676
- def Elastics.get_settings(*vars)
602
+ def self.get_index_mapping(*vars)
677
603
  ## this is a stub, used for reference
678
604
  super
679
605
  end
680
606
 
681
- # ########## Elastics.put_index_settings ##########
607
+
608
+ # ########## Elastics.get_field_mapping ##########
682
609
  # ------------------
683
610
  # Elastics::Template
684
611
  # ---
685
- # put_index_settings:
686
- # - PUT
687
- # - /<<index>>/_settings
612
+ # get_field_mapping:
613
+ # - GET
614
+ # - "/<<index>>/_mapping/<<type>>/field/<<field>>"
688
615
  #
689
616
  #
690
617
  # Usage:
691
- # Elastics.put_index_settings :index => "elastics_test_index"
618
+ # Elastics.get_field_mapping :field => field, # required
619
+ # :type => nil,
620
+ # :index => nil
692
621
  #
693
- def Elastics.put_index_settings(*vars)
622
+ def self.get_field_mapping(*vars)
694
623
  ## this is a stub, used for reference
695
624
  super
696
625
  end
697
626
 
698
- # ########## Elastics.get_index_mapping ##########
699
- # --------------
627
+
628
+ # ########## Elastics.types_exists ##########
629
+ # ------------------
700
630
  # Elastics::Template
701
631
  # ---
702
- # get_index_mapping:
703
- # - GET
704
- # - /<<index>>/<<type>>/_mapping
632
+ # types_exists:
633
+ # - HEAD
634
+ # - "/<<index>>/<<type>>"
705
635
  #
706
636
  #
707
637
  # Usage:
708
- # Elastics.get_index_mapping :index => "elastics_test_index",
709
- # :type => nil
638
+ # Elastics.types_exists :index => nil,
639
+ # :type => nil
710
640
  #
711
- def Elastics.get_index_mapping(*vars)
641
+ def self.types_exists(*vars)
712
642
  ## this is a stub, used for reference
713
643
  super
714
644
  end
645
+ # also aliased by: :type_exists
715
646
 
716
- # ########## Elastics.get_mapping ##########
717
- # --------------
647
+
648
+ # ########## Elastics.delete_index_mapping ##########
649
+ # ------------------
718
650
  # Elastics::Template
719
651
  # ---
720
- # get_mapping:
721
- # - GET
722
- # - /<<index>>/<<type>>/_mapping
652
+ # delete_index_mapping:
653
+ # - DELETE
654
+ # - "/<<index>>/<<type>>"
723
655
  #
724
656
  #
725
657
  # Usage:
726
- # Elastics.get_mapping :index => "elastics_test_index",
727
- # :type => nil
658
+ # Elastics.delete_index_mapping :index => nil,
659
+ # :type => nil
728
660
  #
729
- def Elastics.get_mapping(*vars)
661
+ def self.delete_index_mapping(*vars)
730
662
  ## this is a stub, used for reference
731
663
  super
732
664
  end
733
665
 
734
- # ########## Elastics.put_index_mapping ##########
735
- # --------------
666
+
667
+ # ########## Elastics.post_index_aliases ##########
668
+ # ------------------
736
669
  # Elastics::Template
737
670
  # ---
738
- # put_index_mapping:
739
- # - PUT
740
- # - /<<index>>/<<type>>/_mapping
741
- # - <<type>>:
742
- # properties: <<properties>>
671
+ # post_index_aliases:
672
+ # - POST
673
+ # - "/_aliases"
674
+ # - actions: "<<actions>>"
743
675
  #
744
676
  #
745
677
  # Usage:
746
- # Elastics.put_index_mapping :properties => properties, # required
747
- # :type => nil,
748
- # :index => "elastics_test_index"
678
+ # Elastics.post_index_aliases :actions => actions # required
749
679
  #
750
- def Elastics.put_index_mapping(*vars)
680
+ def self.post_index_aliases(*vars)
751
681
  ## this is a stub, used for reference
752
682
  super
753
683
  end
754
684
 
755
- # ########## Elastics.put_mapping ##########
756
- # --------------
685
+
686
+ # ########## Elastics.get_index_aliases ##########
687
+ # ------------------
757
688
  # Elastics::Template
758
689
  # ---
759
- # put_mapping:
760
- # - PUT
761
- # - /<<index>>/<<type>>/_mapping
762
- # - <<type>>:
763
- # properties: <<properties>>
690
+ # get_index_aliases:
691
+ # - GET
692
+ # - "/<<index>>/_aliases"
764
693
  #
765
694
  #
766
695
  # Usage:
767
- # Elastics.put_mapping :properties => properties, # required
768
- # :type => nil,
769
- # :index => "elastics_test_index"
696
+ # Elastics.get_index_aliases :index => nil
770
697
  #
771
- def Elastics.put_mapping(*vars)
698
+ def self.get_index_aliases(*vars)
772
699
  ## this is a stub, used for reference
773
700
  super
774
701
  end
775
702
 
776
- # ########## Elastics.delete_index_mapping ##########
777
- # --------------
703
+
704
+ # ########## Elastics.put_index_alias ##########
705
+ # ------------------
778
706
  # Elastics::Template
779
707
  # ---
780
- # delete_index_mapping:
781
- # - DELETE
782
- # - /<<index>>/<<type>>
708
+ # put_index_alias:
709
+ # - PUT
710
+ # - "/<<index>>/_alias/<<alias>>"
783
711
  #
784
712
  #
785
713
  # Usage:
786
- # Elastics.delete_index_mapping :index => "elastics_test_index",
787
- # :type => nil
714
+ # Elastics.put_index_alias :alias => alias, # required
715
+ # :index => nil
788
716
  #
789
- def Elastics.delete_index_mapping(*vars)
717
+ def self.put_index_alias(*vars)
790
718
  ## this is a stub, used for reference
791
719
  super
792
720
  end
793
721
 
794
- # ########## Elastics.delete_mapping ##########
795
- # --------------
722
+
723
+ # ########## Elastics.delete_index_alias ##########
724
+ # ------------------
796
725
  # Elastics::Template
797
726
  # ---
798
- # delete_mapping:
727
+ # delete_index_alias:
799
728
  # - DELETE
800
- # - /<<index>>/<<type>>
729
+ # - "/<<index>>/_alias/<<alias>>"
801
730
  #
802
731
  #
803
732
  # Usage:
804
- # Elastics.delete_mapping :index => "elastics_test_index",
805
- # :type => nil
733
+ # Elastics.delete_index_alias :alias => alias, # required
734
+ # :index => nil
806
735
  #
807
- def Elastics.delete_mapping(*vars)
736
+ def self.delete_index_alias(*vars)
808
737
  ## this is a stub, used for reference
809
738
  super
810
739
  end
811
740
 
812
- # ########## Elastics.refresh_index ##########
813
- # --------------
741
+
742
+ # ########## Elastics.get_index_alias ##########
743
+ # ------------------
814
744
  # Elastics::Template
815
745
  # ---
816
- # refresh_index:
817
- # - POST
818
- # - /<<index>>/_refresh
746
+ # get_index_alias:
747
+ # - GET
748
+ # - "/<<index>>/_alias/<<alias= '*' >>"
819
749
  #
820
750
  #
821
751
  # Usage:
822
- # Elastics.refresh_index :index => "elastics_test_index"
752
+ # Elastics.get_index_alias :index => nil,
753
+ # :alias => "*"
823
754
  #
824
- def Elastics.refresh_index(*vars)
755
+ def self.get_index_alias(*vars)
825
756
  ## this is a stub, used for reference
826
757
  super
827
758
  end
828
759
 
829
- # ########## Elastics.optimize_index ##########
830
- # --------------
760
+
761
+ # ########## Elastics.update_index_settings ##########
762
+ # ------------------
831
763
  # Elastics::Template
832
764
  # ---
833
- # optimize_index:
834
- # - POST
835
- # - /<<index>>/_optimize
765
+ # update_index_settings:
766
+ # - PUT
767
+ # - "/<<index>>/_settings"
836
768
  #
837
769
  #
838
770
  # Usage:
839
- # Elastics.optimize_index :index => "elastics_test_index"
771
+ # Elastics.update_index_settings :index => nil
840
772
  #
841
- def Elastics.optimize_index(*vars)
773
+ def self.update_index_settings(*vars)
842
774
  ## this is a stub, used for reference
843
775
  super
844
776
  end
777
+ # also aliased by: :put_index_settings
845
778
 
846
- # ########## Elastics.flush_index ##########
847
- # --------------
779
+
780
+ # ########## Elastics.get_index_settings ##########
781
+ # ------------------
848
782
  # Elastics::Template
849
783
  # ---
850
- # flush_index:
851
- # - POST
852
- # - /<<index>>/_flush
784
+ # get_index_settings:
785
+ # - GET
786
+ # - "/<<index>>/_settings"
853
787
  #
854
788
  #
855
789
  # Usage:
856
- # Elastics.flush_index :index => "elastics_test_index"
790
+ # Elastics.get_index_settings :index => nil
857
791
  #
858
- def Elastics.flush_index(*vars)
792
+ def self.get_index_settings(*vars)
859
793
  ## this is a stub, used for reference
860
794
  super
861
795
  end
862
796
 
863
- # ########## Elastics.gateway_snapshot ##########
864
- # --------------
797
+
798
+ # ########## Elastics.get_settings ##########
799
+ # ------------------
865
800
  # Elastics::Template
866
801
  # ---
867
- # gateway_snapshot:
868
- # - POST
869
- # - /<<index>>/_gateway/snapshot
802
+ # get_settings:
803
+ # - GET
804
+ # - "/<<index>>/_settings"
870
805
  #
871
806
  #
872
807
  # Usage:
873
- # Elastics.gateway_snapshot :index => "elastics_test_index"
808
+ # Elastics.get_settings :index => nil
874
809
  #
875
- def Elastics.gateway_snapshot(*vars)
810
+ def self.get_settings(*vars)
876
811
  ## this is a stub, used for reference
877
812
  super
878
813
  end
879
814
 
880
- # ########## Elastics.update_index_settings ##########
881
- # --------------
815
+
816
+ # ########## Elastics.analyze_index ##########
817
+ # ------------------
882
818
  # Elastics::Template
883
819
  # ---
884
- # update_index_settings:
885
- # - PUT
886
- # - /<<index>>/_settings
820
+ # analyze_index:
821
+ # - GET
822
+ # - "/<<index>>/_analyze"
887
823
  #
888
824
  #
889
825
  # Usage:
890
- # Elastics.update_index_settings :index => "elastics_test_index"
826
+ # Elastics.analyze_index :index => nil
891
827
  #
892
- def Elastics.update_index_settings(*vars)
828
+ def self.analyze_index(*vars)
893
829
  ## this is a stub, used for reference
894
830
  super
895
831
  end
896
832
 
833
+
897
834
  # ########## Elastics.put_index_template ##########
898
- # --------------
835
+ # ------------------
899
836
  # Elastics::Template
900
837
  # ---
901
838
  # put_index_template:
902
839
  # - PUT
903
- # - /_template/<<template>>
840
+ # - "/_template/<<template>>"
904
841
  #
905
842
  #
906
843
  # Usage:
907
844
  # Elastics.put_index_template :template => template # required
908
845
  #
909
- def Elastics.put_index_template(*vars)
846
+ def self.put_index_template(*vars)
910
847
  ## this is a stub, used for reference
911
848
  super
912
849
  end
913
850
 
851
+
914
852
  # ########## Elastics.delete_index_template ##########
915
- # --------------
853
+ # ------------------
916
854
  # Elastics::Template
917
855
  # ---
918
856
  # delete_index_template:
919
857
  # - DELETE
920
- # - /_template/<<template>>
858
+ # - "/_template/<<template>>"
921
859
  #
922
860
  #
923
861
  # Usage:
924
862
  # Elastics.delete_index_template :template => template # required
925
863
  #
926
- def Elastics.delete_index_template(*vars)
864
+ def self.delete_index_template(*vars)
927
865
  ## this is a stub, used for reference
928
866
  super
929
867
  end
930
868
 
869
+
931
870
  # ########## Elastics.get_index_template ##########
932
- # --------------
871
+ # ------------------
933
872
  # Elastics::Template
934
873
  # ---
935
874
  # get_index_template:
936
875
  # - GET
937
- # - /_template/<<template>>
876
+ # - "/_template/<<template= ~ >>"
877
+ #
878
+ #
879
+ # Usage:
880
+ # Elastics.get_index_template :template => nil
881
+ #
882
+ def self.get_index_template(*vars)
883
+ ## this is a stub, used for reference
884
+ super
885
+ end
886
+
887
+
888
+ # ########## Elastics.index_template_exists ##########
889
+ # ------------------
890
+ # Elastics::Template
891
+ # ---
892
+ # index_template_exists:
893
+ # - HEAD
894
+ # - "/_template/<<template>>"
938
895
  #
939
896
  #
940
897
  # Usage:
941
- # Elastics.get_index_template :template => template # required
898
+ # Elastics.index_template_exists :template => template # required
942
899
  #
943
- def Elastics.get_index_template(*vars)
900
+ def self.index_template_exists(*vars)
944
901
  ## this is a stub, used for reference
945
902
  super
946
903
  end
947
904
 
905
+
948
906
  # ########## Elastics.put_index_warmer ##########
949
- # --------------
907
+ # ------------------
950
908
  # Elastics::Template
951
909
  # ---
952
910
  # put_index_warmer:
953
911
  # - PUT
954
- # - /<<index>>/<<type>>/_warmer/<<warmer>>
912
+ # - "/<<index>>/<<type>>/_warmer/<<warmer>>"
955
913
  #
956
914
  #
957
915
  # Usage:
958
916
  # Elastics.put_index_warmer :warmer => warmer, # required
959
917
  # :type => nil,
960
- # :index => "elastics_test_index"
918
+ # :index => nil
961
919
  #
962
- def Elastics.put_index_warmer(*vars)
920
+ def self.put_index_warmer(*vars)
963
921
  ## this is a stub, used for reference
964
922
  super
965
923
  end
966
924
 
925
+
967
926
  # ########## Elastics.delete_index_warmer ##########
968
- # --------------
927
+ # ------------------
969
928
  # Elastics::Template
970
929
  # ---
971
930
  # delete_index_warmer:
972
931
  # - DELETE
973
- # - /<<index>>/_warmer/<<warmer= ~ >>
932
+ # - "/<<index>>/_warmer/<<warmer>>"
974
933
  #
975
934
  #
976
935
  # Usage:
977
- # Elastics.delete_index_warmer :index => "elastics_test_index",
978
- # :warmer => nil
936
+ # Elastics.delete_index_warmer :warmer => warmer, # required
937
+ # :index => nil
979
938
  #
980
- def Elastics.delete_index_warmer(*vars)
939
+ def self.delete_index_warmer(*vars)
981
940
  ## this is a stub, used for reference
982
941
  super
983
942
  end
984
943
 
944
+
985
945
  # ########## Elastics.get_index_warmer ##########
986
- # --------------
946
+ # ------------------
987
947
  # Elastics::Template
988
948
  # ---
989
949
  # get_index_warmer:
990
950
  # - GET
991
- # - /<<index>>/_warmer/<<warmer= ~ >>
951
+ # - "/<<index>>/_warmer/<<warmer= ~ >>"
992
952
  #
993
953
  #
994
954
  # Usage:
995
- # Elastics.get_index_warmer :index => "elastics_test_index",
955
+ # Elastics.get_index_warmer :index => nil,
996
956
  # :warmer => nil
997
957
  #
998
- def Elastics.get_index_warmer(*vars)
958
+ def self.get_index_warmer(*vars)
999
959
  ## this is a stub, used for reference
1000
960
  super
1001
961
  end
1002
962
 
1003
- # ########## Elastics.index_stats ##########
1004
- # --------------
963
+
964
+ # ########## Elastics.index_status ##########
965
+ # ------------------
1005
966
  # Elastics::Template
1006
967
  # ---
1007
- # index_stats:
968
+ # index_status:
1008
969
  # - GET
1009
- # - /<<index>>/_stats/<<endpoint= ~ >>/<<names= ~ >>
970
+ # - "/<<index>>/_status"
1010
971
  #
1011
972
  #
1012
973
  # Usage:
1013
- # Elastics.index_stats :index => "elastics_test_index",
1014
- # :endpoint => nil,
1015
- # :names => nil
974
+ # Elastics.index_status :index => nil
1016
975
  #
1017
- def Elastics.index_stats(*vars)
976
+ def self.index_status(*vars)
1018
977
  ## this is a stub, used for reference
1019
978
  super
1020
979
  end
1021
980
 
1022
- # ########## Elastics.stats ##########
1023
- # --------------
981
+
982
+ # ########## Elastics.index_stats ##########
983
+ # ------------------
1024
984
  # Elastics::Template
1025
985
  # ---
1026
- # stats:
986
+ # index_stats:
1027
987
  # - GET
1028
- # - /<<index>>/_stats/<<endpoint= ~ >>/<<names= ~ >>
988
+ # - "/<<index>>/_stats/<<stats= ~ >>"
1029
989
  #
1030
990
  #
1031
991
  # Usage:
1032
- # Elastics.stats :index => "elastics_test_index",
1033
- # :endpoint => nil,
1034
- # :names => nil
992
+ # Elastics.index_stats :index => nil,
993
+ # :stats => nil
1035
994
  #
1036
- def Elastics.stats(*vars)
995
+ def self.index_stats(*vars)
1037
996
  ## this is a stub, used for reference
1038
997
  super
1039
998
  end
1040
999
 
1041
- # ########## Elastics.index_status ##########
1042
- # --------------
1000
+
1001
+ # ########## Elastics.index_segments ##########
1002
+ # ------------------
1043
1003
  # Elastics::Template
1044
1004
  # ---
1045
- # index_status:
1005
+ # index_segments:
1046
1006
  # - GET
1047
- # - /<<index>>/_status
1007
+ # - "/<<index>>/_segments"
1048
1008
  #
1049
1009
  #
1050
1010
  # Usage:
1051
- # Elastics.index_status :index => "elastics_test_index"
1011
+ # Elastics.index_segments :index => nil
1052
1012
  #
1053
- def Elastics.index_status(*vars)
1013
+ def self.index_segments(*vars)
1054
1014
  ## this is a stub, used for reference
1055
1015
  super
1056
1016
  end
1057
1017
 
1058
- # ########## Elastics.index_segments ##########
1059
- # --------------
1018
+
1019
+ # ########## Elastics.index_recovery ##########
1020
+ # ------------------
1060
1021
  # Elastics::Template
1061
1022
  # ---
1062
- # index_segments:
1023
+ # index_recovery:
1063
1024
  # - GET
1064
- # - /<<index>>/_segments
1025
+ # - "/<<index>>/_recovery"
1065
1026
  #
1066
1027
  #
1067
1028
  # Usage:
1068
- # Elastics.index_segments :index => "elastics_test_index"
1029
+ # Elastics.index_recovery :index => nil
1069
1030
  #
1070
- def Elastics.index_segments(*vars)
1031
+ def self.index_recovery(*vars)
1071
1032
  ## this is a stub, used for reference
1072
1033
  super
1073
1034
  end
1074
1035
 
1036
+
1075
1037
  # ########## Elastics.index_clearcache ##########
1076
- # --------------
1038
+ # ------------------
1077
1039
  # Elastics::Template
1078
1040
  # ---
1079
1041
  # index_clearcache:
1080
1042
  # - POST
1081
- # - /<<index>>/_cache/clear
1043
+ # - "/<<index>>/_cache/clear"
1082
1044
  #
1083
1045
  #
1084
1046
  # Usage:
1085
- # Elastics.index_clearcache :index => "elastics_test_index"
1047
+ # Elastics.index_clearcache :index => nil
1086
1048
  #
1087
- def Elastics.index_clearcache(*vars)
1049
+ def self.index_clearcache(*vars)
1088
1050
  ## this is a stub, used for reference
1089
1051
  super
1090
1052
  end
1091
1053
 
1092
- # ########## Elastics.indices_exists ##########
1093
- # --------------
1054
+
1055
+ # ########## Elastics.flush_index ##########
1056
+ # ------------------
1094
1057
  # Elastics::Template
1095
1058
  # ---
1096
- # indices_exists:
1097
- # - HEAD
1098
- # - /<<index>>
1059
+ # flush_index:
1060
+ # - POST
1061
+ # - "/<<index>>/_flush"
1099
1062
  #
1100
1063
  #
1101
1064
  # Usage:
1102
- # Elastics.indices_exists :index => "elastics_test_index"
1065
+ # Elastics.flush_index :index => nil
1103
1066
  #
1104
- def Elastics.indices_exists(*vars)
1067
+ def self.flush_index(*vars)
1105
1068
  ## this is a stub, used for reference
1106
1069
  super
1107
1070
  end
1108
1071
 
1109
- # ########## Elastics.exist? ##########
1110
- # --------------
1072
+
1073
+ # ########## Elastics.synced_flush_index ##########
1074
+ # ------------------
1111
1075
  # Elastics::Template
1112
1076
  # ---
1113
- # exist?:
1114
- # - HEAD
1115
- # - /<<index>>
1077
+ # synced_flush_index:
1078
+ # - POST
1079
+ # - "/<<index>>/_flush/synced"
1116
1080
  #
1117
1081
  #
1118
1082
  # Usage:
1119
- # Elastics.exist? :index => "elastics_test_index"
1083
+ # Elastics.synced_flush_index :index => nil
1120
1084
  #
1121
- def Elastics.exist?(*vars)
1085
+ def self.synced_flush_index(*vars)
1122
1086
  ## this is a stub, used for reference
1123
1087
  super
1124
1088
  end
1125
1089
 
1126
- # ########## Elastics.types_exists ##########
1127
- # --------------
1090
+
1091
+ # ########## Elastics.refresh_index ##########
1092
+ # ------------------
1128
1093
  # Elastics::Template
1129
1094
  # ---
1130
- # types_exists:
1131
- # - HEAD
1132
- # - /<<index>>/<<type>>
1095
+ # refresh_index:
1096
+ # - POST
1097
+ # - "/<<index>>/_refresh"
1133
1098
  #
1134
1099
  #
1135
1100
  # Usage:
1136
- # Elastics.types_exists :index => "elastics_test_index",
1137
- # :type => nil
1101
+ # Elastics.refresh_index :index => nil
1138
1102
  #
1139
- def Elastics.types_exists(*vars)
1103
+ def self.refresh_index(*vars)
1140
1104
  ## this is a stub, used for reference
1141
1105
  super
1142
1106
  end
1143
1107
 
1144
1108
 
1145
- ######################## Cluster API ########################
1109
+ # ########## Elastics.optimize_index ##########
1110
+ # ------------------
1111
+ # Elastics::Template
1112
+ # ---
1113
+ # optimize_index:
1114
+ # - POST
1115
+ # - "/<<index>>/_optimize"
1116
+ #
1117
+ #
1118
+ # Usage:
1119
+ # Elastics.optimize_index :index => nil
1120
+ #
1121
+ def self.optimize_index(*vars)
1122
+ ## this is a stub, used for reference
1123
+ super
1124
+ end
1125
+
1126
+
1127
+ # ########## Elastics.upgrade_index ##########
1128
+ # ------------------
1129
+ # Elastics::Template
1130
+ # ---
1131
+ # upgrade_index:
1132
+ # - POST
1133
+ # - "/<<index>>/_upgrade"
1134
+ #
1135
+ #
1136
+ # Usage:
1137
+ # Elastics.upgrade_index :index => nil
1138
+ #
1139
+ def self.upgrade_index(*vars)
1140
+ ## this is a stub, used for reference
1141
+ super
1142
+ end
1143
+
1146
1144
 
1147
1145
  # ########## Elastics.cluster_health ##########
1148
- # --------------
1146
+ # ------------------
1149
1147
  # Elastics::Template
1150
1148
  # ---
1151
1149
  # cluster_health:
1152
1150
  # - GET
1153
- # - /_cluster/health/<<index>>
1151
+ # - "/_cluster/health/<<index>>"
1154
1152
  #
1155
1153
  #
1156
1154
  # Usage:
1157
- # Elastics.cluster_health :index => "elastics_test_index"
1155
+ # Elastics.cluster_health :index => nil
1158
1156
  #
1159
- def Elastics.cluster_health(*vars)
1157
+ def self.cluster_health(*vars)
1160
1158
  ## this is a stub, used for reference
1161
1159
  super
1162
1160
  end
1163
1161
 
1162
+
1164
1163
  # ########## Elastics.cluster_state ##########
1165
- # --------------
1164
+ # ------------------
1166
1165
  # Elastics::Template
1167
1166
  # ---
1168
1167
  # cluster_state:
1169
1168
  # - GET
1170
- # - /_cluster/state
1169
+ # - "/_cluster/state/<<metrics= _all >>/<<index>>"
1171
1170
  #
1172
1171
  #
1173
1172
  # Usage:
1174
- # Elastics.cluster_state
1173
+ # Elastics.cluster_state :metrics => "_all",
1174
+ # :index => nil
1175
1175
  #
1176
- def Elastics.cluster_state(*vars)
1176
+ def self.cluster_state(*vars)
1177
1177
  ## this is a stub, used for reference
1178
1178
  super
1179
1179
  end
1180
1180
 
1181
- # ########## Elastics.put_cluster_settings ##########
1182
- # --------------
1181
+
1182
+ # ########## Elastics.cluster_stats ##########
1183
+ # ------------------
1183
1184
  # Elastics::Template
1184
1185
  # ---
1185
- # put_cluster_settings:
1186
- # - PUT
1187
- # - /_cluster/settings
1186
+ # cluster_stats:
1187
+ # - GET
1188
+ # - "/_cluster/stats"
1188
1189
  #
1189
1190
  #
1190
1191
  # Usage:
1191
- # Elastics.put_cluster_settings
1192
+ # Elastics.cluster_stats
1192
1193
  #
1193
- def Elastics.put_cluster_settings(*vars)
1194
+ def self.cluster_stats(*vars)
1194
1195
  ## this is a stub, used for reference
1195
1196
  super
1196
1197
  end
1197
1198
 
1198
- # ########## Elastics.get_cluster_settings ##########
1199
- # --------------
1199
+
1200
+ # ########## Elastics.cluster_pending_tasks ##########
1201
+ # ------------------
1200
1202
  # Elastics::Template
1201
1203
  # ---
1202
- # get_cluster_settings:
1204
+ # cluster_pending_tasks:
1203
1205
  # - GET
1204
- # - /_cluster/settings
1206
+ # - "/_cluster/pending_tasks"
1205
1207
  #
1206
1208
  #
1207
1209
  # Usage:
1208
- # Elastics.get_cluster_settings
1210
+ # Elastics.cluster_pending_tasks
1209
1211
  #
1210
- def Elastics.get_cluster_settings(*vars)
1212
+ def self.cluster_pending_tasks(*vars)
1211
1213
  ## this is a stub, used for reference
1212
1214
  super
1213
1215
  end
1214
1216
 
1215
- # ########## Elastics.cluster_nodes_info ##########
1216
- # --------------
1217
+
1218
+ # ########## Elastics.cluster_reroute ##########
1219
+ # ------------------
1217
1220
  # Elastics::Template
1218
1221
  # ---
1219
- # cluster_nodes_info:
1222
+ # cluster_reroute:
1223
+ # - POST
1224
+ # - "/_cluster/reroute"
1225
+ #
1226
+ #
1227
+ # Usage:
1228
+ # Elastics.cluster_reroute
1229
+ #
1230
+ def self.cluster_reroute(*vars)
1231
+ ## this is a stub, used for reference
1232
+ super
1233
+ end
1234
+
1235
+
1236
+ # ########## Elastics.put_cluster_settings ##########
1237
+ # ------------------
1238
+ # Elastics::Template
1239
+ # ---
1240
+ # put_cluster_settings:
1241
+ # - PUT
1242
+ # - "/_cluster/settings"
1243
+ #
1244
+ #
1245
+ # Usage:
1246
+ # Elastics.put_cluster_settings
1247
+ #
1248
+ def self.put_cluster_settings(*vars)
1249
+ ## this is a stub, used for reference
1250
+ super
1251
+ end
1252
+
1253
+
1254
+ # ########## Elastics.get_cluster_settings ##########
1255
+ # ------------------
1256
+ # Elastics::Template
1257
+ # ---
1258
+ # get_cluster_settings:
1220
1259
  # - GET
1221
- # - /_nodes/<<nodes= ~ >>/<<endpoint= ~ >>
1260
+ # - "/_cluster/settings"
1222
1261
  #
1223
1262
  #
1224
1263
  # Usage:
1225
- # Elastics.cluster_nodes_info :nodes => nil,
1226
- # :endpoint => nil
1264
+ # Elastics.get_cluster_settings
1227
1265
  #
1228
- def Elastics.cluster_nodes_info(*vars)
1266
+ def self.get_cluster_settings(*vars)
1229
1267
  ## this is a stub, used for reference
1230
1268
  super
1231
1269
  end
1232
1270
 
1271
+
1233
1272
  # ########## Elastics.cluster_nodes_stats ##########
1234
- # --------------
1273
+ # ------------------
1235
1274
  # Elastics::Template
1236
1275
  # ---
1237
1276
  # cluster_nodes_stats:
1238
1277
  # - GET
1239
- # - /_nodes/<<nodes= ~ >>/stats/<<endpoint= ~ >>
1278
+ # - "/_nodes/<<nodes= ~ >>/stats/<<stats= ~ >>"
1240
1279
  #
1241
1280
  #
1242
1281
  # Usage:
1243
- # Elastics.cluster_nodes_stats :nodes => nil,
1244
- # :endpoint => nil
1282
+ # Elastics.cluster_nodes_stats :nodes => nil,
1283
+ # :stats => nil
1245
1284
  #
1246
- def Elastics.cluster_nodes_stats(*vars)
1285
+ def self.cluster_nodes_stats(*vars)
1247
1286
  ## this is a stub, used for reference
1248
1287
  super
1249
1288
  end
1250
1289
 
1251
- # ########## Elastics.cluster_nodes_shutdown ##########
1252
- # --------------
1290
+
1291
+ # ########## Elastics.cluster_nodes_info ##########
1292
+ # ------------------
1253
1293
  # Elastics::Template
1254
1294
  # ---
1255
- # cluster_nodes_shutdown:
1256
- # - POST
1257
- # - /_cluster/nodes/<<nodes= ~ >>/_shutdown
1295
+ # cluster_nodes_info:
1296
+ # - GET
1297
+ # - "/_nodes/<<nodes= ~ >>/<<info= ~ >>"
1258
1298
  #
1259
1299
  #
1260
1300
  # Usage:
1261
- # Elastics.cluster_nodes_shutdown :nodes => nil
1301
+ # Elastics.cluster_nodes_info :nodes => nil,
1302
+ # :info => nil
1262
1303
  #
1263
- def Elastics.cluster_nodes_shutdown(*vars)
1304
+ def self.cluster_nodes_info(*vars)
1264
1305
  ## this is a stub, used for reference
1265
1306
  super
1266
1307
  end
1267
1308
 
1309
+
1268
1310
  # ########## Elastics.cluster_nodes_hot_threads ##########
1269
- # --------------
1311
+ # ------------------
1270
1312
  # Elastics::Template
1271
1313
  # ---
1272
1314
  # cluster_nodes_hot_threads:
1273
1315
  # - GET
1274
- # - /_nodes/<<nodes= ~ >>/hot_threads
1316
+ # - "/_nodes/<<nodes= ~ >>/hot_threads"
1275
1317
  #
1276
1318
  #
1277
1319
  # Usage:
1278
1320
  # Elastics.cluster_nodes_hot_threads :nodes => nil
1279
1321
  #
1280
- def Elastics.cluster_nodes_hot_threads(*vars)
1322
+ def self.cluster_nodes_hot_threads(*vars)
1281
1323
  ## this is a stub, used for reference
1282
1324
  super
1283
1325
  end
1284
1326
 
1285
- # ########## Elastics.cluster_reroute ##########
1286
- # --------------
1327
+
1328
+ # ########## Elastics.match_all ##########
1329
+ # ------------------
1287
1330
  # Elastics::Template
1288
1331
  # ---
1289
- # cluster_reroute:
1290
- # - POST
1291
- # - /_cluster/reroute
1332
+ # match_all:
1333
+ # - GET
1334
+ # - "/<<index>>/<<type>>/_search"
1335
+ # - query:
1336
+ # match_all: {}
1292
1337
  #
1293
1338
  #
1294
1339
  # Usage:
1295
- # Elastics.cluster_reroute
1340
+ # Elastics.match_all :index => nil,
1341
+ # :type => nil
1296
1342
  #
1297
- def Elastics.cluster_reroute(*vars)
1343
+ def self.match_all(*vars)
1298
1344
  ## this is a stub, used for reference
1299
1345
  super
1300
1346
  end
1301
1347
 
1302
1348
 
1349
+ # ########## Elastics.search_by_id ##########
1350
+ # ------------------
1351
+ # Elastics::Template
1352
+ # ---
1353
+ # search_by_id:
1354
+ # - GET
1355
+ # - "/<<index>>/<<type>>/_search"
1356
+ # - query:
1357
+ # term:
1358
+ # _id: "<<id>>"
1359
+ #
1360
+ #
1361
+ # Usage:
1362
+ # Elastics.search_by_id :id => id, # required
1363
+ # :type => nil,
1364
+ # :index => nil
1365
+ #
1366
+ def self.search_by_id(*vars)
1367
+ ## this is a stub, used for reference
1368
+ super
1369
+ end
1303
1370
  end
1304
1371
  end