Filename | /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/API/2_0.pm |
Statements | Executed 131 statements in 5.60ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.56ms | 2.07ms | BEGIN@6 | Search::Elasticsearch::Role::API::2_0::
1 | 1 | 1 | 17µs | 329µs | BEGIN@3 | Search::Elasticsearch::Role::API::2_0::
1 | 1 | 1 | 10µs | 228µs | BEGIN@7 | Search::Elasticsearch::Role::API::2_0::
1 | 1 | 1 | 9µs | 147µs | BEGIN@5 | Search::Elasticsearch::Role::API::2_0::
1 | 1 | 1 | 7µs | 44µs | __ANON__[:3] | Search::Elasticsearch::Role::API::2_0::
2 | 1 | 1 | 3µs | 3µs | api | Search::Elasticsearch::Role::API::2_0::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Search::Elasticsearch::Role::API::2_0; | ||||
2 | 1 | 800ns | $Search::Elasticsearch::Role::API::2_0::VERSION = '2.02'; | ||
3 | 4 | 48µs | 3 | 678µs | # spent 44µs (7+36) within Search::Elasticsearch::Role::API::2_0::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/API/2_0.pm:3] which was called:
# once (7µs+36µs) by import::into at line 34 of Import/Into.pm
# spent 329µs (17+312) within Search::Elasticsearch::Role::API::2_0::BEGIN@3 which was called:
# once (17µs+312µs) by Module::Runtime::require_module at line 3 # spent 329µs making 1 call to Search::Elasticsearch::Role::API::2_0::BEGIN@3
# spent 312µs making 1 call to Moo::Role::import
# spent 36µs making 1 call to strictures::import |
4 | |||||
5 | 2 | 39µs | 2 | 285µs | # spent 147µs (9+138) within Search::Elasticsearch::Role::API::2_0::BEGIN@5 which was called:
# once (9µs+138µs) by Module::Runtime::require_module at line 5 # spent 147µs making 1 call to Search::Elasticsearch::Role::API::2_0::BEGIN@5
# spent 138µs making 1 call to Sub::Exporter::__ANON__[/opt/flows/lib/lib/perl5/Sub/Exporter.pm:337] |
6 | 2 | 156µs | 2 | 2.21ms | # spent 2.07ms (1.56+513µs) within Search::Elasticsearch::Role::API::2_0::BEGIN@6 which was called:
# once (1.56ms+513µs) by Module::Runtime::require_module at line 6 # spent 2.07ms making 1 call to Search::Elasticsearch::Role::API::2_0::BEGIN@6
# spent 144µs making 1 call to Sub::Exporter::__ANON__[/opt/flows/lib/lib/perl5/Sub/Exporter.pm:337] |
7 | 2 | 3.78ms | 2 | 445µs | # spent 228µs (10+217) within Search::Elasticsearch::Role::API::2_0::BEGIN@7 which was called:
# once (10µs+217µs) by Module::Runtime::require_module at line 7 # spent 228µs making 1 call to Search::Elasticsearch::Role::API::2_0::BEGIN@7
# spent 217µs making 1 call to namespace::clean::import |
8 | |||||
9 | 1 | 300ns | our %API; | ||
10 | |||||
11 | #=================================== | ||||
12 | # spent 3µs within Search::Elasticsearch::Role::API::2_0::api which was called 2 times, avg 1µs/call:
# 2 times (3µs+0s) by Search::Elasticsearch::Role::Client::Direct::_install_api at line 89 of /opt/flows/lib/lib/perl5/Search/Elasticsearch/Role/Client/Direct.pm, avg 1µs/call | ||||
13 | #=================================== | ||||
14 | 2 | 7µs | my $name = $_[1] || return \%API; | ||
15 | return $API{$name} | ||||
16 | || throw( 'Internal', "Unknown api name ($name)" ); | ||||
17 | } | ||||
18 | |||||
19 | #=================================== | ||||
20 | 1 | 716µs | %API = ( | ||
21 | #=================================== | ||||
22 | |||||
23 | #=== AUTOGEN - START === | ||||
24 | |||||
25 | 'bulk' => { | ||||
26 | body => { required => 1 }, | ||||
27 | doc => "docs-bulk", | ||||
28 | index_when_type => 1, | ||||
29 | method => "POST", | ||||
30 | parts => { index => {}, type => {} }, | ||||
31 | paths => [ | ||||
32 | [ { index => 0, type => 1 }, "{index}", "{type}", "_bulk" ], | ||||
33 | [ { index => 0 }, "{index}", "_bulk" ], | ||||
34 | [ {}, "_bulk" ], | ||||
35 | ], | ||||
36 | qs => [ | ||||
37 | "consistency", "fields", "filter_path", "refresh", | ||||
38 | "routing", "timeout", | ||||
39 | ], | ||||
40 | serialize => "bulk", | ||||
41 | }, | ||||
42 | |||||
43 | 'clear_scroll' => { | ||||
44 | body => {}, | ||||
45 | doc => "search-request-scroll", | ||||
46 | method => "DELETE", | ||||
47 | parts => { scroll_id => { multi => 1 } }, | ||||
48 | paths => [ | ||||
49 | [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ], | ||||
50 | [ {}, "_search", "scroll" ], | ||||
51 | ], | ||||
52 | qs => ["filter_path"], | ||||
53 | }, | ||||
54 | |||||
55 | 'count' => { | ||||
56 | body => {}, | ||||
57 | doc => "search-count", | ||||
58 | method => "POST", | ||||
59 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
60 | paths => [ | ||||
61 | [ { index => 0, type => 1 }, "{index}", "{type}", "_count" ], | ||||
62 | [ { type => 1 }, "_all", "{type}", "_count" ], | ||||
63 | [ { index => 0 }, "{index}", "_count" ], | ||||
64 | [ {}, "_count" ], | ||||
65 | ], | ||||
66 | qs => [ | ||||
67 | "allow_no_indices", "analyze_wildcard", | ||||
68 | "analyzer", "default_operator", | ||||
69 | "df", "expand_wildcards", | ||||
70 | "filter_path", "ignore_unavailable", | ||||
71 | "lenient", "lowercase_expanded_terms", | ||||
72 | "min_score", "preference", | ||||
73 | "q", "routing", | ||||
74 | ], | ||||
75 | }, | ||||
76 | |||||
77 | 'count_percolate' => { | ||||
78 | body => {}, | ||||
79 | doc => "search-percolate", | ||||
80 | parts => { | ||||
81 | id => {}, | ||||
82 | index => { required => 1 }, | ||||
83 | type => { required => 1 } | ||||
84 | }, | ||||
85 | paths => [ | ||||
86 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
87 | "{type}", "{id}", | ||||
88 | "_percolate", "count", | ||||
89 | ], | ||||
90 | [ { index => 0, type => 1 }, "{index}", | ||||
91 | "{type}", "_percolate", | ||||
92 | "count", | ||||
93 | ], | ||||
94 | ], | ||||
95 | qs => [ | ||||
96 | "allow_no_indices", "expand_wildcards", | ||||
97 | "filter_path", "ignore_unavailable", | ||||
98 | "percolate_index", "percolate_type", | ||||
99 | "preference", "routing", | ||||
100 | "version", "version_type", | ||||
101 | ], | ||||
102 | }, | ||||
103 | |||||
104 | 'delete' => { | ||||
105 | doc => "docs-delete", | ||||
106 | method => "DELETE", | ||||
107 | parts => { | ||||
108 | id => { required => 1 }, | ||||
109 | index => { required => 1 }, | ||||
110 | type => { required => 1 }, | ||||
111 | }, | ||||
112 | paths => [ | ||||
113 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
114 | "{type}", "{id}" | ||||
115 | ], | ||||
116 | ], | ||||
117 | qs => [ | ||||
118 | "consistency", "filter_path", "parent", "refresh", | ||||
119 | "routing", "timeout", "version", "version_type", | ||||
120 | ], | ||||
121 | }, | ||||
122 | |||||
123 | 'delete_by_query' => { | ||||
124 | body => {}, | ||||
125 | doc => "plugins-delete-by-query", | ||||
126 | method => "DELETE", | ||||
127 | parts => { | ||||
128 | index => { multi => 1, required => 1 }, | ||||
129 | type => { multi => 1 } | ||||
130 | }, | ||||
131 | paths => [ | ||||
132 | [ { index => 0, type => 1 }, "{index}", "{type}", "_query" ], | ||||
133 | [ { index => 0 }, "{index}", "_query" ], | ||||
134 | ], | ||||
135 | qs => [ | ||||
136 | "allow_no_indices", "analyzer", | ||||
137 | "default_operator", "df", | ||||
138 | "expand_wildcards", "filter_path", | ||||
139 | "ignore_unavailable", "q", | ||||
140 | "routing", "timeout", | ||||
141 | ], | ||||
142 | }, | ||||
143 | |||||
144 | 'delete_script' => { | ||||
145 | doc => "modules-scripting", | ||||
146 | method => "DELETE", | ||||
147 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||||
148 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||||
149 | qs => [ "filter_path", "version", "version_type" ], | ||||
150 | }, | ||||
151 | |||||
152 | 'delete_template' => { | ||||
153 | doc => "search-template", | ||||
154 | method => "DELETE", | ||||
155 | parts => { id => { required => 1 } }, | ||||
156 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||||
157 | qs => [ "filter_path", "version", "version_type" ], | ||||
158 | }, | ||||
159 | |||||
160 | 'exists' => { | ||||
161 | doc => "docs-get", | ||||
162 | method => "HEAD", | ||||
163 | parts => { | ||||
164 | id => { required => 1 }, | ||||
165 | index => { required => 1 }, | ||||
166 | type => { required => 1 }, | ||||
167 | }, | ||||
168 | paths => [ | ||||
169 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
170 | "{type}", "{id}" | ||||
171 | ], | ||||
172 | ], | ||||
173 | qs => [ "parent", "preference", "realtime", "refresh", "routing" ], | ||||
174 | }, | ||||
175 | |||||
176 | 'explain' => { | ||||
177 | body => {}, | ||||
178 | doc => "search-explain", | ||||
179 | parts => { | ||||
180 | id => { required => 1 }, | ||||
181 | index => { required => 1 }, | ||||
182 | type => { required => 1 }, | ||||
183 | }, | ||||
184 | paths => [ | ||||
185 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
186 | "{type}", "{id}", | ||||
187 | "_explain", | ||||
188 | ], | ||||
189 | ], | ||||
190 | qs => [ | ||||
191 | "_source", "_source_exclude", | ||||
192 | "_source_include", "analyze_wildcard", | ||||
193 | "analyzer", "default_operator", | ||||
194 | "df", "fields", | ||||
195 | "filter_path", "lenient", | ||||
196 | "lowercase_expanded_terms", "parent", | ||||
197 | "preference", "q", | ||||
198 | "routing", | ||||
199 | ], | ||||
200 | }, | ||||
201 | |||||
202 | 'field_stats' => { | ||||
203 | body => {}, | ||||
204 | doc => "search-field-stats", | ||||
205 | parts => { index => { multi => 1 } }, | ||||
206 | paths => [ | ||||
207 | [ { index => 0 }, "{index}", "_field_stats" ], | ||||
208 | [ {}, "_field_stats" ], | ||||
209 | ], | ||||
210 | qs => [ | ||||
211 | "allow_no_indices", "expand_wildcards", | ||||
212 | "fields", "filter_path", | ||||
213 | "ignore_unavailable", "level", | ||||
214 | ], | ||||
215 | }, | ||||
216 | |||||
217 | 'get' => { | ||||
218 | doc => "docs-get", | ||||
219 | parts => { | ||||
220 | id => { required => 1 }, | ||||
221 | index => { required => 1 }, | ||||
222 | type => { required => 1 }, | ||||
223 | }, | ||||
224 | paths => [ | ||||
225 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
226 | "{type}", "{id}" | ||||
227 | ], | ||||
228 | ], | ||||
229 | qs => [ | ||||
230 | "_source", "_source_exclude", | ||||
231 | "_source_include", "fields", | ||||
232 | "filter_path", "parent", | ||||
233 | "preference", "realtime", | ||||
234 | "refresh", "routing", | ||||
235 | "version", "version_type", | ||||
236 | ], | ||||
237 | }, | ||||
238 | |||||
239 | 'get_script' => { | ||||
240 | doc => "modules-scripting", | ||||
241 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||||
242 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||||
243 | qs => [ "filter_path", "version", "version_type" ], | ||||
244 | }, | ||||
245 | |||||
246 | 'get_source' => { | ||||
247 | doc => "docs-get", | ||||
248 | parts => { | ||||
249 | id => { required => 1 }, | ||||
250 | index => { required => 1 }, | ||||
251 | type => { required => 1 }, | ||||
252 | }, | ||||
253 | paths => [ | ||||
254 | [ { id => 2, index => 0, type => 1 }, | ||||
255 | "{index}", "{type}", "{id}", "_source", | ||||
256 | ], | ||||
257 | ], | ||||
258 | qs => [ | ||||
259 | "_source", "_source_exclude", | ||||
260 | "_source_include", "filter_path", | ||||
261 | "parent", "preference", | ||||
262 | "realtime", "refresh", | ||||
263 | "routing", "version", | ||||
264 | "version_type", | ||||
265 | ], | ||||
266 | }, | ||||
267 | |||||
268 | 'get_template' => { | ||||
269 | doc => "search-template", | ||||
270 | parts => { id => { required => 1 } }, | ||||
271 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||||
272 | qs => [ "filter_path", "version", "version_type" ], | ||||
273 | }, | ||||
274 | |||||
275 | 'index' => { | ||||
276 | body => { required => 1 }, | ||||
277 | doc => "docs-index_", | ||||
278 | method => "POST", | ||||
279 | parts => { | ||||
280 | id => {}, | ||||
281 | index => { required => 1 }, | ||||
282 | type => { required => 1 } | ||||
283 | }, | ||||
284 | paths => [ | ||||
285 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
286 | "{type}", "{id}" | ||||
287 | ], | ||||
288 | [ { index => 0, type => 1 }, "{index}", "{type}" ], | ||||
289 | ], | ||||
290 | qs => [ | ||||
291 | "consistency", "filter_path", "op_type", "parent", | ||||
292 | "refresh", "routing", "timeout", "timestamp", | ||||
293 | "ttl", "version", "version_type", | ||||
294 | ], | ||||
295 | }, | ||||
296 | |||||
297 | 'info' => { | ||||
298 | doc => "", | ||||
299 | parts => {}, | ||||
300 | paths => [ [ {} ] ], | ||||
301 | qs => ["filter_path"] | ||||
302 | }, | ||||
303 | |||||
304 | 'mget' => { | ||||
305 | body => { required => 1 }, | ||||
306 | doc => "docs-multi-get", | ||||
307 | index_when_type => 1, | ||||
308 | parts => { index => {}, type => {} }, | ||||
309 | paths => [ | ||||
310 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mget" ], | ||||
311 | [ { index => 0 }, "{index}", "_mget" ], | ||||
312 | [ {}, "_mget" ], | ||||
313 | ], | ||||
314 | qs => [ | ||||
315 | "_source", "_source_exclude", | ||||
316 | "_source_include", "fields", | ||||
317 | "filter_path", "preference", | ||||
318 | "realtime", "refresh", | ||||
319 | ], | ||||
320 | }, | ||||
321 | |||||
322 | 'mpercolate' => { | ||||
323 | body => { required => 1 }, | ||||
324 | doc => "search-percolate", | ||||
325 | index_when_type => 1, | ||||
326 | parts => { index => {}, type => {} }, | ||||
327 | paths => [ | ||||
328 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mpercolate" ], | ||||
329 | [ { index => 0 }, "{index}", "_mpercolate" ], | ||||
330 | [ {}, "_mpercolate" ], | ||||
331 | ], | ||||
332 | qs => [ | ||||
333 | "allow_no_indices", "expand_wildcards", | ||||
334 | "filter_path", "ignore_unavailable", | ||||
335 | ], | ||||
336 | serialize => "bulk", | ||||
337 | }, | ||||
338 | |||||
339 | 'msearch' => { | ||||
340 | body => { required => 1 }, | ||||
341 | doc => "search-multi-search", | ||||
342 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
343 | paths => [ | ||||
344 | [ { index => 0, type => 1 }, "{index}", "{type}", "_msearch" ], | ||||
345 | [ { type => 1 }, "_all", "{type}", "_msearch" ], | ||||
346 | [ { index => 0 }, "{index}", "_msearch" ], | ||||
347 | [ {}, "_msearch" ], | ||||
348 | ], | ||||
349 | qs => [ "filter_path", "search_type" ], | ||||
350 | serialize => "bulk", | ||||
351 | }, | ||||
352 | |||||
353 | 'mtermvectors' => { | ||||
354 | body => {}, | ||||
355 | doc => "docs-multi-termvectors", | ||||
356 | index_when_type => 1, | ||||
357 | parts => { index => {}, type => {} }, | ||||
358 | paths => [ | ||||
359 | [ { index => 0, type => 1 }, "{index}", | ||||
360 | "{type}", "_mtermvectors" | ||||
361 | ], | ||||
362 | [ { index => 0 }, "{index}", "_mtermvectors" ], | ||||
363 | [ {}, "_mtermvectors" ], | ||||
364 | ], | ||||
365 | qs => [ | ||||
366 | "field_statistics", "fields", | ||||
367 | "filter_path", "ids", | ||||
368 | "offsets", "parent", | ||||
369 | "payloads", "positions", | ||||
370 | "preference", "realtime", | ||||
371 | "routing", "term_statistics", | ||||
372 | "version", "version_type", | ||||
373 | ], | ||||
374 | }, | ||||
375 | |||||
376 | 'percolate' => { | ||||
377 | body => {}, | ||||
378 | doc => "search-percolate", | ||||
379 | parts => { | ||||
380 | id => {}, | ||||
381 | index => { required => 1 }, | ||||
382 | type => { required => 1 } | ||||
383 | }, | ||||
384 | paths => [ | ||||
385 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
386 | "{type}", "{id}", | ||||
387 | "_percolate", | ||||
388 | ], | ||||
389 | [ { index => 0, type => 1 }, "{index}", "{type}", "_percolate" ], | ||||
390 | ], | ||||
391 | qs => [ | ||||
392 | "allow_no_indices", "expand_wildcards", | ||||
393 | "filter_path", "ignore_unavailable", | ||||
394 | "percolate_format", "percolate_index", | ||||
395 | "percolate_preference", "percolate_routing", | ||||
396 | "percolate_type", "preference", | ||||
397 | "routing", "version", | ||||
398 | "version_type", | ||||
399 | ], | ||||
400 | }, | ||||
401 | |||||
402 | 'ping' => { | ||||
403 | doc => "", | ||||
404 | method => "HEAD", | ||||
405 | parts => {}, | ||||
406 | paths => [ [ {} ] ], | ||||
407 | qs => [] | ||||
408 | }, | ||||
409 | |||||
410 | 'put_script' => { | ||||
411 | body => { required => 1 }, | ||||
412 | doc => "modules-scripting", | ||||
413 | method => "PUT", | ||||
414 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||||
415 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||||
416 | qs => [ "filter_path", "op_type", "version", "version_type" ], | ||||
417 | }, | ||||
418 | |||||
419 | 'put_template' => { | ||||
420 | body => { required => 1 }, | ||||
421 | doc => "search-template", | ||||
422 | method => "PUT", | ||||
423 | parts => { id => { required => 1 } }, | ||||
424 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||||
425 | qs => [ "filter_path", "op_type", "version", "version_type" ], | ||||
426 | }, | ||||
427 | |||||
428 | 'reindex' => { | ||||
429 | body => { required => 1 }, | ||||
430 | doc => "plugins-reindex", | ||||
431 | method => "POST", | ||||
432 | parts => {}, | ||||
433 | paths => [ [ {}, "_reindex" ] ], | ||||
434 | qs => [ | ||||
435 | "consistency", "filter_path", | ||||
436 | "refresh", "timeout", | ||||
437 | "wait_for_completion", | ||||
438 | ], | ||||
439 | }, | ||||
440 | |||||
441 | 'render_search_template' => { | ||||
442 | body => {}, | ||||
443 | doc => "search-template", | ||||
444 | parts => { id => {} }, | ||||
445 | paths => [ | ||||
446 | [ { id => 2 }, "_render", "template", "{id}" ], | ||||
447 | [ {}, "_render", "template" ], | ||||
448 | ], | ||||
449 | qs => ["filter_path"], | ||||
450 | }, | ||||
451 | |||||
452 | 'scroll' => { | ||||
453 | body => {}, | ||||
454 | doc => "search-request-scroll", | ||||
455 | parts => { scroll_id => {} }, | ||||
456 | paths => [ | ||||
457 | [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ], | ||||
458 | [ {}, "_search", "scroll" ], | ||||
459 | ], | ||||
460 | qs => [ "filter_path", "scroll" ], | ||||
461 | }, | ||||
462 | |||||
463 | 'search' => { | ||||
464 | body => {}, | ||||
465 | doc => "search-search", | ||||
466 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
467 | paths => [ | ||||
468 | [ { index => 0, type => 1 }, "{index}", "{type}", "_search" ], | ||||
469 | [ { type => 1 }, "_all", "{type}", "_search" ], | ||||
470 | [ { index => 0 }, "{index}", "_search" ], | ||||
471 | [ {}, "_search" ], | ||||
472 | ], | ||||
473 | qs => [ | ||||
474 | "_source", "_source_exclude", | ||||
475 | "_source_include", "allow_no_indices", | ||||
476 | "analyze_wildcard", "analyzer", | ||||
477 | "default_operator", "df", | ||||
478 | "expand_wildcards", "explain", | ||||
479 | "fielddata_fields", "fields", | ||||
480 | "filter_path", "from", | ||||
481 | "ignore_unavailable", "lenient", | ||||
482 | "lowercase_expanded_terms", "preference", | ||||
483 | "q", "request_cache", | ||||
484 | "routing", "scroll", | ||||
485 | "search_type", "size", | ||||
486 | "sort", "stats", | ||||
487 | "suggest_field", "suggest_mode", | ||||
488 | "suggest_size", "suggest_text", | ||||
489 | "terminate_after", "timeout", | ||||
490 | "track_scores", "version", | ||||
491 | ], | ||||
492 | }, | ||||
493 | |||||
494 | 'search_exists' => { | ||||
495 | body => {}, | ||||
496 | doc => "search-exists", | ||||
497 | method => "POST", | ||||
498 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
499 | paths => [ | ||||
500 | [ { index => 0, type => 1 }, "{index}", | ||||
501 | "{type}", "_search", | ||||
502 | "exists", | ||||
503 | ], | ||||
504 | [ { type => 1 }, "_all", "{type}", "_search", "exists" ], | ||||
505 | [ { index => 0 }, "{index}", "_search", "exists" ], | ||||
506 | [ {}, "_search", "exists" ], | ||||
507 | ], | ||||
508 | qs => [ | ||||
509 | "allow_no_indices", "analyze_wildcard", | ||||
510 | "analyzer", "default_operator", | ||||
511 | "df", "expand_wildcards", | ||||
512 | "filter_path", "ignore_unavailable", | ||||
513 | "lenient", "lowercase_expanded_terms", | ||||
514 | "min_score", "preference", | ||||
515 | "q", "routing", | ||||
516 | ], | ||||
517 | }, | ||||
518 | |||||
519 | 'search_shards' => { | ||||
520 | doc => "search-shards", | ||||
521 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
522 | paths => [ | ||||
523 | [ { index => 0, type => 1 }, "{index}", | ||||
524 | "{type}", "_search_shards", | ||||
525 | ], | ||||
526 | [ { type => 1 }, "_all", "{type}", "_search_shards" ], | ||||
527 | [ { index => 0 }, "{index}", "_search_shards" ], | ||||
528 | [ {}, "_search_shards" ], | ||||
529 | ], | ||||
530 | qs => [ | ||||
531 | "allow_no_indices", "expand_wildcards", | ||||
532 | "filter_path", "ignore_unavailable", | ||||
533 | "local", "preference", | ||||
534 | "routing", | ||||
535 | ], | ||||
536 | }, | ||||
537 | |||||
538 | 'search_template' => { | ||||
539 | body => {}, | ||||
540 | doc => "search-template", | ||||
541 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
542 | paths => [ | ||||
543 | [ { index => 0, type => 1 }, "{index}", | ||||
544 | "{type}", "_search", | ||||
545 | "template", | ||||
546 | ], | ||||
547 | [ { type => 1 }, "_all", "{type}", "_search", "template" ], | ||||
548 | [ { index => 0 }, "{index}", "_search", "template" ], | ||||
549 | [ {}, "_search", "template" ], | ||||
550 | ], | ||||
551 | qs => [ | ||||
552 | "allow_no_indices", "expand_wildcards", | ||||
553 | "filter_path", "ignore_unavailable", | ||||
554 | "preference", "routing", | ||||
555 | "scroll", "search_type", | ||||
556 | ], | ||||
557 | }, | ||||
558 | |||||
559 | 'suggest' => { | ||||
560 | body => { required => 1 }, | ||||
561 | doc => "search-suggesters", | ||||
562 | method => "POST", | ||||
563 | parts => { index => { multi => 1 } }, | ||||
564 | paths => | ||||
565 | [ [ { index => 0 }, "{index}", "_suggest" ], [ {}, "_suggest" ] ], | ||||
566 | qs => [ | ||||
567 | "allow_no_indices", "expand_wildcards", | ||||
568 | "filter_path", "ignore_unavailable", | ||||
569 | "preference", "routing", | ||||
570 | ], | ||||
571 | }, | ||||
572 | |||||
573 | 'termvectors' => { | ||||
574 | body => {}, | ||||
575 | doc => "docs-termvectors", | ||||
576 | parts => { | ||||
577 | id => {}, | ||||
578 | index => { required => 1 }, | ||||
579 | type => { required => 1 } | ||||
580 | }, | ||||
581 | paths => [ | ||||
582 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||||
583 | "{type}", "{id}", | ||||
584 | "_termvectors", | ||||
585 | ], | ||||
586 | [ { index => 0, type => 1 }, "{index}", "{type}", | ||||
587 | "_termvectors" | ||||
588 | ], | ||||
589 | ], | ||||
590 | qs => [ | ||||
591 | "dfs", "field_statistics", | ||||
592 | "fields", "filter_path", | ||||
593 | "offsets", "parent", | ||||
594 | "payloads", "positions", | ||||
595 | "preference", "realtime", | ||||
596 | "routing", "term_statistics", | ||||
597 | "version", "version_type", | ||||
598 | ], | ||||
599 | }, | ||||
600 | |||||
601 | 'update' => { | ||||
602 | body => {}, | ||||
603 | doc => "docs-update", | ||||
604 | method => "POST", | ||||
605 | parts => { | ||||
606 | id => { required => 1 }, | ||||
607 | index => { required => 1 }, | ||||
608 | type => { required => 1 }, | ||||
609 | }, | ||||
610 | paths => [ | ||||
611 | [ { id => 2, index => 0, type => 1 }, | ||||
612 | "{index}", "{type}", "{id}", "_update", | ||||
613 | ], | ||||
614 | ], | ||||
615 | qs => [ | ||||
616 | "consistency", "detect_noop", | ||||
617 | "fields", "filter_path", | ||||
618 | "lang", "parent", | ||||
619 | "refresh", "retry_on_conflict", | ||||
620 | "routing", "script", | ||||
621 | "script_id", "scripted_upsert", | ||||
622 | "timeout", "timestamp", | ||||
623 | "ttl", "version", | ||||
624 | "version_type", | ||||
625 | ], | ||||
626 | }, | ||||
627 | |||||
628 | 'update_by_query' => { | ||||
629 | body => {}, | ||||
630 | doc => "plugins-reindex", | ||||
631 | method => "POST", | ||||
632 | parts => { | ||||
633 | index => { multi => 1, required => 1 }, | ||||
634 | type => { multi => 1 } | ||||
635 | }, | ||||
636 | paths => [ | ||||
637 | [ { index => 0, type => 1 }, "{index}", | ||||
638 | "{type}", "_update_by_query", | ||||
639 | ], | ||||
640 | [ { index => 0 }, "{index}", "_update_by_query" ], | ||||
641 | ], | ||||
642 | qs => [ | ||||
643 | "_source", "_source_exclude", | ||||
644 | "_source_include", "allow_no_indices", | ||||
645 | "analyze_wildcard", "analyzer", | ||||
646 | "conflicts", "consistency", | ||||
647 | "default_operator", "df", | ||||
648 | "expand_wildcards", "explain", | ||||
649 | "fielddata_fields", "fields", | ||||
650 | "filter_path", "from", | ||||
651 | "ignore_unavailable", "lenient", | ||||
652 | "lowercase_expanded_terms", "preference", | ||||
653 | "q", "refresh", | ||||
654 | "request_cache", "routing", | ||||
655 | "scroll", "scroll_size", | ||||
656 | "search_timeout", "search_type", | ||||
657 | "size", "sort", | ||||
658 | "stats", "suggest_field", | ||||
659 | "suggest_mode", "suggest_size", | ||||
660 | "suggest_text", "terminate_after", | ||||
661 | "timeout", "track_scores", | ||||
662 | "version", "version_type", | ||||
663 | "wait_for_completion", | ||||
664 | ], | ||||
665 | }, | ||||
666 | |||||
667 | 'cat.aliases' => { | ||||
668 | doc => "cat-alias", | ||||
669 | parts => { name => { multi => 1 } }, | ||||
670 | paths => [ | ||||
671 | [ { name => 2 }, "_cat", "aliases", "{name}" ], | ||||
672 | [ {}, "_cat", "aliases" ], | ||||
673 | ], | ||||
674 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
675 | }, | ||||
676 | |||||
677 | 'cat.allocation' => { | ||||
678 | doc => "cat-allocation", | ||||
679 | parts => { node_id => { multi => 1 } }, | ||||
680 | paths => [ | ||||
681 | [ { node_id => 2 }, "_cat", "allocation", "{node_id}" ], | ||||
682 | [ {}, "_cat", "allocation" ], | ||||
683 | ], | ||||
684 | qs => [ "bytes", "h", "help", "local", "master_timeout", "v" ], | ||||
685 | }, | ||||
686 | |||||
687 | 'cat.count' => { | ||||
688 | doc => "cat-count", | ||||
689 | parts => { index => { multi => 1 } }, | ||||
690 | paths => [ | ||||
691 | [ { index => 2 }, "_cat", "count", "{index}" ], | ||||
692 | [ {}, "_cat", "count" ], | ||||
693 | ], | ||||
694 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
695 | }, | ||||
696 | |||||
697 | 'cat.fielddata' => { | ||||
698 | doc => "cat-fielddata", | ||||
699 | parts => { fields => { multi => 1 } }, | ||||
700 | paths => [ | ||||
701 | [ { fields => 2 }, "_cat", "fielddata", "{fields}" ], | ||||
702 | [ {}, "_cat", "fielddata" ], | ||||
703 | ], | ||||
704 | qs => [ "bytes", "h", "help", "local", "master_timeout", "v" ], | ||||
705 | }, | ||||
706 | |||||
707 | 'cat.health' => { | ||||
708 | doc => "cat-health", | ||||
709 | parts => {}, | ||||
710 | paths => [ [ {}, "_cat", "health" ] ], | ||||
711 | qs => [ "h", "help", "local", "master_timeout", "ts", "v" ], | ||||
712 | }, | ||||
713 | |||||
714 | 'cat.help' => { | ||||
715 | doc => "cat", | ||||
716 | parts => {}, | ||||
717 | paths => [ [ {}, "_cat" ] ], | ||||
718 | qs => ["help"] | ||||
719 | }, | ||||
720 | |||||
721 | 'cat.indices' => { | ||||
722 | doc => "cat-indices", | ||||
723 | parts => { index => { multi => 1 } }, | ||||
724 | paths => [ | ||||
725 | [ { index => 2 }, "_cat", "indices", "{index}" ], | ||||
726 | [ {}, "_cat", "indices" ], | ||||
727 | ], | ||||
728 | qs => [ "bytes", "h", "help", "local", "master_timeout", "pri", "v" ], | ||||
729 | }, | ||||
730 | |||||
731 | 'cat.master' => { | ||||
732 | doc => "cat-master", | ||||
733 | parts => {}, | ||||
734 | paths => [ [ {}, "_cat", "master" ] ], | ||||
735 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
736 | }, | ||||
737 | |||||
738 | 'cat.nodeattrs' => { | ||||
739 | doc => "cat-nodeattrs", | ||||
740 | parts => {}, | ||||
741 | paths => [ [ {}, "_cat", "nodeattrs" ] ], | ||||
742 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
743 | }, | ||||
744 | |||||
745 | 'cat.nodes' => { | ||||
746 | doc => "cat-nodes", | ||||
747 | parts => {}, | ||||
748 | paths => [ [ {}, "_cat", "nodes" ] ], | ||||
749 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
750 | }, | ||||
751 | |||||
752 | 'cat.pending_tasks' => { | ||||
753 | doc => "cat-pending-tasks", | ||||
754 | parts => {}, | ||||
755 | paths => [ [ {}, "_cat", "pending_tasks" ] ], | ||||
756 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
757 | }, | ||||
758 | |||||
759 | 'cat.plugins' => { | ||||
760 | doc => "cat-plugins", | ||||
761 | parts => {}, | ||||
762 | paths => [ [ {}, "_cat", "plugins" ] ], | ||||
763 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
764 | }, | ||||
765 | |||||
766 | 'cat.recovery' => { | ||||
767 | doc => "cat-recovery", | ||||
768 | parts => { index => { multi => 1 } }, | ||||
769 | paths => [ | ||||
770 | [ { index => 2 }, "_cat", "recovery", "{index}" ], | ||||
771 | [ {}, "_cat", "recovery" ], | ||||
772 | ], | ||||
773 | qs => [ "bytes", "h", "help", "master_timeout", "v" ], | ||||
774 | }, | ||||
775 | |||||
776 | 'cat.repositories' => { | ||||
777 | doc => "cat-repositories", | ||||
778 | parts => {}, | ||||
779 | paths => [ [ {}, "_cat", "repositories" ] ], | ||||
780 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
781 | }, | ||||
782 | |||||
783 | 'cat.segments' => { | ||||
784 | doc => "cat-segments", | ||||
785 | parts => { index => { multi => 1 } }, | ||||
786 | paths => [ | ||||
787 | [ { index => 2 }, "_cat", "segments", "{index}" ], | ||||
788 | [ {}, "_cat", "segments" ], | ||||
789 | ], | ||||
790 | qs => [ "h", "help", "v" ], | ||||
791 | }, | ||||
792 | |||||
793 | 'cat.shards' => { | ||||
794 | doc => "cat-shards", | ||||
795 | parts => { index => { multi => 1 } }, | ||||
796 | paths => [ | ||||
797 | [ { index => 2 }, "_cat", "shards", "{index}" ], | ||||
798 | [ {}, "_cat", "shards" ], | ||||
799 | ], | ||||
800 | qs => [ "h", "help", "local", "master_timeout", "v" ], | ||||
801 | }, | ||||
802 | |||||
803 | 'cat.snapshots' => { | ||||
804 | doc => "cat-snapshots", | ||||
805 | parts => { repository => { multi => 1, required => 1 } }, | ||||
806 | paths => | ||||
807 | [ [ { repository => 2 }, "_cat", "snapshots", "{repository}" ] ], | ||||
808 | qs => [ "h", "help", "ignore_unavailable", "master_timeout", "v" ], | ||||
809 | }, | ||||
810 | |||||
811 | 'cat.thread_pool' => { | ||||
812 | doc => "cat-thread-pool", | ||||
813 | parts => {}, | ||||
814 | paths => [ [ {}, "_cat", "thread_pool" ] ], | ||||
815 | qs => [ "full_id", "h", "help", "local", "master_timeout", "v" ], | ||||
816 | }, | ||||
817 | |||||
818 | 'cluster.get_settings' => { | ||||
819 | doc => "cluster-update-settings", | ||||
820 | parts => {}, | ||||
821 | paths => [ [ {}, "_cluster", "settings" ] ], | ||||
822 | qs => [ "filter_path", "flat_settings", "master_timeout", "timeout" ], | ||||
823 | }, | ||||
824 | |||||
825 | 'cluster.health' => { | ||||
826 | doc => "cluster-health", | ||||
827 | parts => { index => { multi => 1 } }, | ||||
828 | paths => [ | ||||
829 | [ { index => 2 }, "_cluster", "health", "{index}" ], | ||||
830 | [ {}, "_cluster", "health" ], | ||||
831 | ], | ||||
832 | qs => [ | ||||
833 | "filter_path", "level", | ||||
834 | "local", "master_timeout", | ||||
835 | "timeout", "wait_for_active_shards", | ||||
836 | "wait_for_nodes", "wait_for_relocating_shards", | ||||
837 | "wait_for_status", | ||||
838 | ], | ||||
839 | }, | ||||
840 | |||||
841 | 'cluster.pending_tasks' => { | ||||
842 | doc => "cluster-pending", | ||||
843 | parts => {}, | ||||
844 | paths => [ [ {}, "_cluster", "pending_tasks" ] ], | ||||
845 | qs => [ "filter_path", "local", "master_timeout" ], | ||||
846 | }, | ||||
847 | |||||
848 | 'cluster.put_settings' => { | ||||
849 | body => {}, | ||||
850 | doc => "cluster-update-settings", | ||||
851 | method => "PUT", | ||||
852 | parts => {}, | ||||
853 | paths => [ [ {}, "_cluster", "settings" ] ], | ||||
854 | qs => [ "filter_path", "flat_settings", "master_timeout", "timeout" ], | ||||
855 | }, | ||||
856 | |||||
857 | 'cluster.reroute' => { | ||||
858 | body => {}, | ||||
859 | doc => "cluster-reroute", | ||||
860 | method => "POST", | ||||
861 | parts => {}, | ||||
862 | paths => [ [ {}, "_cluster", "reroute" ] ], | ||||
863 | qs => [ | ||||
864 | "dry_run", "explain", | ||||
865 | "filter_path", "master_timeout", | ||||
866 | "metric", "timeout", | ||||
867 | ], | ||||
868 | }, | ||||
869 | |||||
870 | 'cluster.state' => { | ||||
871 | doc => "cluster-state", | ||||
872 | parts => { index => { multi => 1 }, metric => { multi => 1 } }, | ||||
873 | paths => [ | ||||
874 | [ { index => 3, metric => 2 }, "_cluster", | ||||
875 | "state", "{metric}", | ||||
876 | "{index}", | ||||
877 | ], | ||||
878 | [ { index => 3 }, "_cluster", "state", "_all", "{index}" ], | ||||
879 | [ { metric => 2 }, "_cluster", "state", "{metric}" ], | ||||
880 | [ {}, "_cluster", "state" ], | ||||
881 | ], | ||||
882 | qs => [ | ||||
883 | "allow_no_indices", "expand_wildcards", | ||||
884 | "filter_path", "flat_settings", | ||||
885 | "ignore_unavailable", "local", | ||||
886 | "master_timeout", | ||||
887 | ], | ||||
888 | }, | ||||
889 | |||||
890 | 'cluster.stats' => { | ||||
891 | doc => "cluster-stats", | ||||
892 | parts => { node_id => { multi => 1 } }, | ||||
893 | paths => [ | ||||
894 | [ { node_id => 3 }, "_cluster", "stats", "nodes", "{node_id}" ], | ||||
895 | [ {}, "_cluster", "stats" ], | ||||
896 | ], | ||||
897 | qs => [ "filter_path", "flat_settings", "human", "timeout" ], | ||||
898 | }, | ||||
899 | |||||
900 | 'indices.analyze' => { | ||||
901 | body => {}, | ||||
902 | doc => "indices-analyze", | ||||
903 | parts => { index => {} }, | ||||
904 | paths => | ||||
905 | [ [ { index => 0 }, "{index}", "_analyze" ], [ {}, "_analyze" ] ], | ||||
906 | qs => [ | ||||
907 | "analyzer", "attributes", "char_filters", "explain", | ||||
908 | "field", "filter_path", "filters", "format", | ||||
909 | "prefer_local", "text", "tokenizer", | ||||
910 | ], | ||||
911 | }, | ||||
912 | |||||
913 | 'indices.clear_cache' => { | ||||
914 | doc => "indices-clearcache", | ||||
915 | method => "POST", | ||||
916 | parts => { index => { multi => 1 } }, | ||||
917 | paths => [ | ||||
918 | [ { index => 0 }, "{index}", "_cache", "clear" ], | ||||
919 | [ {}, "_cache", "clear" ], | ||||
920 | ], | ||||
921 | qs => [ | ||||
922 | "allow_no_indices", "expand_wildcards", | ||||
923 | "fielddata", "fields", | ||||
924 | "filter_path", "ignore_unavailable", | ||||
925 | "query", "recycler", | ||||
926 | "request", | ||||
927 | ], | ||||
928 | }, | ||||
929 | |||||
930 | 'indices.close' => { | ||||
931 | doc => "indices-open-close", | ||||
932 | method => "POST", | ||||
933 | parts => { index => { multi => 1, required => 1 } }, | ||||
934 | paths => [ [ { index => 0 }, "{index}", "_close" ] ], | ||||
935 | qs => [ | ||||
936 | "allow_no_indices", "expand_wildcards", | ||||
937 | "filter_path", "ignore_unavailable", | ||||
938 | "master_timeout", "timeout", | ||||
939 | ], | ||||
940 | }, | ||||
941 | |||||
942 | 'indices.create' => { | ||||
943 | body => {}, | ||||
944 | doc => "indices-create-index", | ||||
945 | method => "PUT", | ||||
946 | parts => { index => { required => 1 } }, | ||||
947 | paths => [ [ { index => 0 }, "{index}" ] ], | ||||
948 | qs => [ | ||||
949 | "filter_path", "master_timeout", "timeout", "update_all_types" | ||||
950 | ], | ||||
951 | }, | ||||
952 | |||||
953 | 'indices.delete' => { | ||||
954 | doc => "indices-delete-index", | ||||
955 | method => "DELETE", | ||||
956 | parts => { index => { multi => 1, required => 1 } }, | ||||
957 | paths => [ [ { index => 0 }, "{index}" ] ], | ||||
958 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
959 | }, | ||||
960 | |||||
961 | 'indices.delete_alias' => { | ||||
962 | doc => "indices-aliases", | ||||
963 | method => "DELETE", | ||||
964 | parts => { | ||||
965 | index => { multi => 1, required => 1 }, | ||||
966 | name => { multi => 1, required => 1 }, | ||||
967 | }, | ||||
968 | paths => | ||||
969 | [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ], | ||||
970 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
971 | }, | ||||
972 | |||||
973 | 'indices.delete_template' => { | ||||
974 | doc => "indices-templates", | ||||
975 | method => "DELETE", | ||||
976 | parts => { name => { required => 1 } }, | ||||
977 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||||
978 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
979 | }, | ||||
980 | |||||
981 | 'indices.delete_warmer' => { | ||||
982 | doc => "indices-warmers", | ||||
983 | method => "DELETE", | ||||
984 | parts => { | ||||
985 | index => { multi => 1, required => 1 }, | ||||
986 | name => { multi => 1, required => 1 }, | ||||
987 | }, | ||||
988 | paths => | ||||
989 | [ [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ] ], | ||||
990 | qs => [ "filter_path", "master_timeout" ], | ||||
991 | }, | ||||
992 | |||||
993 | 'indices.exists' => { | ||||
994 | doc => "indices-exists", | ||||
995 | method => "HEAD", | ||||
996 | parts => { index => { multi => 1, required => 1 } }, | ||||
997 | paths => [ [ { index => 0 }, "{index}" ] ], | ||||
998 | qs => [ | ||||
999 | "allow_no_indices", "expand_wildcards", | ||||
1000 | "ignore_unavailable", "local", | ||||
1001 | ], | ||||
1002 | }, | ||||
1003 | |||||
1004 | 'indices.exists_alias' => { | ||||
1005 | doc => "indices-aliases", | ||||
1006 | method => "HEAD", | ||||
1007 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||||
1008 | paths => [ | ||||
1009 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||||
1010 | [ { index => 0 }, "{index}", "_alias" ], | ||||
1011 | [ { name => 1 }, "_alias", "{name}" ], | ||||
1012 | ], | ||||
1013 | qs => [ | ||||
1014 | "allow_no_indices", "expand_wildcards", | ||||
1015 | "ignore_unavailable", "local", | ||||
1016 | ], | ||||
1017 | }, | ||||
1018 | |||||
1019 | 'indices.exists_template' => { | ||||
1020 | doc => "indices-templates", | ||||
1021 | method => "HEAD", | ||||
1022 | parts => { name => { required => 1 } }, | ||||
1023 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||||
1024 | qs => [ "local", "master_timeout" ], | ||||
1025 | }, | ||||
1026 | |||||
1027 | 'indices.exists_type' => { | ||||
1028 | doc => "indices-types-exists", | ||||
1029 | method => "HEAD", | ||||
1030 | parts => { | ||||
1031 | index => { multi => 1, required => 1 }, | ||||
1032 | type => { multi => 1, required => 1 }, | ||||
1033 | }, | ||||
1034 | paths => [ [ { index => 0, type => 1 }, "{index}", "{type}" ] ], | ||||
1035 | qs => [ | ||||
1036 | "allow_no_indices", "expand_wildcards", | ||||
1037 | "ignore_unavailable", "local", | ||||
1038 | ], | ||||
1039 | }, | ||||
1040 | |||||
1041 | 'indices.flush' => { | ||||
1042 | doc => "indices-flush", | ||||
1043 | method => "POST", | ||||
1044 | parts => { index => { multi => 1 } }, | ||||
1045 | paths => | ||||
1046 | [ [ { index => 0 }, "{index}", "_flush" ], [ {}, "_flush" ] ], | ||||
1047 | qs => [ | ||||
1048 | "allow_no_indices", "expand_wildcards", | ||||
1049 | "filter_path", "force", | ||||
1050 | "ignore_unavailable", "wait_if_ongoing", | ||||
1051 | ], | ||||
1052 | }, | ||||
1053 | |||||
1054 | 'indices.flush_synced' => { | ||||
1055 | doc => "indices-synced-flush", | ||||
1056 | method => "POST", | ||||
1057 | parts => { index => { multi => 1 } }, | ||||
1058 | paths => [ | ||||
1059 | [ { index => 0 }, "{index}", "_flush", "synced" ], | ||||
1060 | [ {}, "_flush", "synced" ], | ||||
1061 | ], | ||||
1062 | qs => [ | ||||
1063 | "allow_no_indices", "expand_wildcards", | ||||
1064 | "filter_path", "ignore_unavailable", | ||||
1065 | ], | ||||
1066 | }, | ||||
1067 | |||||
1068 | 'indices.forcemerge' => { | ||||
1069 | doc => "indices-forcemerge", | ||||
1070 | method => "POST", | ||||
1071 | parts => { index => { multi => 1 } }, | ||||
1072 | paths => [ | ||||
1073 | [ { index => 0 }, "{index}", "_forcemerge" ], | ||||
1074 | [ {}, "_forcemerge" ], | ||||
1075 | ], | ||||
1076 | qs => [ | ||||
1077 | "allow_no_indices", "expand_wildcards", | ||||
1078 | "filter_path", "flush", | ||||
1079 | "ignore_unavailable", "max_num_segments", | ||||
1080 | "only_expunge_deletes", "wait_for_merge", | ||||
1081 | ], | ||||
1082 | }, | ||||
1083 | |||||
1084 | 'indices.get' => { | ||||
1085 | doc => "indices-get-index", | ||||
1086 | parts => { | ||||
1087 | feature => { multi => 1 }, | ||||
1088 | index => { multi => 1, required => 1 } | ||||
1089 | }, | ||||
1090 | paths => [ | ||||
1091 | [ { feature => 1, index => 0 }, "{index}", "{feature}" ], | ||||
1092 | [ { index => 0 }, "{index}" ], | ||||
1093 | ], | ||||
1094 | qs => [ | ||||
1095 | "allow_no_indices", "expand_wildcards", | ||||
1096 | "filter_path", "flat_settings", | ||||
1097 | "human", "ignore_unavailable", | ||||
1098 | "local", | ||||
1099 | ], | ||||
1100 | }, | ||||
1101 | |||||
1102 | 'indices.get_alias' => { | ||||
1103 | doc => "indices-aliases", | ||||
1104 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||||
1105 | paths => [ | ||||
1106 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||||
1107 | [ { index => 0 }, "{index}", "_alias" ], | ||||
1108 | [ { name => 1 }, "_alias", "{name}" ], | ||||
1109 | [ {}, "_alias" ], | ||||
1110 | ], | ||||
1111 | qs => [ | ||||
1112 | "allow_no_indices", "expand_wildcards", | ||||
1113 | "filter_path", "ignore_unavailable", | ||||
1114 | "local", | ||||
1115 | ], | ||||
1116 | }, | ||||
1117 | |||||
1118 | 'indices.get_aliases' => { | ||||
1119 | doc => "indices-aliases", | ||||
1120 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||||
1121 | paths => [ | ||||
1122 | [ { index => 0, name => 2 }, "{index}", "_aliases", "{name}" ], | ||||
1123 | [ { index => 0 }, "{index}", "_aliases" ], | ||||
1124 | [ { name => 1 }, "_aliases", "{name}" ], | ||||
1125 | [ {}, "_aliases" ], | ||||
1126 | ], | ||||
1127 | qs => [ "filter_path", "local", "timeout" ], | ||||
1128 | }, | ||||
1129 | |||||
1130 | 'indices.get_field_mapping' => { | ||||
1131 | doc => "indices-get-field-mapping", | ||||
1132 | parts => { | ||||
1133 | fields => { multi => 1, required => 1 }, | ||||
1134 | index => { multi => 1 }, | ||||
1135 | type => { multi => 1 }, | ||||
1136 | }, | ||||
1137 | paths => [ | ||||
1138 | [ { fields => 4, index => 0, type => 2 }, "{index}", | ||||
1139 | "_mapping", "{type}", | ||||
1140 | "field", "{fields}", | ||||
1141 | ], | ||||
1142 | [ { fields => 3, index => 0 }, "{index}", | ||||
1143 | "_mapping", "field", | ||||
1144 | "{fields}", | ||||
1145 | ], | ||||
1146 | [ { fields => 3, type => 1 }, "_mapping", | ||||
1147 | "{type}", "field", | ||||
1148 | "{fields}", | ||||
1149 | ], | ||||
1150 | [ { fields => 2 }, "_mapping", "field", "{fields}" ], | ||||
1151 | ], | ||||
1152 | qs => [ | ||||
1153 | "allow_no_indices", "expand_wildcards", | ||||
1154 | "filter_path", "ignore_unavailable", | ||||
1155 | "include_defaults", "local", | ||||
1156 | ], | ||||
1157 | }, | ||||
1158 | |||||
1159 | 'indices.get_mapping' => { | ||||
1160 | doc => "indices-get-mapping", | ||||
1161 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
1162 | paths => [ | ||||
1163 | [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ], | ||||
1164 | [ { index => 0 }, "{index}", "_mapping" ], | ||||
1165 | [ { type => 1 }, "_mapping", "{type}" ], | ||||
1166 | [ {}, "_mapping" ], | ||||
1167 | ], | ||||
1168 | qs => [ | ||||
1169 | "allow_no_indices", "expand_wildcards", | ||||
1170 | "filter_path", "ignore_unavailable", | ||||
1171 | "local", | ||||
1172 | ], | ||||
1173 | }, | ||||
1174 | |||||
1175 | 'indices.get_settings' => { | ||||
1176 | doc => "indices-get-settings", | ||||
1177 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||||
1178 | paths => [ | ||||
1179 | [ { index => 0, name => 2 }, "{index}", "_settings", "{name}" ], | ||||
1180 | [ { index => 0 }, "{index}", "_settings" ], | ||||
1181 | [ { name => 1 }, "_settings", "{name}" ], | ||||
1182 | [ {}, "_settings" ], | ||||
1183 | ], | ||||
1184 | qs => [ | ||||
1185 | "allow_no_indices", "expand_wildcards", | ||||
1186 | "filter_path", "flat_settings", | ||||
1187 | "human", "ignore_unavailable", | ||||
1188 | "local", | ||||
1189 | ], | ||||
1190 | }, | ||||
1191 | |||||
1192 | 'indices.get_template' => { | ||||
1193 | doc => "indices-templates", | ||||
1194 | parts => { name => { multi => 1 } }, | ||||
1195 | paths => | ||||
1196 | [ [ { name => 1 }, "_template", "{name}" ], [ {}, "_template" ] ], | ||||
1197 | qs => [ "filter_path", "flat_settings", "local", "master_timeout" ], | ||||
1198 | }, | ||||
1199 | |||||
1200 | 'indices.get_upgrade' => { | ||||
1201 | doc => "indices-upgrade", | ||||
1202 | parts => { index => { multi => 1 } }, | ||||
1203 | paths => | ||||
1204 | [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ], | ||||
1205 | qs => [ | ||||
1206 | "allow_no_indices", "expand_wildcards", | ||||
1207 | "filter_path", "human", | ||||
1208 | "ignore_unavailable", | ||||
1209 | ], | ||||
1210 | }, | ||||
1211 | |||||
1212 | 'indices.get_warmer' => { | ||||
1213 | doc => "indices-warmers", | ||||
1214 | parts => { | ||||
1215 | index => { multi => 1 }, | ||||
1216 | name => { multi => 1 }, | ||||
1217 | type => { multi => 1 } | ||||
1218 | }, | ||||
1219 | paths => [ | ||||
1220 | [ { index => 0, name => 3, type => 1 }, | ||||
1221 | "{index}", "{type}", "_warmer", "{name}", | ||||
1222 | ], | ||||
1223 | [ { name => 3, type => 1 }, "_all", | ||||
1224 | "{type}", "_warmer", | ||||
1225 | "{name}" | ||||
1226 | ], | ||||
1227 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||||
1228 | [ { index => 0 }, "{index}", "_warmer" ], | ||||
1229 | [ { name => 1 }, "_warmer", "{name}" ], | ||||
1230 | [ {}, "_warmer" ], | ||||
1231 | ], | ||||
1232 | qs => [ | ||||
1233 | "allow_no_indices", "expand_wildcards", | ||||
1234 | "filter_path", "ignore_unavailable", | ||||
1235 | "local", | ||||
1236 | ], | ||||
1237 | }, | ||||
1238 | |||||
1239 | 'indices.open' => { | ||||
1240 | doc => "indices-open-close", | ||||
1241 | method => "POST", | ||||
1242 | parts => { index => { multi => 1, required => 1 } }, | ||||
1243 | paths => [ [ { index => 0 }, "{index}", "_open" ] ], | ||||
1244 | qs => [ | ||||
1245 | "allow_no_indices", "expand_wildcards", | ||||
1246 | "filter_path", "ignore_unavailable", | ||||
1247 | "master_timeout", "timeout", | ||||
1248 | ], | ||||
1249 | }, | ||||
1250 | |||||
1251 | 'indices.optimize' => { | ||||
1252 | doc => "indices-optimize", | ||||
1253 | method => "POST", | ||||
1254 | parts => { index => { multi => 1 } }, | ||||
1255 | paths => [ | ||||
1256 | [ { index => 0 }, "{index}", "_optimize" ], | ||||
1257 | [ {}, "_optimize" ] | ||||
1258 | ], | ||||
1259 | qs => [ | ||||
1260 | "allow_no_indices", "expand_wildcards", | ||||
1261 | "filter_path", "flush", | ||||
1262 | "ignore_unavailable", "max_num_segments", | ||||
1263 | "only_expunge_deletes", "wait_for_merge", | ||||
1264 | ], | ||||
1265 | }, | ||||
1266 | |||||
1267 | 'indices.put_alias' => { | ||||
1268 | body => {}, | ||||
1269 | doc => "indices-aliases", | ||||
1270 | method => "PUT", | ||||
1271 | parts => { | ||||
1272 | index => { multi => 1, required => 1 }, | ||||
1273 | name => { required => 1 } | ||||
1274 | }, | ||||
1275 | paths => | ||||
1276 | [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ], | ||||
1277 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
1278 | }, | ||||
1279 | |||||
1280 | 'indices.put_mapping' => { | ||||
1281 | body => { required => 1 }, | ||||
1282 | doc => "indices-put-mapping", | ||||
1283 | method => "PUT", | ||||
1284 | parts => { index => { multi => 1 }, type => { required => 1 } }, | ||||
1285 | paths => [ | ||||
1286 | [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ], | ||||
1287 | [ { type => 1 }, "_mapping", "{type}" ], | ||||
1288 | ], | ||||
1289 | qs => [ | ||||
1290 | "allow_no_indices", "expand_wildcards", | ||||
1291 | "filter_path", "ignore_unavailable", | ||||
1292 | "master_timeout", "timeout", | ||||
1293 | "update_all_types", | ||||
1294 | ], | ||||
1295 | }, | ||||
1296 | |||||
1297 | 'indices.put_settings' => { | ||||
1298 | body => { required => 1 }, | ||||
1299 | doc => "indices-update-settings", | ||||
1300 | method => "PUT", | ||||
1301 | parts => { index => { multi => 1 } }, | ||||
1302 | paths => [ | ||||
1303 | [ { index => 0 }, "{index}", "_settings" ], | ||||
1304 | [ {}, "_settings" ] | ||||
1305 | ], | ||||
1306 | qs => [ | ||||
1307 | "allow_no_indices", "expand_wildcards", | ||||
1308 | "filter_path", "flat_settings", | ||||
1309 | "ignore_unavailable", "master_timeout", | ||||
1310 | ], | ||||
1311 | }, | ||||
1312 | |||||
1313 | 'indices.put_template' => { | ||||
1314 | body => { required => 1 }, | ||||
1315 | doc => "indices-templates", | ||||
1316 | method => "PUT", | ||||
1317 | parts => { name => { required => 1 } }, | ||||
1318 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||||
1319 | qs => [ | ||||
1320 | "create", "filter_path", | ||||
1321 | "flat_settings", "master_timeout", | ||||
1322 | "order", "timeout", | ||||
1323 | ], | ||||
1324 | }, | ||||
1325 | |||||
1326 | 'indices.put_warmer' => { | ||||
1327 | body => { required => 1 }, | ||||
1328 | doc => "indices-warmers", | ||||
1329 | method => "PUT", | ||||
1330 | parts => { | ||||
1331 | index => { multi => 1 }, | ||||
1332 | name => { required => 1 }, | ||||
1333 | type => { multi => 1 }, | ||||
1334 | }, | ||||
1335 | paths => [ | ||||
1336 | [ { index => 0, name => 3, type => 1 }, | ||||
1337 | "{index}", "{type}", "_warmer", "{name}", | ||||
1338 | ], | ||||
1339 | [ { name => 3, type => 1 }, "_all", | ||||
1340 | "{type}", "_warmer", | ||||
1341 | "{name}" | ||||
1342 | ], | ||||
1343 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||||
1344 | [ { name => 1 }, "_warmer", "{name}" ], | ||||
1345 | ], | ||||
1346 | qs => [ | ||||
1347 | "allow_no_indices", "expand_wildcards", | ||||
1348 | "filter_path", "ignore_unavailable", | ||||
1349 | "master_timeout", "request_cache", | ||||
1350 | ], | ||||
1351 | }, | ||||
1352 | |||||
1353 | 'indices.recovery' => { | ||||
1354 | doc => "indices-recovery", | ||||
1355 | parts => { index => { multi => 1 } }, | ||||
1356 | paths => [ | ||||
1357 | [ { index => 0 }, "{index}", "_recovery" ], | ||||
1358 | [ {}, "_recovery" ] | ||||
1359 | ], | ||||
1360 | qs => [ "active_only", "detailed", "filter_path", "human" ], | ||||
1361 | }, | ||||
1362 | |||||
1363 | 'indices.refresh' => { | ||||
1364 | doc => "indices-refresh", | ||||
1365 | method => "POST", | ||||
1366 | parts => { index => { multi => 1 } }, | ||||
1367 | paths => | ||||
1368 | [ [ { index => 0 }, "{index}", "_refresh" ], [ {}, "_refresh" ] ], | ||||
1369 | qs => [ | ||||
1370 | "allow_no_indices", "expand_wildcards", | ||||
1371 | "filter_path", "force", | ||||
1372 | "ignore_unavailable", | ||||
1373 | ], | ||||
1374 | }, | ||||
1375 | |||||
1376 | 'indices.segments' => { | ||||
1377 | doc => "indices-segments", | ||||
1378 | parts => { index => { multi => 1 } }, | ||||
1379 | paths => [ | ||||
1380 | [ { index => 0 }, "{index}", "_segments" ], | ||||
1381 | [ {}, "_segments" ] | ||||
1382 | ], | ||||
1383 | qs => [ | ||||
1384 | "allow_no_indices", "expand_wildcards", | ||||
1385 | "filter_path", "human", | ||||
1386 | "ignore_unavailable", "verbose", | ||||
1387 | ], | ||||
1388 | }, | ||||
1389 | |||||
1390 | 'indices.shard_stores' => { | ||||
1391 | doc => "indices-shards-stores", | ||||
1392 | parts => { index => { multi => 1 } }, | ||||
1393 | paths => [ | ||||
1394 | [ { index => 0 }, "{index}", "_shard_stores" ], | ||||
1395 | [ {}, "_shard_stores" ], | ||||
1396 | ], | ||||
1397 | qs => [ | ||||
1398 | "allow_no_indices", "expand_wildcards", | ||||
1399 | "filter_path", "ignore_unavailable", | ||||
1400 | "status", | ||||
1401 | ], | ||||
1402 | }, | ||||
1403 | |||||
1404 | 'indices.stats' => { | ||||
1405 | doc => "indices-stats", | ||||
1406 | parts => { index => { multi => 1 }, metric => { multi => 1 } }, | ||||
1407 | paths => [ | ||||
1408 | [ { index => 0, metric => 2 }, "{index}", "_stats", "{metric}" ], | ||||
1409 | [ { index => 0 }, "{index}", "_stats" ], | ||||
1410 | [ { metric => 1 }, "_stats", "{metric}" ], | ||||
1411 | [ {}, "_stats" ], | ||||
1412 | ], | ||||
1413 | qs => [ | ||||
1414 | "completion_fields", "fielddata_fields", | ||||
1415 | "fields", "filter_path", | ||||
1416 | "groups", "human", | ||||
1417 | "level", "types", | ||||
1418 | ], | ||||
1419 | }, | ||||
1420 | |||||
1421 | 'indices.update_aliases' => { | ||||
1422 | body => { required => 1 }, | ||||
1423 | doc => "indices-aliases", | ||||
1424 | method => "POST", | ||||
1425 | parts => {}, | ||||
1426 | paths => [ [ {}, "_aliases" ] ], | ||||
1427 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
1428 | }, | ||||
1429 | |||||
1430 | 'indices.upgrade' => { | ||||
1431 | doc => "indices-upgrade", | ||||
1432 | method => "POST", | ||||
1433 | parts => { index => { multi => 1 } }, | ||||
1434 | paths => | ||||
1435 | [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ], | ||||
1436 | qs => [ | ||||
1437 | "allow_no_indices", "expand_wildcards", | ||||
1438 | "filter_path", "ignore_unavailable", | ||||
1439 | "only_ancient_segments", "wait_for_completion", | ||||
1440 | ], | ||||
1441 | }, | ||||
1442 | |||||
1443 | 'indices.validate_query' => { | ||||
1444 | body => {}, | ||||
1445 | doc => "search-validate", | ||||
1446 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||||
1447 | paths => [ | ||||
1448 | [ { index => 0, type => 1 }, "{index}", | ||||
1449 | "{type}", "_validate", | ||||
1450 | "query", | ||||
1451 | ], | ||||
1452 | [ { type => 1 }, "_all", "{type}", "_validate", "query" ], | ||||
1453 | [ { index => 0 }, "{index}", "_validate", "query" ], | ||||
1454 | [ {}, "_validate", "query" ], | ||||
1455 | ], | ||||
1456 | qs => [ | ||||
1457 | "allow_no_indices", "analyze_wildcard", | ||||
1458 | "analyzer", "default_operator", | ||||
1459 | "df", "expand_wildcards", | ||||
1460 | "explain", "filter_path", | ||||
1461 | "ignore_unavailable", "lenient", | ||||
1462 | "lowercase_expanded_terms", "q", | ||||
1463 | "rewrite", | ||||
1464 | ], | ||||
1465 | }, | ||||
1466 | |||||
1467 | 'nodes.hot_threads' => { | ||||
1468 | doc => "cluster-nodes-hot-threads", | ||||
1469 | parts => { node_id => { multi => 1 } }, | ||||
1470 | paths => [ | ||||
1471 | [ { node_id => 1 }, "_nodes", "{node_id}", "hot_threads" ], | ||||
1472 | [ {}, "_nodes", "hot_threads" ], | ||||
1473 | ], | ||||
1474 | qs => [ | ||||
1475 | "filter_path", "ignore_idle_threads", | ||||
1476 | "interval", "snapshots", | ||||
1477 | "threads", "timeout", | ||||
1478 | "type", | ||||
1479 | ], | ||||
1480 | }, | ||||
1481 | |||||
1482 | 'nodes.info' => { | ||||
1483 | doc => "cluster-nodes-info", | ||||
1484 | parts => { metric => { multi => 1 }, node_id => { multi => 1 } }, | ||||
1485 | paths => [ | ||||
1486 | [ { metric => 2, node_id => 1 }, "_nodes", | ||||
1487 | "{node_id}", "{metric}", | ||||
1488 | ], | ||||
1489 | [ { metric => 2 }, "_nodes", "_all", "{metric}" ], | ||||
1490 | [ { node_id => 1 }, "_nodes", "{node_id}" ], | ||||
1491 | [ {}, "_nodes" ], | ||||
1492 | ], | ||||
1493 | qs => [ "filter_path", "flat_settings", "human", "timeout" ], | ||||
1494 | }, | ||||
1495 | |||||
1496 | 'nodes.stats' => { | ||||
1497 | doc => "cluster-nodes-stats", | ||||
1498 | parts => { | ||||
1499 | index_metric => { multi => 1 }, | ||||
1500 | metric => { multi => 1 }, | ||||
1501 | node_id => { multi => 1 }, | ||||
1502 | }, | ||||
1503 | paths => [ | ||||
1504 | [ { index_metric => 4, metric => 3, node_id => 1 }, | ||||
1505 | "_nodes", "{node_id}", "stats", "{metric}", "{index_metric}", | ||||
1506 | ], | ||||
1507 | [ { index_metric => 4, node_id => 1 }, | ||||
1508 | "_nodes", "{node_id}", "stats", "_all", "{index_metric}", | ||||
1509 | ], | ||||
1510 | [ { index_metric => 3, metric => 2 }, "_nodes", | ||||
1511 | "stats", "{metric}", | ||||
1512 | "{index_metric}", | ||||
1513 | ], | ||||
1514 | [ { index_metric => 3 }, "_nodes", | ||||
1515 | "stats", "_all", | ||||
1516 | "{index_metric}", | ||||
1517 | ], | ||||
1518 | [ { metric => 3, node_id => 1 }, "_nodes", | ||||
1519 | "{node_id}", "stats", | ||||
1520 | "{metric}", | ||||
1521 | ], | ||||
1522 | [ { metric => 2 }, "_nodes", "stats", "{metric}" ], | ||||
1523 | [ { node_id => 1 }, "_nodes", "{node_id}", "stats" ], | ||||
1524 | [ {}, "_nodes", "stats" ], | ||||
1525 | ], | ||||
1526 | qs => [ | ||||
1527 | "completion_fields", "fielddata_fields", | ||||
1528 | "fields", "filter_path", | ||||
1529 | "groups", "human", | ||||
1530 | "level", "timeout", | ||||
1531 | "types", | ||||
1532 | ], | ||||
1533 | }, | ||||
1534 | |||||
1535 | 'snapshot.create' => { | ||||
1536 | body => {}, | ||||
1537 | doc => "modules-snapshots", | ||||
1538 | method => "PUT", | ||||
1539 | parts => { | ||||
1540 | repository => { required => 1 }, | ||||
1541 | snapshot => { required => 1 } | ||||
1542 | }, | ||||
1543 | paths => [ | ||||
1544 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||||
1545 | "{repository}", "{snapshot}", | ||||
1546 | ], | ||||
1547 | ], | ||||
1548 | qs => [ "filter_path", "master_timeout", "wait_for_completion" ], | ||||
1549 | }, | ||||
1550 | |||||
1551 | 'snapshot.create_repository' => { | ||||
1552 | body => { required => 1 }, | ||||
1553 | doc => "modules-snapshots", | ||||
1554 | method => "PUT", | ||||
1555 | parts => { repository => { required => 1 } }, | ||||
1556 | paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ], | ||||
1557 | qs => [ "filter_path", "master_timeout", "timeout", "verify" ], | ||||
1558 | }, | ||||
1559 | |||||
1560 | 'snapshot.delete' => { | ||||
1561 | doc => "modules-snapshots", | ||||
1562 | method => "DELETE", | ||||
1563 | parts => { | ||||
1564 | repository => { required => 1 }, | ||||
1565 | snapshot => { required => 1 } | ||||
1566 | }, | ||||
1567 | paths => [ | ||||
1568 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||||
1569 | "{repository}", "{snapshot}", | ||||
1570 | ], | ||||
1571 | ], | ||||
1572 | qs => [ "filter_path", "master_timeout" ], | ||||
1573 | }, | ||||
1574 | |||||
1575 | 'snapshot.delete_repository' => { | ||||
1576 | doc => "modules-snapshots", | ||||
1577 | method => "DELETE", | ||||
1578 | parts => { repository => { multi => 1, required => 1 } }, | ||||
1579 | paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ], | ||||
1580 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
1581 | }, | ||||
1582 | |||||
1583 | 'snapshot.get' => { | ||||
1584 | doc => "modules-snapshots", | ||||
1585 | parts => { | ||||
1586 | repository => { required => 1 }, | ||||
1587 | snapshot => { multi => 1, required => 1 }, | ||||
1588 | }, | ||||
1589 | paths => [ | ||||
1590 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||||
1591 | "{repository}", "{snapshot}", | ||||
1592 | ], | ||||
1593 | ], | ||||
1594 | qs => [ "filter_path", "master_timeout" ], | ||||
1595 | }, | ||||
1596 | |||||
1597 | 'snapshot.get_repository' => { | ||||
1598 | doc => "modules-snapshots", | ||||
1599 | parts => { repository => { multi => 1 } }, | ||||
1600 | paths => [ | ||||
1601 | [ { repository => 1 }, "_snapshot", "{repository}" ], | ||||
1602 | [ {}, "_snapshot" ], | ||||
1603 | ], | ||||
1604 | qs => [ "filter_path", "local", "master_timeout" ], | ||||
1605 | }, | ||||
1606 | |||||
1607 | 'snapshot.restore' => { | ||||
1608 | body => {}, | ||||
1609 | doc => "modules-snapshots", | ||||
1610 | method => "POST", | ||||
1611 | parts => { | ||||
1612 | repository => { required => 1 }, | ||||
1613 | snapshot => { required => 1 } | ||||
1614 | }, | ||||
1615 | paths => [ | ||||
1616 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||||
1617 | "{repository}", "{snapshot}", | ||||
1618 | "_restore", | ||||
1619 | ], | ||||
1620 | ], | ||||
1621 | qs => [ "filter_path", "master_timeout", "wait_for_completion" ], | ||||
1622 | }, | ||||
1623 | |||||
1624 | 'snapshot.status' => { | ||||
1625 | doc => "modules-snapshots", | ||||
1626 | parts => { repository => {}, snapshot => { multi => 1 } }, | ||||
1627 | paths => [ | ||||
1628 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||||
1629 | "{repository}", "{snapshot}", | ||||
1630 | "_status", | ||||
1631 | ], | ||||
1632 | [ { snapshot => 2 }, "_snapshot", | ||||
1633 | "_all", "{snapshot}", | ||||
1634 | "_status" | ||||
1635 | ], | ||||
1636 | [ { repository => 1 }, "_snapshot", "{repository}", "_status" ], | ||||
1637 | [ {}, "_snapshot", "_status" ], | ||||
1638 | ], | ||||
1639 | qs => [ "filter_path", "master_timeout" ], | ||||
1640 | }, | ||||
1641 | |||||
1642 | 'snapshot.verify_repository' => { | ||||
1643 | doc => "modules-snapshots", | ||||
1644 | method => "POST", | ||||
1645 | parts => { repository => { required => 1 } }, | ||||
1646 | paths => [ | ||||
1647 | [ { repository => 1 }, "_snapshot", "{repository}", "_verify" ], | ||||
1648 | ], | ||||
1649 | qs => [ "filter_path", "master_timeout", "timeout" ], | ||||
1650 | }, | ||||
1651 | |||||
1652 | 'tasks.cancel' => { | ||||
1653 | doc => "tasks-cancel", | ||||
1654 | method => "POST", | ||||
1655 | parts => { task_id => {} }, | ||||
1656 | paths => [ | ||||
1657 | [ { task_id => 1 }, "_tasks", "{task_id}", "_cancel" ], | ||||
1658 | [ {}, "_tasks", "_cancel" ], | ||||
1659 | ], | ||||
1660 | qs => [ | ||||
1661 | "actions", "filter_path", "node_id", "parent_node", | ||||
1662 | "parent_task", | ||||
1663 | ], | ||||
1664 | }, | ||||
1665 | |||||
1666 | 'tasks.list' => { | ||||
1667 | doc => "tasks-list", | ||||
1668 | parts => { task_id => {} }, | ||||
1669 | paths => | ||||
1670 | [ [ { task_id => 1 }, "_tasks", "{task_id}" ], [ {}, "_tasks" ] ], | ||||
1671 | qs => [ | ||||
1672 | "actions", "detailed", | ||||
1673 | "filter_path", "node_id", | ||||
1674 | "parent_node", "parent_task", | ||||
1675 | "wait_for_completion", | ||||
1676 | ], | ||||
1677 | }, | ||||
1678 | |||||
1679 | #=== AUTOGEN - END === | ||||
1680 | |||||
1681 | ); | ||||
1682 | |||||
1683 | 1 | 6µs | for ( values %API ) { | ||
1684 | 114 | 176µs | 114 | 913µs | $_->{qs_handlers} = qs_init( @{ $_->{qs} } ); # spent 913µs making 114 calls to Search::Elasticsearch::Util::API::QS::qs_init, avg 8µs/call |
1685 | } | ||||
1686 | |||||
1687 | 1 | 303µs | 1; | ||
1688 | |||||
1689 | =pod | ||||
1690 | |||||
1691 | =encoding UTF-8 | ||||
1692 | |||||
1693 | =head1 NAME | ||||
1694 | |||||
1695 | Search::Elasticsearch::Role::API::2_0 - This class contains the spec for the Elasticsearch APIs | ||||
1696 | |||||
1697 | =head1 VERSION | ||||
1698 | |||||
1699 | version 2.02 | ||||
1700 | |||||
1701 | =head1 DESCRIPTION | ||||
1702 | |||||
1703 | All of the Elasticsearch APIs are defined in this role. The example given below | ||||
1704 | is the definition for the L<Search::Elasticsearch::Client::2_0::Direct/index()> method: | ||||
1705 | |||||
1706 | 'index' => { | ||||
1707 | body => { | ||||
1708 | desc => 'The document', | ||||
1709 | required => 1 | ||||
1710 | }, | ||||
1711 | |||||
1712 | doc => '/api/index_/', | ||||
1713 | method => 'PUT', | ||||
1714 | path => '{index}/{type}/{id|blank}', | ||||
1715 | qs => [ | ||||
1716 | 'consistency', 'op_type', 'parent', 'percolate', | ||||
1717 | 'refresh', 'routing', 'timeout', | ||||
1718 | 'timestamp', 'ttl', 'version', 'version_type' | ||||
1719 | ], | ||||
1720 | }, | ||||
1721 | |||||
1722 | These definitions can be used by different L<Search::Elasticsearch::Role::Client> | ||||
1723 | implementations to provide distinct user interfaces. | ||||
1724 | |||||
1725 | =head1 METHODS | ||||
1726 | |||||
1727 | =head2 C<api()> | ||||
1728 | |||||
1729 | $defn = $api->api($name); | ||||
1730 | |||||
1731 | The only method in this class is the C<api()> method which takes the name | ||||
1732 | of the I<action> and returns its definition. Actions in the | ||||
1733 | C<indices> or C<cluster> namespace use the namespace as a prefix, eg: | ||||
1734 | |||||
1735 | $defn = $e->api('indices.create'); | ||||
1736 | $defn = $e->api('cluster.node_stats'); | ||||
1737 | |||||
1738 | =head1 SEE ALSO | ||||
1739 | |||||
1740 | =over | ||||
1741 | |||||
1742 | =item * | ||||
1743 | |||||
1744 | L<Search::Elasticsearch::Util::API::Path> | ||||
1745 | |||||
1746 | =item * | ||||
1747 | |||||
1748 | L<Search::Elasticsearch::Util::API::QS> | ||||
1749 | |||||
1750 | =item * | ||||
1751 | |||||
1752 | L<Search::Elasticsearch::Client::1_0::Direct> | ||||
1753 | |||||
1754 | =item * | ||||
1755 | |||||
1756 | L<Search::Elasticsearch::Client::0_90::Direct> | ||||
1757 | |||||
1758 | =back | ||||
1759 | |||||
1760 | =head1 AUTHOR | ||||
1761 | |||||
1762 | Clinton Gormley <drtech@cpan.org> | ||||
1763 | |||||
1764 | =head1 COPYRIGHT AND LICENSE | ||||
1765 | |||||
1766 | This software is Copyright (c) 2016 by Elasticsearch BV. | ||||
1767 | |||||
1768 | This is free software, licensed under: | ||||
1769 | |||||
1770 | The Apache License, Version 2.0, January 2004 | ||||
1771 | |||||
1772 | =cut | ||||
1773 | |||||
1774 | 1 | 372µs | 1 | 363µs | __END__ # spent 363µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[/opt/flows/lib/lib/perl5/B/Hooks/EndOfScope/XS.pm:17] |