| 1 | # Licensed to Elasticsearch B.V under one or more agreements. | ||
| 2 | # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
| 3 | # See the LICENSE file in the project root for more information | ||
| 4 | |||
| 5 | package Search::Elasticsearch::Client::2_0::Role::API; | ||
| 6 | $Search::Elasticsearch::Client::2_0::Role::API::VERSION = '7.30_1'; # TRIAL | ||
| 7 | |||
| 8 | $Search::Elasticsearch::Client::2_0::Role::API::VERSION = '7.301'; | ||
| 9 | use Moo::Role; | ||
| 10 | with 'Search::Elasticsearch::Role::API'; | ||
| 11 | |||
| 12 | use Search::Elasticsearch::Util qw(throw); | ||
| 13 | use namespace::clean; | ||
| 14 | |||
| 15 | has 'api_version' => ( is => 'ro', default => '2_0' ); | ||
| 16 | |||
| 17 | our %API; | ||
| 18 | |||
| 19 | #=================================== | ||
| 20 | sub api { | ||
| 21 | #=================================== | ||
| 22 | my $name = $_[1] || return \%API; | ||
| 23 | return $API{$name} | ||
| 24 | || throw( 'Internal', "Unknown api name ($name)" ); | ||
| 25 | } | ||
| 26 | |||
| 27 | #=================================== | ||
| 28 | %API = ( | ||
| 29 | #=================================== | ||
| 30 | |||
| 31 | 'bulk.metadata' => { | ||
| 32 | params => [ | ||
| 33 | 'index', 'type', 'id', 'fields', | ||
| 34 | 'routing', 'parent', 'timestamp', 'ttl', | ||
| 35 | 'version', 'version_type' | ||
| 36 | ] | ||
| 37 | }, | ||
| 38 | 'bulk.update' => { | ||
| 39 | params => [ | ||
| 40 | 'doc', 'upsert', | ||
| 41 | 'doc_as_upsert', 'fields', | ||
| 42 | 'scripted_upsert', 'script', | ||
| 43 | 'script_id', 'script_file', | ||
| 44 | 'params', 'lang', | ||
| 45 | 'detect_noop', '_retry_on_conflict', | ||
| 46 | ] | ||
| 47 | }, | ||
| 48 | 'bulk.required' => { params => [ 'index', 'type' ] }, | ||
| 49 | |||
| 50 | #=== AUTOGEN - START === | ||
| 51 | |||
| 52 | 'bulk' => { | ||
| 53 | body => { required => 1 }, | ||
| 54 | doc => "docs-bulk", | ||
| 55 | method => "POST", | ||
| 56 | parts => { index => {}, type => {} }, | ||
| 57 | paths => [ | ||
| 58 | [ { index => 0, type => 1 }, "{index}", "{type}", "_bulk" ], | ||
| 59 | [ { index => 0 }, "{index}", "_bulk" ], | ||
| 60 | [ {}, "_bulk" ], | ||
| 61 | ], | ||
| 62 | qs => { | ||
| 63 | consistency => "enum", | ||
| 64 | fields => "list", | ||
| 65 | filter_path => "list", | ||
| 66 | refresh => "boolean", | ||
| 67 | routing => "string", | ||
| 68 | timeout => "time", | ||
| 69 | }, | ||
| 70 | serialize => "bulk", | ||
| 71 | }, | ||
| 72 | |||
| 73 | 'clear_scroll' => { | ||
| 74 | body => {}, | ||
| 75 | doc => "search-request-scroll", | ||
| 76 | method => "DELETE", | ||
| 77 | parts => { scroll_id => { multi => 1 } }, | ||
| 78 | paths => [ | ||
| 79 | [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ], | ||
| 80 | [ {}, "_search", "scroll" ], | ||
| 81 | ], | ||
| 82 | qs => { filter_path => "list" }, | ||
| 83 | }, | ||
| 84 | |||
| 85 | 'count' => { | ||
| 86 | body => {}, | ||
| 87 | doc => "search-count", | ||
| 88 | method => "POST", | ||
| 89 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 90 | paths => [ | ||
| 91 | [ { index => 0, type => 1 }, "{index}", "{type}", "_count" ], | ||
| 92 | [ { index => 0 }, "{index}", "_count" ], | ||
| 93 | [ {}, "_count" ], | ||
| 94 | ], | ||
| 95 | qs => { | ||
| 96 | allow_no_indices => "boolean", | ||
| 97 | analyze_wildcard => "boolean", | ||
| 98 | analyzer => "string", | ||
| 99 | default_operator => "enum", | ||
| 100 | df => "string", | ||
| 101 | expand_wildcards => "enum", | ||
| 102 | filter_path => "list", | ||
| 103 | ignore_unavailable => "boolean", | ||
| 104 | lenient => "boolean", | ||
| 105 | lowercase_expanded_terms => "boolean", | ||
| 106 | min_score => "number", | ||
| 107 | preference => "string", | ||
| 108 | q => "string", | ||
| 109 | routing => "string", | ||
| 110 | }, | ||
| 111 | }, | ||
| 112 | |||
| 113 | 'count_percolate' => { | ||
| 114 | body => {}, | ||
| 115 | doc => "search-percolate", | ||
| 116 | parts => { | ||
| 117 | id => {}, | ||
| 118 | index => { required => 1 }, | ||
| 119 | type => { required => 1 } | ||
| 120 | }, | ||
| 121 | paths => [ | ||
| 122 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 123 | "{type}", "{id}", | ||
| 124 | "_percolate", "count", | ||
| 125 | ], | ||
| 126 | [ { index => 0, type => 1 }, "{index}", | ||
| 127 | "{type}", "_percolate", | ||
| 128 | "count", | ||
| 129 | ], | ||
| 130 | ], | ||
| 131 | qs => { | ||
| 132 | allow_no_indices => "boolean", | ||
| 133 | expand_wildcards => "enum", | ||
| 134 | filter_path => "list", | ||
| 135 | ignore_unavailable => "boolean", | ||
| 136 | percolate_index => "string", | ||
| 137 | percolate_type => "string", | ||
| 138 | preference => "string", | ||
| 139 | routing => "list", | ||
| 140 | version => "number", | ||
| 141 | version_type => "enum", | ||
| 142 | }, | ||
| 143 | }, | ||
| 144 | |||
| 145 | 'delete' => { | ||
| 146 | doc => "docs-delete", | ||
| 147 | method => "DELETE", | ||
| 148 | parts => { | ||
| 149 | id => { required => 1 }, | ||
| 150 | index => { required => 1 }, | ||
| 151 | type => { required => 1 }, | ||
| 152 | }, | ||
| 153 | paths => [ | ||
| 154 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 155 | "{type}", "{id}" | ||
| 156 | ], | ||
| 157 | ], | ||
| 158 | qs => { | ||
| 159 | consistency => "enum", | ||
| 160 | filter_path => "list", | ||
| 161 | parent => "string", | ||
| 162 | refresh => "boolean", | ||
| 163 | routing => "string", | ||
| 164 | timeout => "time", | ||
| 165 | version => "number", | ||
| 166 | version_type => "enum", | ||
| 167 | }, | ||
| 168 | }, | ||
| 169 | |||
| 170 | 'delete_by_query' => { | ||
| 171 | body => {}, | ||
| 172 | doc => "plugins-delete-by-query", | ||
| 173 | method => "DELETE", | ||
| 174 | parts => { | ||
| 175 | index => { multi => 1, required => 1 }, | ||
| 176 | type => { multi => 1 } | ||
| 177 | }, | ||
| 178 | paths => [ | ||
| 179 | [ { index => 0, type => 1 }, "{index}", "{type}", "_query" ], | ||
| 180 | [ { index => 0 }, "{index}", "_query" ], | ||
| 181 | ], | ||
| 182 | qs => { | ||
| 183 | allow_no_indices => "boolean", | ||
| 184 | analyzer => "string", | ||
| 185 | default_operator => "enum", | ||
| 186 | df => "string", | ||
| 187 | expand_wildcards => "enum", | ||
| 188 | filter_path => "list", | ||
| 189 | ignore_unavailable => "boolean", | ||
| 190 | q => "string", | ||
| 191 | routing => "string", | ||
| 192 | timeout => "time", | ||
| 193 | }, | ||
| 194 | }, | ||
| 195 | |||
| 196 | 'delete_script' => { | ||
| 197 | doc => "modules-scripting", | ||
| 198 | method => "DELETE", | ||
| 199 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||
| 200 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||
| 201 | qs => { | ||
| 202 | filter_path => "list", | ||
| 203 | version => "number", | ||
| 204 | version_type => "enum" | ||
| 205 | }, | ||
| 206 | }, | ||
| 207 | |||
| 208 | 'delete_template' => { | ||
| 209 | doc => "search-template", | ||
| 210 | method => "DELETE", | ||
| 211 | parts => { id => { required => 1 } }, | ||
| 212 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||
| 213 | qs => { | ||
| 214 | filter_path => "list", | ||
| 215 | version => "number", | ||
| 216 | version_type => "enum" | ||
| 217 | }, | ||
| 218 | }, | ||
| 219 | |||
| 220 | 'exists' => { | ||
| 221 | doc => "docs-get", | ||
| 222 | method => "HEAD", | ||
| 223 | parts => { | ||
| 224 | id => { required => 1 }, | ||
| 225 | index => { required => 1 }, | ||
| 226 | type => { required => 1 }, | ||
| 227 | }, | ||
| 228 | paths => [ | ||
| 229 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 230 | "{type}", "{id}" | ||
| 231 | ], | ||
| 232 | ], | ||
| 233 | qs => { | ||
| 234 | parent => "string", | ||
| 235 | preference => "string", | ||
| 236 | realtime => "boolean", | ||
| 237 | refresh => "boolean", | ||
| 238 | routing => "string", | ||
| 239 | }, | ||
| 240 | }, | ||
| 241 | |||
| 242 | 'explain' => { | ||
| 243 | body => {}, | ||
| 244 | doc => "search-explain", | ||
| 245 | parts => { | ||
| 246 | id => { required => 1 }, | ||
| 247 | index => { required => 1 }, | ||
| 248 | type => { required => 1 }, | ||
| 249 | }, | ||
| 250 | paths => [ | ||
| 251 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 252 | "{type}", "{id}", | ||
| 253 | "_explain", | ||
| 254 | ], | ||
| 255 | ], | ||
| 256 | qs => { | ||
| 257 | _source => "list", | ||
| 258 | _source_exclude => "list", | ||
| 259 | _source_include => "list", | ||
| 260 | analyze_wildcard => "boolean", | ||
| 261 | analyzer => "string", | ||
| 262 | default_operator => "enum", | ||
| 263 | df => "string", | ||
| 264 | fields => "list", | ||
| 265 | filter_path => "list", | ||
| 266 | lenient => "boolean", | ||
| 267 | lowercase_expanded_terms => "boolean", | ||
| 268 | parent => "string", | ||
| 269 | preference => "string", | ||
| 270 | q => "string", | ||
| 271 | routing => "string", | ||
| 272 | }, | ||
| 273 | }, | ||
| 274 | |||
| 275 | 'field_stats' => { | ||
| 276 | body => {}, | ||
| 277 | doc => "search-field-stats", | ||
| 278 | parts => { index => { multi => 1 } }, | ||
| 279 | paths => [ | ||
| 280 | [ { index => 0 }, "{index}", "_field_stats" ], | ||
| 281 | [ {}, "_field_stats" ], | ||
| 282 | ], | ||
| 283 | qs => { | ||
| 284 | allow_no_indices => "boolean", | ||
| 285 | expand_wildcards => "enum", | ||
| 286 | fields => "list", | ||
| 287 | filter_path => "list", | ||
| 288 | ignore_unavailable => "boolean", | ||
| 289 | level => "enum", | ||
| 290 | }, | ||
| 291 | }, | ||
| 292 | |||
| 293 | 'get' => { | ||
| 294 | doc => "docs-get", | ||
| 295 | parts => { | ||
| 296 | id => { required => 1 }, | ||
| 297 | index => { required => 1 }, | ||
| 298 | type => { required => 1 }, | ||
| 299 | }, | ||
| 300 | paths => [ | ||
| 301 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 302 | "{type}", "{id}" | ||
| 303 | ], | ||
| 304 | ], | ||
| 305 | qs => { | ||
| 306 | _source => "list", | ||
| 307 | _source_exclude => "list", | ||
| 308 | _source_include => "list", | ||
| 309 | fields => "list", | ||
| 310 | filter_path => "list", | ||
| 311 | parent => "string", | ||
| 312 | preference => "string", | ||
| 313 | realtime => "boolean", | ||
| 314 | refresh => "boolean", | ||
| 315 | routing => "string", | ||
| 316 | version => "number", | ||
| 317 | version_type => "enum", | ||
| 318 | }, | ||
| 319 | }, | ||
| 320 | |||
| 321 | 'get_script' => { | ||
| 322 | doc => "modules-scripting", | ||
| 323 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||
| 324 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||
| 325 | qs => { | ||
| 326 | filter_path => "list", | ||
| 327 | version => "number", | ||
| 328 | version_type => "enum" | ||
| 329 | }, | ||
| 330 | }, | ||
| 331 | |||
| 332 | 'get_source' => { | ||
| 333 | doc => "docs-get", | ||
| 334 | parts => { | ||
| 335 | id => { required => 1 }, | ||
| 336 | index => { required => 1 }, | ||
| 337 | type => { required => 1 }, | ||
| 338 | }, | ||
| 339 | paths => [ | ||
| 340 | [ { id => 2, index => 0, type => 1 }, | ||
| 341 | "{index}", "{type}", "{id}", "_source", | ||
| 342 | ], | ||
| 343 | ], | ||
| 344 | qs => { | ||
| 345 | _source => "list", | ||
| 346 | _source_exclude => "list", | ||
| 347 | _source_include => "list", | ||
| 348 | filter_path => "list", | ||
| 349 | parent => "string", | ||
| 350 | preference => "string", | ||
| 351 | realtime => "boolean", | ||
| 352 | refresh => "boolean", | ||
| 353 | routing => "string", | ||
| 354 | version => "number", | ||
| 355 | version_type => "enum", | ||
| 356 | }, | ||
| 357 | }, | ||
| 358 | |||
| 359 | 'get_template' => { | ||
| 360 | doc => "search-template", | ||
| 361 | parts => { id => { required => 1 } }, | ||
| 362 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||
| 363 | qs => { | ||
| 364 | filter_path => "list", | ||
| 365 | version => "number", | ||
| 366 | version_type => "enum" | ||
| 367 | }, | ||
| 368 | }, | ||
| 369 | |||
| 370 | 'index' => { | ||
| 371 | body => { required => 1 }, | ||
| 372 | doc => "docs-index_", | ||
| 373 | method => "POST", | ||
| 374 | parts => { | ||
| 375 | id => {}, | ||
| 376 | index => { required => 1 }, | ||
| 377 | type => { required => 1 } | ||
| 378 | }, | ||
| 379 | paths => [ | ||
| 380 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 381 | "{type}", "{id}" | ||
| 382 | ], | ||
| 383 | [ { index => 0, type => 1 }, "{index}", "{type}" ], | ||
| 384 | ], | ||
| 385 | qs => { | ||
| 386 | consistency => "enum", | ||
| 387 | filter_path => "list", | ||
| 388 | op_type => "enum", | ||
| 389 | parent => "string", | ||
| 390 | refresh => "boolean", | ||
| 391 | routing => "string", | ||
| 392 | timeout => "time", | ||
| 393 | timestamp => "time", | ||
| 394 | ttl => "time", | ||
| 395 | version => "number", | ||
| 396 | version_type => "enum", | ||
| 397 | }, | ||
| 398 | }, | ||
| 399 | |||
| 400 | 'info' => { | ||
| 401 | doc => "", | ||
| 402 | parts => {}, | ||
| 403 | paths => [ [ {} ] ], | ||
| 404 | qs => { filter_path => "list" } | ||
| 405 | }, | ||
| 406 | |||
| 407 | 'mget' => { | ||
| 408 | body => { required => 1 }, | ||
| 409 | doc => "docs-multi-get", | ||
| 410 | parts => { index => {}, type => {} }, | ||
| 411 | paths => [ | ||
| 412 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mget" ], | ||
| 413 | [ { index => 0 }, "{index}", "_mget" ], | ||
| 414 | [ {}, "_mget" ], | ||
| 415 | ], | ||
| 416 | qs => { | ||
| 417 | _source => "list", | ||
| 418 | _source_exclude => "list", | ||
| 419 | _source_include => "list", | ||
| 420 | fields => "list", | ||
| 421 | filter_path => "list", | ||
| 422 | preference => "string", | ||
| 423 | realtime => "boolean", | ||
| 424 | refresh => "boolean", | ||
| 425 | }, | ||
| 426 | }, | ||
| 427 | |||
| 428 | 'mpercolate' => { | ||
| 429 | body => { required => 1 }, | ||
| 430 | doc => "search-percolate", | ||
| 431 | parts => { index => {}, type => {} }, | ||
| 432 | paths => [ | ||
| 433 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mpercolate" ], | ||
| 434 | [ { index => 0 }, "{index}", "_mpercolate" ], | ||
| 435 | [ {}, "_mpercolate" ], | ||
| 436 | ], | ||
| 437 | qs => { | ||
| 438 | allow_no_indices => "boolean", | ||
| 439 | expand_wildcards => "enum", | ||
| 440 | filter_path => "list", | ||
| 441 | ignore_unavailable => "boolean", | ||
| 442 | }, | ||
| 443 | serialize => "bulk", | ||
| 444 | }, | ||
| 445 | |||
| 446 | 'msearch' => { | ||
| 447 | body => { required => 1 }, | ||
| 448 | doc => "search-multi-search", | ||
| 449 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 450 | paths => [ | ||
| 451 | [ { index => 0, type => 1 }, "{index}", "{type}", "_msearch" ], | ||
| 452 | [ { index => 0 }, "{index}", "_msearch" ], | ||
| 453 | [ {}, "_msearch" ], | ||
| 454 | ], | ||
| 455 | qs => { filter_path => "list", search_type => "enum" }, | ||
| 456 | serialize => "bulk", | ||
| 457 | }, | ||
| 458 | |||
| 459 | 'mtermvectors' => { | ||
| 460 | body => {}, | ||
| 461 | doc => "docs-multi-termvectors", | ||
| 462 | parts => { index => {}, type => {} }, | ||
| 463 | paths => [ | ||
| 464 | [ { index => 0, type => 1 }, "{index}", | ||
| 465 | "{type}", "_mtermvectors" | ||
| 466 | ], | ||
| 467 | [ { index => 0 }, "{index}", "_mtermvectors" ], | ||
| 468 | [ {}, "_mtermvectors" ], | ||
| 469 | ], | ||
| 470 | qs => { | ||
| 471 | field_statistics => "boolean", | ||
| 472 | fields => "list", | ||
| 473 | filter_path => "list", | ||
| 474 | ids => "list", | ||
| 475 | offsets => "boolean", | ||
| 476 | parent => "string", | ||
| 477 | payloads => "boolean", | ||
| 478 | positions => "boolean", | ||
| 479 | preference => "string", | ||
| 480 | realtime => "boolean", | ||
| 481 | routing => "string", | ||
| 482 | term_statistics => "boolean", | ||
| 483 | version => "number", | ||
| 484 | version_type => "enum", | ||
| 485 | }, | ||
| 486 | }, | ||
| 487 | |||
| 488 | 'percolate' => { | ||
| 489 | body => {}, | ||
| 490 | doc => "search-percolate", | ||
| 491 | parts => { | ||
| 492 | id => {}, | ||
| 493 | index => { required => 1 }, | ||
| 494 | type => { required => 1 } | ||
| 495 | }, | ||
| 496 | paths => [ | ||
| 497 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 498 | "{type}", "{id}", | ||
| 499 | "_percolate", | ||
| 500 | ], | ||
| 501 | [ { index => 0, type => 1 }, "{index}", "{type}", "_percolate" ], | ||
| 502 | ], | ||
| 503 | qs => { | ||
| 504 | allow_no_indices => "boolean", | ||
| 505 | expand_wildcards => "enum", | ||
| 506 | filter_path => "list", | ||
| 507 | ignore_unavailable => "boolean", | ||
| 508 | percolate_format => "enum", | ||
| 509 | percolate_index => "string", | ||
| 510 | percolate_preference => "string", | ||
| 511 | percolate_routing => "string", | ||
| 512 | percolate_type => "string", | ||
| 513 | preference => "string", | ||
| 514 | routing => "list", | ||
| 515 | version => "number", | ||
| 516 | version_type => "enum", | ||
| 517 | }, | ||
| 518 | }, | ||
| 519 | |||
| 520 | 'ping' => { | ||
| 521 | doc => "", | ||
| 522 | method => "HEAD", | ||
| 523 | parts => {}, | ||
| 524 | paths => [ [ {} ] ], | ||
| 525 | qs => {} | ||
| 526 | }, | ||
| 527 | |||
| 528 | 'put_script' => { | ||
| 529 | body => { required => 1 }, | ||
| 530 | doc => "modules-scripting", | ||
| 531 | method => "PUT", | ||
| 532 | parts => { id => { required => 1 }, lang => { required => 1 } }, | ||
| 533 | paths => [ [ { id => 2, lang => 1 }, "_scripts", "{lang}", "{id}" ] ], | ||
| 534 | qs => { | ||
| 535 | filter_path => "list", | ||
| 536 | op_type => "enum", | ||
| 537 | version => "number", | ||
| 538 | version_type => "enum", | ||
| 539 | }, | ||
| 540 | }, | ||
| 541 | |||
| 542 | 'put_template' => { | ||
| 543 | body => { required => 1 }, | ||
| 544 | doc => "search-template", | ||
| 545 | method => "PUT", | ||
| 546 | parts => { id => { required => 1 } }, | ||
| 547 | paths => [ [ { id => 2 }, "_search", "template", "{id}" ] ], | ||
| 548 | qs => { | ||
| 549 | filter_path => "list", | ||
| 550 | op_type => "enum", | ||
| 551 | version => "number", | ||
| 552 | version_type => "enum", | ||
| 553 | }, | ||
| 554 | }, | ||
| 555 | |||
| 556 | 'reindex' => { | ||
| 557 | body => { required => 1 }, | ||
| 558 | doc => "plugins-reindex", | ||
| 559 | method => "POST", | ||
| 560 | parts => {}, | ||
| 561 | paths => [ [ {}, "_reindex" ] ], | ||
| 562 | qs => { | ||
| 563 | consistency => "enum", | ||
| 564 | filter_path => "list", | ||
| 565 | refresh => "boolean", | ||
| 566 | requests_per_second => "number", | ||
| 567 | timeout => "time", | ||
| 568 | wait_for_completion => "boolean", | ||
| 569 | }, | ||
| 570 | }, | ||
| 571 | |||
| 572 | 'reindex_rethrottle' => { | ||
| 573 | doc => "docs-reindex", | ||
| 574 | method => "POST", | ||
| 575 | parts => { task_id => {} }, | ||
| 576 | paths => | ||
| 577 | [ [ { task_id => 1 }, "_reindex", "{task_id}", "_rethrottle" ] ], | ||
| 578 | qs => { filter_path => "list", requests_per_second => "number" }, | ||
| 579 | }, | ||
| 580 | |||
| 581 | 'render_search_template' => { | ||
| 582 | body => {}, | ||
| 583 | doc => "search-template", | ||
| 584 | parts => { id => {} }, | ||
| 585 | paths => [ | ||
| 586 | [ { id => 2 }, "_render", "template", "{id}" ], | ||
| 587 | [ {}, "_render", "template" ], | ||
| 588 | ], | ||
| 589 | qs => { filter_path => "list" }, | ||
| 590 | }, | ||
| 591 | |||
| 592 | 'scroll' => { | ||
| 593 | body => {}, | ||
| 594 | doc => "search-request-scroll", | ||
| 595 | parts => { scroll_id => {} }, | ||
| 596 | paths => [ | ||
| 597 | [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ], | ||
| 598 | [ {}, "_search", "scroll" ], | ||
| 599 | ], | ||
| 600 | qs => { filter_path => "list", scroll => "time" }, | ||
| 601 | }, | ||
| 602 | |||
| 603 | 'search' => { | ||
| 604 | body => {}, | ||
| 605 | doc => "search-search", | ||
| 606 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 607 | paths => [ | ||
| 608 | [ { index => 0, type => 1 }, "{index}", "{type}", "_search" ], | ||
| 609 | [ { index => 0 }, "{index}", "_search" ], | ||
| 610 | [ {}, "_search" ], | ||
| 611 | ], | ||
| 612 | qs => { | ||
| 613 | _source => "list", | ||
| 614 | _source_exclude => "list", | ||
| 615 | _source_include => "list", | ||
| 616 | allow_no_indices => "boolean", | ||
| 617 | analyze_wildcard => "boolean", | ||
| 618 | analyzer => "string", | ||
| 619 | default_operator => "enum", | ||
| 620 | df => "string", | ||
| 621 | expand_wildcards => "enum", | ||
| 622 | explain => "boolean", | ||
| 623 | fielddata_fields => "list", | ||
| 624 | fields => "list", | ||
| 625 | filter_path => "list", | ||
| 626 | from => "number", | ||
| 627 | ignore_unavailable => "boolean", | ||
| 628 | lenient => "boolean", | ||
| 629 | lowercase_expanded_terms => "boolean", | ||
| 630 | preference => "string", | ||
| 631 | q => "string", | ||
| 632 | request_cache => "boolean", | ||
| 633 | routing => "list", | ||
| 634 | scroll => "time", | ||
| 635 | search_type => "enum", | ||
| 636 | size => "number", | ||
| 637 | sort => "list", | ||
| 638 | stats => "list", | ||
| 639 | suggest_field => "string", | ||
| 640 | suggest_mode => "enum", | ||
| 641 | suggest_size => "number", | ||
| 642 | suggest_text => "string", | ||
| 643 | terminate_after => "number", | ||
| 644 | timeout => "time", | ||
| 645 | track_scores => "boolean", | ||
| 646 | version => "boolean", | ||
| 647 | }, | ||
| 648 | }, | ||
| 649 | |||
| 650 | 'search_exists' => { | ||
| 651 | body => {}, | ||
| 652 | doc => "search-exists", | ||
| 653 | method => "POST", | ||
| 654 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 655 | paths => [ | ||
| 656 | [ { index => 0, type => 1 }, "{index}", | ||
| 657 | "{type}", "_search", | ||
| 658 | "exists", | ||
| 659 | ], | ||
| 660 | [ { index => 0 }, "{index}", "_search", "exists" ], | ||
| 661 | [ {}, "_search", "exists" ], | ||
| 662 | ], | ||
| 663 | qs => { | ||
| 664 | allow_no_indices => "boolean", | ||
| 665 | analyze_wildcard => "boolean", | ||
| 666 | analyzer => "string", | ||
| 667 | default_operator => "enum", | ||
| 668 | df => "string", | ||
| 669 | expand_wildcards => "enum", | ||
| 670 | filter_path => "list", | ||
| 671 | ignore_unavailable => "boolean", | ||
| 672 | lenient => "boolean", | ||
| 673 | lowercase_expanded_terms => "boolean", | ||
| 674 | min_score => "number", | ||
| 675 | preference => "string", | ||
| 676 | q => "string", | ||
| 677 | routing => "string", | ||
| 678 | }, | ||
| 679 | }, | ||
| 680 | |||
| 681 | 'search_shards' => { | ||
| 682 | doc => "search-shards", | ||
| 683 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 684 | paths => [ | ||
| 685 | [ { index => 0, type => 1 }, "{index}", | ||
| 686 | "{type}", "_search_shards", | ||
| 687 | ], | ||
| 688 | [ { index => 0 }, "{index}", "_search_shards" ], | ||
| 689 | [ {}, "_search_shards" ], | ||
| 690 | ], | ||
| 691 | qs => { | ||
| 692 | allow_no_indices => "boolean", | ||
| 693 | expand_wildcards => "enum", | ||
| 694 | filter_path => "list", | ||
| 695 | ignore_unavailable => "boolean", | ||
| 696 | local => "boolean", | ||
| 697 | preference => "string", | ||
| 698 | routing => "string", | ||
| 699 | }, | ||
| 700 | }, | ||
| 701 | |||
| 702 | 'search_template' => { | ||
| 703 | body => {}, | ||
| 704 | doc => "search-template", | ||
| 705 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 706 | paths => [ | ||
| 707 | [ { index => 0, type => 1 }, "{index}", | ||
| 708 | "{type}", "_search", | ||
| 709 | "template", | ||
| 710 | ], | ||
| 711 | [ { index => 0 }, "{index}", "_search", "template" ], | ||
| 712 | [ {}, "_search", "template" ], | ||
| 713 | ], | ||
| 714 | qs => { | ||
| 715 | allow_no_indices => "boolean", | ||
| 716 | expand_wildcards => "enum", | ||
| 717 | filter_path => "list", | ||
| 718 | ignore_unavailable => "boolean", | ||
| 719 | preference => "string", | ||
| 720 | routing => "list", | ||
| 721 | scroll => "time", | ||
| 722 | search_type => "enum", | ||
| 723 | }, | ||
| 724 | }, | ||
| 725 | |||
| 726 | 'suggest' => { | ||
| 727 | body => { required => 1 }, | ||
| 728 | doc => "search-suggesters", | ||
| 729 | method => "POST", | ||
| 730 | parts => { index => { multi => 1 } }, | ||
| 731 | paths => | ||
| 732 | [ [ { index => 0 }, "{index}", "_suggest" ], [ {}, "_suggest" ] ], | ||
| 733 | qs => { | ||
| 734 | allow_no_indices => "boolean", | ||
| 735 | expand_wildcards => "enum", | ||
| 736 | filter_path => "list", | ||
| 737 | ignore_unavailable => "boolean", | ||
| 738 | preference => "string", | ||
| 739 | routing => "string", | ||
| 740 | }, | ||
| 741 | }, | ||
| 742 | |||
| 743 | 'termvectors' => { | ||
| 744 | body => {}, | ||
| 745 | doc => "docs-termvectors", | ||
| 746 | parts => { | ||
| 747 | id => {}, | ||
| 748 | index => { required => 1 }, | ||
| 749 | type => { required => 1 } | ||
| 750 | }, | ||
| 751 | paths => [ | ||
| 752 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 753 | "{type}", "{id}", | ||
| 754 | "_termvectors", | ||
| 755 | ], | ||
| 756 | [ { index => 0, type => 1 }, "{index}", "{type}", | ||
| 757 | "_termvectors" | ||
| 758 | ], | ||
| 759 | ], | ||
| 760 | qs => { | ||
| 761 | dfs => "boolean", | ||
| 762 | field_statistics => "boolean", | ||
| 763 | fields => "list", | ||
| 764 | filter_path => "list", | ||
| 765 | offsets => "boolean", | ||
| 766 | parent => "string", | ||
| 767 | payloads => "boolean", | ||
| 768 | positions => "boolean", | ||
| 769 | preference => "string", | ||
| 770 | realtime => "boolean", | ||
| 771 | routing => "string", | ||
| 772 | term_statistics => "boolean", | ||
| 773 | version => "number", | ||
| 774 | version_type => "enum", | ||
| 775 | }, | ||
| 776 | }, | ||
| 777 | |||
| 778 | 'update' => { | ||
| 779 | body => {}, | ||
| 780 | doc => "docs-update", | ||
| 781 | method => "POST", | ||
| 782 | parts => { | ||
| 783 | id => { required => 1 }, | ||
| 784 | index => { required => 1 }, | ||
| 785 | type => { required => 1 }, | ||
| 786 | }, | ||
| 787 | paths => [ | ||
| 788 | [ { id => 2, index => 0, type => 1 }, | ||
| 789 | "{index}", "{type}", "{id}", "_update", | ||
| 790 | ], | ||
| 791 | ], | ||
| 792 | qs => { | ||
| 793 | consistency => "enum", | ||
| 794 | fields => "list", | ||
| 795 | filter_path => "list", | ||
| 796 | lang => "string", | ||
| 797 | parent => "string", | ||
| 798 | refresh => "boolean", | ||
| 799 | retry_on_conflict => "number", | ||
| 800 | routing => "string", | ||
| 801 | script => "string", | ||
| 802 | script_id => "string", | ||
| 803 | scripted_upsert => "boolean", | ||
| 804 | timeout => "time", | ||
| 805 | timestamp => "time", | ||
| 806 | ttl => "time", | ||
| 807 | version => "number", | ||
| 808 | version_type => "enum", | ||
| 809 | }, | ||
| 810 | }, | ||
| 811 | |||
| 812 | 'update_by_query' => { | ||
| 813 | body => {}, | ||
| 814 | doc => "plugins-reindex", | ||
| 815 | method => "POST", | ||
| 816 | parts => { | ||
| 817 | index => { multi => 1, required => 1 }, | ||
| 818 | type => { multi => 1 } | ||
| 819 | }, | ||
| 820 | paths => [ | ||
| 821 | [ { index => 0, type => 1 }, "{index}", | ||
| 822 | "{type}", "_update_by_query", | ||
| 823 | ], | ||
| 824 | [ { index => 0 }, "{index}", "_update_by_query" ], | ||
| 825 | ], | ||
| 826 | qs => { | ||
| 827 | _source => "list", | ||
| 828 | _source_exclude => "list", | ||
| 829 | _source_include => "list", | ||
| 830 | allow_no_indices => "boolean", | ||
| 831 | analyze_wildcard => "boolean", | ||
| 832 | analyzer => "string", | ||
| 833 | conflicts => "enum", | ||
| 834 | consistency => "enum", | ||
| 835 | default_operator => "enum", | ||
| 836 | df => "string", | ||
| 837 | expand_wildcards => "enum", | ||
| 838 | explain => "boolean", | ||
| 839 | fielddata_fields => "list", | ||
| 840 | fields => "list", | ||
| 841 | filter_path => "list", | ||
| 842 | from => "number", | ||
| 843 | ignore_unavailable => "boolean", | ||
| 844 | lenient => "boolean", | ||
| 845 | lowercase_expanded_terms => "boolean", | ||
| 846 | preference => "string", | ||
| 847 | q => "string", | ||
| 848 | refresh => "boolean", | ||
| 849 | request_cache => "boolean", | ||
| 850 | requests_per_second => "number", | ||
| 851 | routing => "list", | ||
| 852 | scroll => "time", | ||
| 853 | scroll_size => "number", | ||
| 854 | search_timeout => "time", | ||
| 855 | search_type => "enum", | ||
| 856 | size => "number", | ||
| 857 | sort => "list", | ||
| 858 | stats => "list", | ||
| 859 | suggest_field => "string", | ||
| 860 | suggest_mode => "enum", | ||
| 861 | suggest_size => "number", | ||
| 862 | suggest_text => "string", | ||
| 863 | terminate_after => "number", | ||
| 864 | timeout => "time", | ||
| 865 | track_scores => "boolean", | ||
| 866 | version => "boolean", | ||
| 867 | version_type => "boolean", | ||
| 868 | wait_for_completion => "boolean", | ||
| 869 | }, | ||
| 870 | }, | ||
| 871 | |||
| 872 | 'cat.aliases' => { | ||
| 873 | doc => "cat-alias", | ||
| 874 | parts => { name => { multi => 1 } }, | ||
| 875 | paths => [ | ||
| 876 | [ { name => 2 }, "_cat", "aliases", "{name}" ], | ||
| 877 | [ {}, "_cat", "aliases" ], | ||
| 878 | ], | ||
| 879 | qs => { | ||
| 880 | h => "list", | ||
| 881 | help => "boolean", | ||
| 882 | local => "boolean", | ||
| 883 | master_timeout => "time", | ||
| 884 | v => "boolean", | ||
| 885 | }, | ||
| 886 | }, | ||
| 887 | |||
| 888 | 'cat.allocation' => { | ||
| 889 | doc => "cat-allocation", | ||
| 890 | parts => { node_id => { multi => 1 } }, | ||
| 891 | paths => [ | ||
| 892 | [ { node_id => 2 }, "_cat", "allocation", "{node_id}" ], | ||
| 893 | [ {}, "_cat", "allocation" ], | ||
| 894 | ], | ||
| 895 | qs => { | ||
| 896 | bytes => "enum", | ||
| 897 | h => "list", | ||
| 898 | help => "boolean", | ||
| 899 | local => "boolean", | ||
| 900 | master_timeout => "time", | ||
| 901 | v => "boolean", | ||
| 902 | }, | ||
| 903 | }, | ||
| 904 | |||
| 905 | 'cat.count' => { | ||
| 906 | doc => "cat-count", | ||
| 907 | parts => { index => { multi => 1 } }, | ||
| 908 | paths => [ | ||
| 909 | [ { index => 2 }, "_cat", "count", "{index}" ], | ||
| 910 | [ {}, "_cat", "count" ], | ||
| 911 | ], | ||
| 912 | qs => { | ||
| 913 | h => "list", | ||
| 914 | help => "boolean", | ||
| 915 | local => "boolean", | ||
| 916 | master_timeout => "time", | ||
| 917 | v => "boolean", | ||
| 918 | }, | ||
| 919 | }, | ||
| 920 | |||
| 921 | 'cat.fielddata' => { | ||
| 922 | doc => "cat-fielddata", | ||
| 923 | parts => { fields => { multi => 1 } }, | ||
| 924 | paths => [ | ||
| 925 | [ { fields => 2 }, "_cat", "fielddata", "{fields}" ], | ||
| 926 | [ {}, "_cat", "fielddata" ], | ||
| 927 | ], | ||
| 928 | qs => { | ||
| 929 | bytes => "enum", | ||
| 930 | h => "list", | ||
| 931 | help => "boolean", | ||
| 932 | local => "boolean", | ||
| 933 | master_timeout => "time", | ||
| 934 | v => "boolean", | ||
| 935 | }, | ||
| 936 | }, | ||
| 937 | |||
| 938 | 'cat.health' => { | ||
| 939 | doc => "cat-health", | ||
| 940 | parts => {}, | ||
| 941 | paths => [ [ {}, "_cat", "health" ] ], | ||
| 942 | qs => { | ||
| 943 | h => "list", | ||
| 944 | help => "boolean", | ||
| 945 | local => "boolean", | ||
| 946 | master_timeout => "time", | ||
| 947 | ts => "boolean", | ||
| 948 | v => "boolean", | ||
| 949 | }, | ||
| 950 | }, | ||
| 951 | |||
| 952 | 'cat.help' => { | ||
| 953 | doc => "cat", | ||
| 954 | parts => {}, | ||
| 955 | paths => [ [ {}, "_cat" ] ], | ||
| 956 | qs => { help => "boolean" }, | ||
| 957 | }, | ||
| 958 | |||
| 959 | 'cat.indices' => { | ||
| 960 | doc => "cat-indices", | ||
| 961 | parts => { index => { multi => 1 } }, | ||
| 962 | paths => [ | ||
| 963 | [ { index => 2 }, "_cat", "indices", "{index}" ], | ||
| 964 | [ {}, "_cat", "indices" ], | ||
| 965 | ], | ||
| 966 | qs => { | ||
| 967 | bytes => "enum", | ||
| 968 | h => "list", | ||
| 969 | help => "boolean", | ||
| 970 | local => "boolean", | ||
| 971 | master_timeout => "time", | ||
| 972 | pri => "boolean", | ||
| 973 | v => "boolean", | ||
| 974 | }, | ||
| 975 | }, | ||
| 976 | |||
| 977 | 'cat.master' => { | ||
| 978 | doc => "cat-master", | ||
| 979 | parts => {}, | ||
| 980 | paths => [ [ {}, "_cat", "master" ] ], | ||
| 981 | qs => { | ||
| 982 | h => "list", | ||
| 983 | help => "boolean", | ||
| 984 | local => "boolean", | ||
| 985 | master_timeout => "time", | ||
| 986 | v => "boolean", | ||
| 987 | }, | ||
| 988 | }, | ||
| 989 | |||
| 990 | 'cat.nodeattrs' => { | ||
| 991 | doc => "cat-nodeattrs", | ||
| 992 | parts => {}, | ||
| 993 | paths => [ [ {}, "_cat", "nodeattrs" ] ], | ||
| 994 | qs => { | ||
| 995 | h => "list", | ||
| 996 | help => "boolean", | ||
| 997 | local => "boolean", | ||
| 998 | master_timeout => "time", | ||
| 999 | v => "boolean", | ||
| 1000 | }, | ||
| 1001 | }, | ||
| 1002 | |||
| 1003 | 'cat.nodes' => { | ||
| 1004 | doc => "cat-nodes", | ||
| 1005 | parts => {}, | ||
| 1006 | paths => [ [ {}, "_cat", "nodes" ] ], | ||
| 1007 | qs => { | ||
| 1008 | h => "list", | ||
| 1009 | help => "boolean", | ||
| 1010 | local => "boolean", | ||
| 1011 | master_timeout => "time", | ||
| 1012 | v => "boolean", | ||
| 1013 | }, | ||
| 1014 | }, | ||
| 1015 | |||
| 1016 | 'cat.pending_tasks' => { | ||
| 1017 | doc => "cat-pending-tasks", | ||
| 1018 | parts => {}, | ||
| 1019 | paths => [ [ {}, "_cat", "pending_tasks" ] ], | ||
| 1020 | qs => { | ||
| 1021 | h => "list", | ||
| 1022 | help => "boolean", | ||
| 1023 | local => "boolean", | ||
| 1024 | master_timeout => "time", | ||
| 1025 | v => "boolean", | ||
| 1026 | }, | ||
| 1027 | }, | ||
| 1028 | |||
| 1029 | 'cat.plugins' => { | ||
| 1030 | doc => "cat-plugins", | ||
| 1031 | parts => {}, | ||
| 1032 | paths => [ [ {}, "_cat", "plugins" ] ], | ||
| 1033 | qs => { | ||
| 1034 | h => "list", | ||
| 1035 | help => "boolean", | ||
| 1036 | local => "boolean", | ||
| 1037 | master_timeout => "time", | ||
| 1038 | v => "boolean", | ||
| 1039 | }, | ||
| 1040 | }, | ||
| 1041 | |||
| 1042 | 'cat.recovery' => { | ||
| 1043 | doc => "cat-recovery", | ||
| 1044 | parts => { index => { multi => 1 } }, | ||
| 1045 | paths => [ | ||
| 1046 | [ { index => 2 }, "_cat", "recovery", "{index}" ], | ||
| 1047 | [ {}, "_cat", "recovery" ], | ||
| 1048 | ], | ||
| 1049 | qs => { | ||
| 1050 | bytes => "enum", | ||
| 1051 | h => "list", | ||
| 1052 | help => "boolean", | ||
| 1053 | master_timeout => "time", | ||
| 1054 | v => "boolean", | ||
| 1055 | }, | ||
| 1056 | }, | ||
| 1057 | |||
| 1058 | 'cat.repositories' => { | ||
| 1059 | doc => "cat-repositories", | ||
| 1060 | parts => {}, | ||
| 1061 | paths => [ [ {}, "_cat", "repositories" ] ], | ||
| 1062 | qs => { | ||
| 1063 | h => "list", | ||
| 1064 | help => "boolean", | ||
| 1065 | local => "boolean", | ||
| 1066 | master_timeout => "time", | ||
| 1067 | v => "boolean", | ||
| 1068 | }, | ||
| 1069 | }, | ||
| 1070 | |||
| 1071 | 'cat.segments' => { | ||
| 1072 | doc => "cat-segments", | ||
| 1073 | parts => { index => { multi => 1 } }, | ||
| 1074 | paths => [ | ||
| 1075 | [ { index => 2 }, "_cat", "segments", "{index}" ], | ||
| 1076 | [ {}, "_cat", "segments" ], | ||
| 1077 | ], | ||
| 1078 | qs => { h => "list", help => "boolean", v => "boolean" }, | ||
| 1079 | }, | ||
| 1080 | |||
| 1081 | 'cat.shards' => { | ||
| 1082 | doc => "cat-shards", | ||
| 1083 | parts => { index => { multi => 1 } }, | ||
| 1084 | paths => [ | ||
| 1085 | [ { index => 2 }, "_cat", "shards", "{index}" ], | ||
| 1086 | [ {}, "_cat", "shards" ], | ||
| 1087 | ], | ||
| 1088 | qs => { | ||
| 1089 | h => "list", | ||
| 1090 | help => "boolean", | ||
| 1091 | local => "boolean", | ||
| 1092 | master_timeout => "time", | ||
| 1093 | v => "boolean", | ||
| 1094 | }, | ||
| 1095 | }, | ||
| 1096 | |||
| 1097 | 'cat.snapshots' => { | ||
| 1098 | doc => "cat-snapshots", | ||
| 1099 | parts => { repository => { multi => 1, required => 1 } }, | ||
| 1100 | paths => | ||
| 1101 | [ [ { repository => 2 }, "_cat", "snapshots", "{repository}" ] ], | ||
| 1102 | qs => { | ||
| 1103 | h => "list", | ||
| 1104 | help => "boolean", | ||
| 1105 | ignore_unavailable => "boolean", | ||
| 1106 | master_timeout => "time", | ||
| 1107 | v => "boolean", | ||
| 1108 | }, | ||
| 1109 | }, | ||
| 1110 | |||
| 1111 | 'cat.thread_pool' => { | ||
| 1112 | doc => "cat-thread-pool", | ||
| 1113 | parts => {}, | ||
| 1114 | paths => [ [ {}, "_cat", "thread_pool" ] ], | ||
| 1115 | qs => { | ||
| 1116 | full_id => "boolean", | ||
| 1117 | h => "list", | ||
| 1118 | help => "boolean", | ||
| 1119 | local => "boolean", | ||
| 1120 | master_timeout => "time", | ||
| 1121 | v => "boolean", | ||
| 1122 | }, | ||
| 1123 | }, | ||
| 1124 | |||
| 1125 | 'cluster.get_settings' => { | ||
| 1126 | doc => "cluster-update-settings", | ||
| 1127 | parts => {}, | ||
| 1128 | paths => [ [ {}, "_cluster", "settings" ] ], | ||
| 1129 | qs => { | ||
| 1130 | filter_path => "list", | ||
| 1131 | flat_settings => "boolean", | ||
| 1132 | master_timeout => "time", | ||
| 1133 | timeout => "time", | ||
| 1134 | }, | ||
| 1135 | }, | ||
| 1136 | |||
| 1137 | 'cluster.health' => { | ||
| 1138 | doc => "cluster-health", | ||
| 1139 | parts => { index => { multi => 1 } }, | ||
| 1140 | paths => [ | ||
| 1141 | [ { index => 2 }, "_cluster", "health", "{index}" ], | ||
| 1142 | [ {}, "_cluster", "health" ], | ||
| 1143 | ], | ||
| 1144 | qs => { | ||
| 1145 | filter_path => "list", | ||
| 1146 | level => "enum", | ||
| 1147 | local => "boolean", | ||
| 1148 | master_timeout => "time", | ||
| 1149 | timeout => "time", | ||
| 1150 | wait_for_active_shards => "number", | ||
| 1151 | wait_for_nodes => "string", | ||
| 1152 | wait_for_relocating_shards => "number", | ||
| 1153 | wait_for_status => "enum", | ||
| 1154 | }, | ||
| 1155 | }, | ||
| 1156 | |||
| 1157 | 'cluster.pending_tasks' => { | ||
| 1158 | doc => "cluster-pending", | ||
| 1159 | parts => {}, | ||
| 1160 | paths => [ [ {}, "_cluster", "pending_tasks" ] ], | ||
| 1161 | qs => { | ||
| 1162 | filter_path => "list", | ||
| 1163 | local => "boolean", | ||
| 1164 | master_timeout => "time" | ||
| 1165 | }, | ||
| 1166 | }, | ||
| 1167 | |||
| 1168 | 'cluster.put_settings' => { | ||
| 1169 | body => {}, | ||
| 1170 | doc => "cluster-update-settings", | ||
| 1171 | method => "PUT", | ||
| 1172 | parts => {}, | ||
| 1173 | paths => [ [ {}, "_cluster", "settings" ] ], | ||
| 1174 | qs => { | ||
| 1175 | filter_path => "list", | ||
| 1176 | flat_settings => "boolean", | ||
| 1177 | master_timeout => "time", | ||
| 1178 | timeout => "time", | ||
| 1179 | }, | ||
| 1180 | }, | ||
| 1181 | |||
| 1182 | 'cluster.reroute' => { | ||
| 1183 | body => {}, | ||
| 1184 | doc => "cluster-reroute", | ||
| 1185 | method => "POST", | ||
| 1186 | parts => {}, | ||
| 1187 | paths => [ [ {}, "_cluster", "reroute" ] ], | ||
| 1188 | qs => { | ||
| 1189 | dry_run => "boolean", | ||
| 1190 | explain => "boolean", | ||
| 1191 | filter_path => "list", | ||
| 1192 | master_timeout => "time", | ||
| 1193 | metric => "list", | ||
| 1194 | timeout => "time", | ||
| 1195 | }, | ||
| 1196 | }, | ||
| 1197 | |||
| 1198 | 'cluster.state' => { | ||
| 1199 | doc => "cluster-state", | ||
| 1200 | parts => { index => { multi => 1 }, metric => { multi => 1 } }, | ||
| 1201 | paths => [ | ||
| 1202 | [ { index => 3, metric => 2 }, "_cluster", | ||
| 1203 | "state", "{metric}", | ||
| 1204 | "{index}", | ||
| 1205 | ], | ||
| 1206 | [ { metric => 2 }, "_cluster", "state", "{metric}" ], | ||
| 1207 | [ {}, "_cluster", "state" ], | ||
| 1208 | ], | ||
| 1209 | qs => { | ||
| 1210 | allow_no_indices => "boolean", | ||
| 1211 | expand_wildcards => "enum", | ||
| 1212 | filter_path => "list", | ||
| 1213 | flat_settings => "boolean", | ||
| 1214 | ignore_unavailable => "boolean", | ||
| 1215 | local => "boolean", | ||
| 1216 | master_timeout => "time", | ||
| 1217 | }, | ||
| 1218 | }, | ||
| 1219 | |||
| 1220 | 'cluster.stats' => { | ||
| 1221 | doc => "cluster-stats", | ||
| 1222 | parts => { node_id => { multi => 1 } }, | ||
| 1223 | paths => [ | ||
| 1224 | [ { node_id => 3 }, "_cluster", "stats", "nodes", "{node_id}" ], | ||
| 1225 | [ {}, "_cluster", "stats" ], | ||
| 1226 | ], | ||
| 1227 | qs => { | ||
| 1228 | filter_path => "list", | ||
| 1229 | flat_settings => "boolean", | ||
| 1230 | human => "boolean", | ||
| 1231 | timeout => "time", | ||
| 1232 | }, | ||
| 1233 | }, | ||
| 1234 | |||
| 1235 | 'indices.analyze' => { | ||
| 1236 | body => {}, | ||
| 1237 | doc => "indices-analyze", | ||
| 1238 | parts => { index => {} }, | ||
| 1239 | paths => | ||
| 1240 | [ [ { index => 0 }, "{index}", "_analyze" ], [ {}, "_analyze" ] ], | ||
| 1241 | qs => { | ||
| 1242 | analyzer => "string", | ||
| 1243 | attributes => "list", | ||
| 1244 | char_filter => "list", | ||
| 1245 | char_filters => "list", | ||
| 1246 | explain => "boolean", | ||
| 1247 | field => "string", | ||
| 1248 | filter => "list", | ||
| 1249 | filter_path => "list", | ||
| 1250 | filters => "list", | ||
| 1251 | format => "enum", | ||
| 1252 | prefer_local => "boolean", | ||
| 1253 | text => "list", | ||
| 1254 | tokenizer => "string", | ||
| 1255 | }, | ||
| 1256 | }, | ||
| 1257 | |||
| 1258 | 'indices.clear_cache' => { | ||
| 1259 | doc => "indices-clearcache", | ||
| 1260 | method => "POST", | ||
| 1261 | parts => { index => { multi => 1 } }, | ||
| 1262 | paths => [ | ||
| 1263 | [ { index => 0 }, "{index}", "_cache", "clear" ], | ||
| 1264 | [ {}, "_cache", "clear" ], | ||
| 1265 | ], | ||
| 1266 | qs => { | ||
| 1267 | allow_no_indices => "boolean", | ||
| 1268 | expand_wildcards => "enum", | ||
| 1269 | fielddata => "boolean", | ||
| 1270 | fields => "list", | ||
| 1271 | filter_path => "list", | ||
| 1272 | ignore_unavailable => "boolean", | ||
| 1273 | query => "boolean", | ||
| 1274 | recycler => "boolean", | ||
| 1275 | request => "boolean", | ||
| 1276 | }, | ||
| 1277 | }, | ||
| 1278 | |||
| 1279 | 'indices.close' => { | ||
| 1280 | doc => "indices-open-close", | ||
| 1281 | method => "POST", | ||
| 1282 | parts => { index => { multi => 1, required => 1 } }, | ||
| 1283 | paths => [ [ { index => 0 }, "{index}", "_close" ] ], | ||
| 1284 | qs => { | ||
| 1285 | allow_no_indices => "boolean", | ||
| 1286 | expand_wildcards => "enum", | ||
| 1287 | filter_path => "list", | ||
| 1288 | ignore_unavailable => "boolean", | ||
| 1289 | master_timeout => "time", | ||
| 1290 | timeout => "time", | ||
| 1291 | }, | ||
| 1292 | }, | ||
| 1293 | |||
| 1294 | 'indices.create' => { | ||
| 1295 | body => {}, | ||
| 1296 | doc => "indices-create-index", | ||
| 1297 | method => "PUT", | ||
| 1298 | parts => { index => { required => 1 } }, | ||
| 1299 | paths => [ [ { index => 0 }, "{index}" ] ], | ||
| 1300 | qs => { | ||
| 1301 | filter_path => "list", | ||
| 1302 | master_timeout => "time", | ||
| 1303 | timeout => "time", | ||
| 1304 | update_all_types => "boolean", | ||
| 1305 | }, | ||
| 1306 | }, | ||
| 1307 | |||
| 1308 | 'indices.delete' => { | ||
| 1309 | doc => "indices-delete-index", | ||
| 1310 | method => "DELETE", | ||
| 1311 | parts => { index => { multi => 1, required => 1 } }, | ||
| 1312 | paths => [ [ { index => 0 }, "{index}" ] ], | ||
| 1313 | qs => { | ||
| 1314 | filter_path => "list", | ||
| 1315 | master_timeout => "time", | ||
| 1316 | timeout => "time" | ||
| 1317 | }, | ||
| 1318 | }, | ||
| 1319 | |||
| 1320 | 'indices.delete_alias' => { | ||
| 1321 | doc => "indices-aliases", | ||
| 1322 | method => "DELETE", | ||
| 1323 | parts => { | ||
| 1324 | index => { multi => 1, required => 1 }, | ||
| 1325 | name => { multi => 1, required => 1 }, | ||
| 1326 | }, | ||
| 1327 | paths => | ||
| 1328 | [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ], | ||
| 1329 | qs => { | ||
| 1330 | filter_path => "list", | ||
| 1331 | master_timeout => "time", | ||
| 1332 | timeout => "time" | ||
| 1333 | }, | ||
| 1334 | }, | ||
| 1335 | |||
| 1336 | 'indices.delete_template' => { | ||
| 1337 | doc => "indices-templates", | ||
| 1338 | method => "DELETE", | ||
| 1339 | parts => { name => { required => 1 } }, | ||
| 1340 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||
| 1341 | qs => { | ||
| 1342 | filter_path => "list", | ||
| 1343 | master_timeout => "time", | ||
| 1344 | timeout => "time" | ||
| 1345 | }, | ||
| 1346 | }, | ||
| 1347 | |||
| 1348 | 'indices.delete_warmer' => { | ||
| 1349 | doc => "indices-warmers", | ||
| 1350 | method => "DELETE", | ||
| 1351 | parts => { | ||
| 1352 | index => { multi => 1, required => 1 }, | ||
| 1353 | name => { multi => 1, required => 1 }, | ||
| 1354 | }, | ||
| 1355 | paths => | ||
| 1356 | [ [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ] ], | ||
| 1357 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 1358 | }, | ||
| 1359 | |||
| 1360 | 'indices.exists' => { | ||
| 1361 | doc => "indices-exists", | ||
| 1362 | method => "HEAD", | ||
| 1363 | parts => { index => { multi => 1, required => 1 } }, | ||
| 1364 | paths => [ [ { index => 0 }, "{index}" ] ], | ||
| 1365 | qs => { | ||
| 1366 | allow_no_indices => "boolean", | ||
| 1367 | expand_wildcards => "enum", | ||
| 1368 | ignore_unavailable => "boolean", | ||
| 1369 | local => "boolean", | ||
| 1370 | }, | ||
| 1371 | }, | ||
| 1372 | |||
| 1373 | 'indices.exists_alias' => { | ||
| 1374 | doc => "indices-aliases", | ||
| 1375 | method => "HEAD", | ||
| 1376 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||
| 1377 | paths => [ | ||
| 1378 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||
| 1379 | [ { index => 0 }, "{index}", "_alias" ], | ||
| 1380 | [ { name => 1 }, "_alias", "{name}" ], | ||
| 1381 | ], | ||
| 1382 | qs => { | ||
| 1383 | allow_no_indices => "boolean", | ||
| 1384 | expand_wildcards => "enum", | ||
| 1385 | ignore_unavailable => "boolean", | ||
| 1386 | local => "boolean", | ||
| 1387 | }, | ||
| 1388 | }, | ||
| 1389 | |||
| 1390 | 'indices.exists_template' => { | ||
| 1391 | doc => "indices-templates", | ||
| 1392 | method => "HEAD", | ||
| 1393 | parts => { name => { required => 1 } }, | ||
| 1394 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||
| 1395 | qs => { local => "boolean", master_timeout => "time" }, | ||
| 1396 | }, | ||
| 1397 | |||
| 1398 | 'indices.exists_type' => { | ||
| 1399 | doc => "indices-types-exists", | ||
| 1400 | method => "HEAD", | ||
| 1401 | parts => { | ||
| 1402 | index => { multi => 1, required => 1 }, | ||
| 1403 | type => { multi => 1, required => 1 }, | ||
| 1404 | }, | ||
| 1405 | paths => [ [ { index => 0, type => 1 }, "{index}", "{type}" ] ], | ||
| 1406 | qs => { | ||
| 1407 | allow_no_indices => "boolean", | ||
| 1408 | expand_wildcards => "enum", | ||
| 1409 | ignore_unavailable => "boolean", | ||
| 1410 | local => "boolean", | ||
| 1411 | }, | ||
| 1412 | }, | ||
| 1413 | |||
| 1414 | 'indices.flush' => { | ||
| 1415 | doc => "indices-flush", | ||
| 1416 | method => "POST", | ||
| 1417 | parts => { index => { multi => 1 } }, | ||
| 1418 | paths => | ||
| 1419 | [ [ { index => 0 }, "{index}", "_flush" ], [ {}, "_flush" ] ], | ||
| 1420 | qs => { | ||
| 1421 | allow_no_indices => "boolean", | ||
| 1422 | expand_wildcards => "enum", | ||
| 1423 | filter_path => "list", | ||
| 1424 | force => "boolean", | ||
| 1425 | ignore_unavailable => "boolean", | ||
| 1426 | wait_if_ongoing => "boolean", | ||
| 1427 | }, | ||
| 1428 | }, | ||
| 1429 | |||
| 1430 | 'indices.flush_synced' => { | ||
| 1431 | doc => "indices-synced-flush", | ||
| 1432 | method => "POST", | ||
| 1433 | parts => { index => { multi => 1 } }, | ||
| 1434 | paths => [ | ||
| 1435 | [ { index => 0 }, "{index}", "_flush", "synced" ], | ||
| 1436 | [ {}, "_flush", "synced" ], | ||
| 1437 | ], | ||
| 1438 | qs => { | ||
| 1439 | allow_no_indices => "boolean", | ||
| 1440 | expand_wildcards => "enum", | ||
| 1441 | filter_path => "list", | ||
| 1442 | ignore_unavailable => "boolean", | ||
| 1443 | }, | ||
| 1444 | }, | ||
| 1445 | |||
| 1446 | 'indices.forcemerge' => { | ||
| 1447 | doc => "indices-forcemerge", | ||
| 1448 | method => "POST", | ||
| 1449 | parts => { index => { multi => 1 } }, | ||
| 1450 | paths => [ | ||
| 1451 | [ { index => 0 }, "{index}", "_forcemerge" ], | ||
| 1452 | [ {}, "_forcemerge" ], | ||
| 1453 | ], | ||
| 1454 | qs => { | ||
| 1455 | allow_no_indices => "boolean", | ||
| 1456 | expand_wildcards => "enum", | ||
| 1457 | filter_path => "list", | ||
| 1458 | flush => "boolean", | ||
| 1459 | ignore_unavailable => "boolean", | ||
| 1460 | max_num_segments => "number", | ||
| 1461 | only_expunge_deletes => "boolean", | ||
| 1462 | wait_for_merge => "boolean", | ||
| 1463 | }, | ||
| 1464 | }, | ||
| 1465 | |||
| 1466 | 'indices.get' => { | ||
| 1467 | doc => "indices-get-index", | ||
| 1468 | parts => { | ||
| 1469 | feature => { multi => 1 }, | ||
| 1470 | index => { multi => 1, required => 1 } | ||
| 1471 | }, | ||
| 1472 | paths => [ | ||
| 1473 | [ { feature => 1, index => 0 }, "{index}", "{feature}" ], | ||
| 1474 | [ { index => 0 }, "{index}" ], | ||
| 1475 | ], | ||
| 1476 | qs => { | ||
| 1477 | allow_no_indices => "boolean", | ||
| 1478 | expand_wildcards => "enum", | ||
| 1479 | filter_path => "list", | ||
| 1480 | flat_settings => "boolean", | ||
| 1481 | human => "boolean", | ||
| 1482 | ignore_unavailable => "boolean", | ||
| 1483 | local => "boolean", | ||
| 1484 | }, | ||
| 1485 | }, | ||
| 1486 | |||
| 1487 | 'indices.get_alias' => { | ||
| 1488 | doc => "indices-aliases", | ||
| 1489 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||
| 1490 | paths => [ | ||
| 1491 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||
| 1492 | [ { index => 0 }, "{index}", "_alias" ], | ||
| 1493 | [ { name => 1 }, "_alias", "{name}" ], | ||
| 1494 | [ {}, "_alias" ], | ||
| 1495 | ], | ||
| 1496 | qs => { | ||
| 1497 | allow_no_indices => "boolean", | ||
| 1498 | expand_wildcards => "enum", | ||
| 1499 | filter_path => "list", | ||
| 1500 | ignore_unavailable => "boolean", | ||
| 1501 | local => "boolean", | ||
| 1502 | }, | ||
| 1503 | }, | ||
| 1504 | |||
| 1505 | 'indices.get_aliases' => { | ||
| 1506 | doc => "indices-aliases", | ||
| 1507 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||
| 1508 | paths => [ | ||
| 1509 | [ { index => 0, name => 2 }, "{index}", "_aliases", "{name}" ], | ||
| 1510 | [ { index => 0 }, "{index}", "_aliases" ], | ||
| 1511 | [ { name => 1 }, "_aliases", "{name}" ], | ||
| 1512 | [ {}, "_aliases" ], | ||
| 1513 | ], | ||
| 1514 | qs => | ||
| 1515 | { filter_path => "list", local => "boolean", timeout => "time" }, | ||
| 1516 | }, | ||
| 1517 | |||
| 1518 | 'indices.get_field_mapping' => { | ||
| 1519 | doc => "indices-get-field-mapping", | ||
| 1520 | parts => { | ||
| 1521 | fields => { multi => 1, required => 1 }, | ||
| 1522 | index => { multi => 1 }, | ||
| 1523 | type => { multi => 1 }, | ||
| 1524 | }, | ||
| 1525 | paths => [ | ||
| 1526 | [ { fields => 4, index => 0, type => 2 }, "{index}", | ||
| 1527 | "_mapping", "{type}", | ||
| 1528 | "field", "{fields}", | ||
| 1529 | ], | ||
| 1530 | [ { fields => 3, index => 0 }, "{index}", | ||
| 1531 | "_mapping", "field", | ||
| 1532 | "{fields}", | ||
| 1533 | ], | ||
| 1534 | [ { fields => 3, type => 1 }, "_mapping", | ||
| 1535 | "{type}", "field", | ||
| 1536 | "{fields}", | ||
| 1537 | ], | ||
| 1538 | [ { fields => 2 }, "_mapping", "field", "{fields}" ], | ||
| 1539 | ], | ||
| 1540 | qs => { | ||
| 1541 | allow_no_indices => "boolean", | ||
| 1542 | expand_wildcards => "enum", | ||
| 1543 | filter_path => "list", | ||
| 1544 | ignore_unavailable => "boolean", | ||
| 1545 | include_defaults => "boolean", | ||
| 1546 | local => "boolean", | ||
| 1547 | }, | ||
| 1548 | }, | ||
| 1549 | |||
| 1550 | 'indices.get_mapping' => { | ||
| 1551 | doc => "indices-get-mapping", | ||
| 1552 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 1553 | paths => [ | ||
| 1554 | [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ], | ||
| 1555 | [ { index => 0 }, "{index}", "_mapping" ], | ||
| 1556 | [ { type => 1 }, "_mapping", "{type}" ], | ||
| 1557 | [ {}, "_mapping" ], | ||
| 1558 | ], | ||
| 1559 | qs => { | ||
| 1560 | allow_no_indices => "boolean", | ||
| 1561 | expand_wildcards => "enum", | ||
| 1562 | filter_path => "list", | ||
| 1563 | ignore_unavailable => "boolean", | ||
| 1564 | local => "boolean", | ||
| 1565 | }, | ||
| 1566 | }, | ||
| 1567 | |||
| 1568 | 'indices.get_settings' => { | ||
| 1569 | doc => "indices-get-settings", | ||
| 1570 | parts => { index => { multi => 1 }, name => { multi => 1 } }, | ||
| 1571 | paths => [ | ||
| 1572 | [ { index => 0, name => 2 }, "{index}", "_settings", "{name}" ], | ||
| 1573 | [ { index => 0 }, "{index}", "_settings" ], | ||
| 1574 | [ { name => 1 }, "_settings", "{name}" ], | ||
| 1575 | [ {}, "_settings" ], | ||
| 1576 | ], | ||
| 1577 | qs => { | ||
| 1578 | allow_no_indices => "boolean", | ||
| 1579 | expand_wildcards => "enum", | ||
| 1580 | filter_path => "list", | ||
| 1581 | flat_settings => "boolean", | ||
| 1582 | human => "boolean", | ||
| 1583 | ignore_unavailable => "boolean", | ||
| 1584 | local => "boolean", | ||
| 1585 | }, | ||
| 1586 | }, | ||
| 1587 | |||
| 1588 | 'indices.get_template' => { | ||
| 1589 | doc => "indices-templates", | ||
| 1590 | parts => { name => { multi => 1 } }, | ||
| 1591 | paths => | ||
| 1592 | [ [ { name => 1 }, "_template", "{name}" ], [ {}, "_template" ] ], | ||
| 1593 | qs => { | ||
| 1594 | filter_path => "list", | ||
| 1595 | flat_settings => "boolean", | ||
| 1596 | local => "boolean", | ||
| 1597 | master_timeout => "time", | ||
| 1598 | }, | ||
| 1599 | }, | ||
| 1600 | |||
| 1601 | 'indices.get_upgrade' => { | ||
| 1602 | doc => "indices-upgrade", | ||
| 1603 | parts => { index => { multi => 1 } }, | ||
| 1604 | paths => | ||
| 1605 | [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ], | ||
| 1606 | qs => { | ||
| 1607 | allow_no_indices => "boolean", | ||
| 1608 | expand_wildcards => "enum", | ||
| 1609 | filter_path => "list", | ||
| 1610 | human => "boolean", | ||
| 1611 | ignore_unavailable => "boolean", | ||
| 1612 | }, | ||
| 1613 | }, | ||
| 1614 | |||
| 1615 | 'indices.get_warmer' => { | ||
| 1616 | doc => "indices-warmers", | ||
| 1617 | parts => { | ||
| 1618 | index => { multi => 1 }, | ||
| 1619 | name => { multi => 1 }, | ||
| 1620 | type => { multi => 1 } | ||
| 1621 | }, | ||
| 1622 | paths => [ | ||
| 1623 | [ { index => 0, name => 3, type => 1 }, | ||
| 1624 | "{index}", "{type}", "_warmer", "{name}", | ||
| 1625 | ], | ||
| 1626 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||
| 1627 | [ { index => 0 }, "{index}", "_warmer" ], | ||
| 1628 | [ { name => 1 }, "_warmer", "{name}" ], | ||
| 1629 | [ {}, "_warmer" ], | ||
| 1630 | ], | ||
| 1631 | qs => { | ||
| 1632 | allow_no_indices => "boolean", | ||
| 1633 | expand_wildcards => "enum", | ||
| 1634 | filter_path => "list", | ||
| 1635 | ignore_unavailable => "boolean", | ||
| 1636 | local => "boolean", | ||
| 1637 | }, | ||
| 1638 | }, | ||
| 1639 | |||
| 1640 | 'indices.open' => { | ||
| 1641 | doc => "indices-open-close", | ||
| 1642 | method => "POST", | ||
| 1643 | parts => { index => { multi => 1, required => 1 } }, | ||
| 1644 | paths => [ [ { index => 0 }, "{index}", "_open" ] ], | ||
| 1645 | qs => { | ||
| 1646 | allow_no_indices => "boolean", | ||
| 1647 | expand_wildcards => "enum", | ||
| 1648 | filter_path => "list", | ||
| 1649 | ignore_unavailable => "boolean", | ||
| 1650 | master_timeout => "time", | ||
| 1651 | timeout => "time", | ||
| 1652 | }, | ||
| 1653 | }, | ||
| 1654 | |||
| 1655 | 'indices.optimize' => { | ||
| 1656 | doc => "indices-optimize", | ||
| 1657 | method => "POST", | ||
| 1658 | parts => { index => { multi => 1 } }, | ||
| 1659 | paths => [ | ||
| 1660 | [ { index => 0 }, "{index}", "_optimize" ], | ||
| 1661 | [ {}, "_optimize" ] | ||
| 1662 | ], | ||
| 1663 | qs => { | ||
| 1664 | allow_no_indices => "boolean", | ||
| 1665 | expand_wildcards => "enum", | ||
| 1666 | filter_path => "list", | ||
| 1667 | flush => "boolean", | ||
| 1668 | ignore_unavailable => "boolean", | ||
| 1669 | max_num_segments => "number", | ||
| 1670 | only_expunge_deletes => "boolean", | ||
| 1671 | wait_for_merge => "boolean", | ||
| 1672 | }, | ||
| 1673 | }, | ||
| 1674 | |||
| 1675 | 'indices.put_alias' => { | ||
| 1676 | body => {}, | ||
| 1677 | doc => "indices-aliases", | ||
| 1678 | method => "PUT", | ||
| 1679 | parts => { | ||
| 1680 | index => { multi => 1, required => 1 }, | ||
| 1681 | name => { required => 1 } | ||
| 1682 | }, | ||
| 1683 | paths => | ||
| 1684 | [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ], | ||
| 1685 | qs => { | ||
| 1686 | filter_path => "list", | ||
| 1687 | master_timeout => "time", | ||
| 1688 | timeout => "time" | ||
| 1689 | }, | ||
| 1690 | }, | ||
| 1691 | |||
| 1692 | 'indices.put_mapping' => { | ||
| 1693 | body => { required => 1 }, | ||
| 1694 | doc => "indices-put-mapping", | ||
| 1695 | method => "PUT", | ||
| 1696 | parts => { index => { multi => 1 }, type => { required => 1 } }, | ||
| 1697 | paths => [ | ||
| 1698 | [ { index => 0, type => 2 }, "{index}", "_mapping", "{type}" ], | ||
| 1699 | [ { type => 1 }, "_mapping", "{type}" ], | ||
| 1700 | ], | ||
| 1701 | qs => { | ||
| 1702 | allow_no_indices => "boolean", | ||
| 1703 | expand_wildcards => "enum", | ||
| 1704 | filter_path => "list", | ||
| 1705 | ignore_unavailable => "boolean", | ||
| 1706 | master_timeout => "time", | ||
| 1707 | timeout => "time", | ||
| 1708 | update_all_types => "boolean", | ||
| 1709 | }, | ||
| 1710 | }, | ||
| 1711 | |||
| 1712 | 'indices.put_settings' => { | ||
| 1713 | body => { required => 1 }, | ||
| 1714 | doc => "indices-update-settings", | ||
| 1715 | method => "PUT", | ||
| 1716 | parts => { index => { multi => 1 } }, | ||
| 1717 | paths => [ | ||
| 1718 | [ { index => 0 }, "{index}", "_settings" ], | ||
| 1719 | [ {}, "_settings" ] | ||
| 1720 | ], | ||
| 1721 | qs => { | ||
| 1722 | allow_no_indices => "boolean", | ||
| 1723 | expand_wildcards => "enum", | ||
| 1724 | filter_path => "list", | ||
| 1725 | flat_settings => "boolean", | ||
| 1726 | ignore_unavailable => "boolean", | ||
| 1727 | master_timeout => "time", | ||
| 1728 | }, | ||
| 1729 | }, | ||
| 1730 | |||
| 1731 | 'indices.put_template' => { | ||
| 1732 | body => { required => 1 }, | ||
| 1733 | doc => "indices-templates", | ||
| 1734 | method => "PUT", | ||
| 1735 | parts => { name => { required => 1 } }, | ||
| 1736 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||
| 1737 | qs => { | ||
| 1738 | create => "boolean", | ||
| 1739 | filter_path => "list", | ||
| 1740 | flat_settings => "boolean", | ||
| 1741 | master_timeout => "time", | ||
| 1742 | order => "number", | ||
| 1743 | timeout => "time", | ||
| 1744 | }, | ||
| 1745 | }, | ||
| 1746 | |||
| 1747 | 'indices.put_warmer' => { | ||
| 1748 | body => { required => 1 }, | ||
| 1749 | doc => "indices-warmers", | ||
| 1750 | method => "PUT", | ||
| 1751 | parts => { | ||
| 1752 | index => { multi => 1 }, | ||
| 1753 | name => { required => 1 }, | ||
| 1754 | type => { multi => 1 }, | ||
| 1755 | }, | ||
| 1756 | paths => [ | ||
| 1757 | [ { index => 0, name => 3, type => 1 }, | ||
| 1758 | "{index}", "{type}", "_warmer", "{name}", | ||
| 1759 | ], | ||
| 1760 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||
| 1761 | [ { name => 1 }, "_warmer", "{name}" ], | ||
| 1762 | ], | ||
| 1763 | qs => { | ||
| 1764 | allow_no_indices => "boolean", | ||
| 1765 | expand_wildcards => "enum", | ||
| 1766 | filter_path => "list", | ||
| 1767 | ignore_unavailable => "boolean", | ||
| 1768 | master_timeout => "time", | ||
| 1769 | request_cache => "boolean", | ||
| 1770 | }, | ||
| 1771 | }, | ||
| 1772 | |||
| 1773 | 'indices.recovery' => { | ||
| 1774 | doc => "indices-recovery", | ||
| 1775 | parts => { index => { multi => 1 } }, | ||
| 1776 | paths => [ | ||
| 1777 | [ { index => 0 }, "{index}", "_recovery" ], | ||
| 1778 | [ {}, "_recovery" ] | ||
| 1779 | ], | ||
| 1780 | qs => { | ||
| 1781 | active_only => "boolean", | ||
| 1782 | detailed => "boolean", | ||
| 1783 | filter_path => "list", | ||
| 1784 | human => "boolean", | ||
| 1785 | }, | ||
| 1786 | }, | ||
| 1787 | |||
| 1788 | 'indices.refresh' => { | ||
| 1789 | doc => "indices-refresh", | ||
| 1790 | method => "POST", | ||
| 1791 | parts => { index => { multi => 1 } }, | ||
| 1792 | paths => | ||
| 1793 | [ [ { index => 0 }, "{index}", "_refresh" ], [ {}, "_refresh" ] ], | ||
| 1794 | qs => { | ||
| 1795 | allow_no_indices => "boolean", | ||
| 1796 | expand_wildcards => "enum", | ||
| 1797 | filter_path => "list", | ||
| 1798 | force => "boolean", | ||
| 1799 | ignore_unavailable => "boolean", | ||
| 1800 | }, | ||
| 1801 | }, | ||
| 1802 | |||
| 1803 | 'indices.segments' => { | ||
| 1804 | doc => "indices-segments", | ||
| 1805 | parts => { index => { multi => 1 } }, | ||
| 1806 | paths => [ | ||
| 1807 | [ { index => 0 }, "{index}", "_segments" ], | ||
| 1808 | [ {}, "_segments" ] | ||
| 1809 | ], | ||
| 1810 | qs => { | ||
| 1811 | allow_no_indices => "boolean", | ||
| 1812 | expand_wildcards => "enum", | ||
| 1813 | filter_path => "list", | ||
| 1814 | human => "boolean", | ||
| 1815 | ignore_unavailable => "boolean", | ||
| 1816 | verbose => "boolean", | ||
| 1817 | }, | ||
| 1818 | }, | ||
| 1819 | |||
| 1820 | 'indices.shard_stores' => { | ||
| 1821 | doc => "indices-shards-stores", | ||
| 1822 | parts => { index => { multi => 1 } }, | ||
| 1823 | paths => [ | ||
| 1824 | [ { index => 0 }, "{index}", "_shard_stores" ], | ||
| 1825 | [ {}, "_shard_stores" ], | ||
| 1826 | ], | ||
| 1827 | qs => { | ||
| 1828 | allow_no_indices => "boolean", | ||
| 1829 | expand_wildcards => "enum", | ||
| 1830 | filter_path => "list", | ||
| 1831 | ignore_unavailable => "boolean", | ||
| 1832 | status => "list", | ||
| 1833 | }, | ||
| 1834 | }, | ||
| 1835 | |||
| 1836 | 'indices.stats' => { | ||
| 1837 | doc => "indices-stats", | ||
| 1838 | parts => { index => { multi => 1 }, metric => { multi => 1 } }, | ||
| 1839 | paths => [ | ||
| 1840 | [ { index => 0, metric => 2 }, "{index}", "_stats", "{metric}" ], | ||
| 1841 | [ { index => 0 }, "{index}", "_stats" ], | ||
| 1842 | [ { metric => 1 }, "_stats", "{metric}" ], | ||
| 1843 | [ {}, "_stats" ], | ||
| 1844 | ], | ||
| 1845 | qs => { | ||
| 1846 | completion_fields => "list", | ||
| 1847 | fielddata_fields => "list", | ||
| 1848 | fields => "list", | ||
| 1849 | filter_path => "list", | ||
| 1850 | groups => "list", | ||
| 1851 | human => "boolean", | ||
| 1852 | level => "enum", | ||
| 1853 | types => "list", | ||
| 1854 | }, | ||
| 1855 | }, | ||
| 1856 | |||
| 1857 | 'indices.update_aliases' => { | ||
| 1858 | body => { required => 1 }, | ||
| 1859 | doc => "indices-aliases", | ||
| 1860 | method => "POST", | ||
| 1861 | parts => {}, | ||
| 1862 | paths => [ [ {}, "_aliases" ] ], | ||
| 1863 | qs => { | ||
| 1864 | filter_path => "list", | ||
| 1865 | master_timeout => "time", | ||
| 1866 | timeout => "time" | ||
| 1867 | }, | ||
| 1868 | }, | ||
| 1869 | |||
| 1870 | 'indices.upgrade' => { | ||
| 1871 | doc => "indices-upgrade", | ||
| 1872 | method => "POST", | ||
| 1873 | parts => { index => { multi => 1 } }, | ||
| 1874 | paths => | ||
| 1875 | [ [ { index => 0 }, "{index}", "_upgrade" ], [ {}, "_upgrade" ] ], | ||
| 1876 | qs => { | ||
| 1877 | allow_no_indices => "boolean", | ||
| 1878 | expand_wildcards => "enum", | ||
| 1879 | filter_path => "list", | ||
| 1880 | ignore_unavailable => "boolean", | ||
| 1881 | only_ancient_segments => "boolean", | ||
| 1882 | wait_for_completion => "boolean", | ||
| 1883 | }, | ||
| 1884 | }, | ||
| 1885 | |||
| 1886 | 'indices.validate_query' => { | ||
| 1887 | body => {}, | ||
| 1888 | doc => "search-validate", | ||
| 1889 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 1890 | paths => [ | ||
| 1891 | [ { index => 0, type => 1 }, "{index}", | ||
| 1892 | "{type}", "_validate", | ||
| 1893 | "query", | ||
| 1894 | ], | ||
| 1895 | [ { index => 0 }, "{index}", "_validate", "query" ], | ||
| 1896 | [ {}, "_validate", "query" ], | ||
| 1897 | ], | ||
| 1898 | qs => { | ||
| 1899 | allow_no_indices => "boolean", | ||
| 1900 | analyze_wildcard => "boolean", | ||
| 1901 | analyzer => "string", | ||
| 1902 | default_operator => "enum", | ||
| 1903 | df => "string", | ||
| 1904 | expand_wildcards => "enum", | ||
| 1905 | explain => "boolean", | ||
| 1906 | filter_path => "list", | ||
| 1907 | ignore_unavailable => "boolean", | ||
| 1908 | lenient => "boolean", | ||
| 1909 | lowercase_expanded_terms => "boolean", | ||
| 1910 | q => "string", | ||
| 1911 | rewrite => "boolean", | ||
| 1912 | }, | ||
| 1913 | }, | ||
| 1914 | |||
| 1915 | 'nodes.hot_threads' => { | ||
| 1916 | doc => "cluster-nodes-hot-threads", | ||
| 1917 | parts => { node_id => { multi => 1 } }, | ||
| 1918 | paths => [ | ||
| 1919 | [ { node_id => 1 }, "_nodes", "{node_id}", "hot_threads" ], | ||
| 1920 | [ {}, "_nodes", "hot_threads" ], | ||
| 1921 | ], | ||
| 1922 | qs => { | ||
| 1923 | filter_path => "list", | ||
| 1924 | ignore_idle_threads => "boolean", | ||
| 1925 | interval => "time", | ||
| 1926 | snapshots => "number", | ||
| 1927 | threads => "number", | ||
| 1928 | timeout => "time", | ||
| 1929 | type => "enum", | ||
| 1930 | }, | ||
| 1931 | }, | ||
| 1932 | |||
| 1933 | 'nodes.info' => { | ||
| 1934 | doc => "cluster-nodes-info", | ||
| 1935 | parts => { metric => { multi => 1 }, node_id => { multi => 1 } }, | ||
| 1936 | paths => [ | ||
| 1937 | [ { metric => 2, node_id => 1 }, "_nodes", | ||
| 1938 | "{node_id}", "{metric}", | ||
| 1939 | ], | ||
| 1940 | [ { metric => 1 }, "_nodes", "{metric}" ], | ||
| 1941 | [ { node_id => 1 }, "_nodes", "{node_id}" ], | ||
| 1942 | [ {}, "_nodes" ], | ||
| 1943 | ], | ||
| 1944 | qs => { | ||
| 1945 | filter_path => "list", | ||
| 1946 | flat_settings => "boolean", | ||
| 1947 | human => "boolean", | ||
| 1948 | timeout => "time", | ||
| 1949 | }, | ||
| 1950 | }, | ||
| 1951 | |||
| 1952 | 'nodes.stats' => { | ||
| 1953 | doc => "cluster-nodes-stats", | ||
| 1954 | parts => { | ||
| 1955 | index_metric => { multi => 1 }, | ||
| 1956 | metric => { multi => 1 }, | ||
| 1957 | node_id => { multi => 1 }, | ||
| 1958 | }, | ||
| 1959 | paths => [ | ||
| 1960 | [ { index_metric => 4, metric => 3, node_id => 1 }, | ||
| 1961 | "_nodes", "{node_id}", "stats", "{metric}", "{index_metric}", | ||
| 1962 | ], | ||
| 1963 | [ { index_metric => 3, metric => 2 }, "_nodes", | ||
| 1964 | "stats", "{metric}", | ||
| 1965 | "{index_metric}", | ||
| 1966 | ], | ||
| 1967 | [ { metric => 3, node_id => 1 }, "_nodes", | ||
| 1968 | "{node_id}", "stats", | ||
| 1969 | "{metric}", | ||
| 1970 | ], | ||
| 1971 | [ { metric => 2 }, "_nodes", "stats", "{metric}" ], | ||
| 1972 | [ { node_id => 1 }, "_nodes", "{node_id}", "stats" ], | ||
| 1973 | [ {}, "_nodes", "stats" ], | ||
| 1974 | ], | ||
| 1975 | qs => { | ||
| 1976 | completion_fields => "list", | ||
| 1977 | fielddata_fields => "list", | ||
| 1978 | fields => "list", | ||
| 1979 | filter_path => "list", | ||
| 1980 | groups => "boolean", | ||
| 1981 | human => "boolean", | ||
| 1982 | level => "enum", | ||
| 1983 | timeout => "time", | ||
| 1984 | types => "list", | ||
| 1985 | }, | ||
| 1986 | }, | ||
| 1987 | |||
| 1988 | 'snapshot.create' => { | ||
| 1989 | body => {}, | ||
| 1990 | doc => "modules-snapshots", | ||
| 1991 | method => "PUT", | ||
| 1992 | parts => { | ||
| 1993 | repository => { required => 1 }, | ||
| 1994 | snapshot => { required => 1 } | ||
| 1995 | }, | ||
| 1996 | paths => [ | ||
| 1997 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||
| 1998 | "{repository}", "{snapshot}", | ||
| 1999 | ], | ||
| 2000 | ], | ||
| 2001 | qs => { | ||
| 2002 | filter_path => "list", | ||
| 2003 | master_timeout => "time", | ||
| 2004 | wait_for_completion => "boolean", | ||
| 2005 | }, | ||
| 2006 | }, | ||
| 2007 | |||
| 2008 | 'snapshot.create_repository' => { | ||
| 2009 | body => { required => 1 }, | ||
| 2010 | doc => "modules-snapshots", | ||
| 2011 | method => "PUT", | ||
| 2012 | parts => { repository => { required => 1 } }, | ||
| 2013 | paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ], | ||
| 2014 | qs => { | ||
| 2015 | filter_path => "list", | ||
| 2016 | master_timeout => "time", | ||
| 2017 | timeout => "time", | ||
| 2018 | verify => "boolean", | ||
| 2019 | }, | ||
| 2020 | }, | ||
| 2021 | |||
| 2022 | 'snapshot.delete' => { | ||
| 2023 | doc => "modules-snapshots", | ||
| 2024 | method => "DELETE", | ||
| 2025 | parts => { | ||
| 2026 | repository => { required => 1 }, | ||
| 2027 | snapshot => { required => 1 } | ||
| 2028 | }, | ||
| 2029 | paths => [ | ||
| 2030 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||
| 2031 | "{repository}", "{snapshot}", | ||
| 2032 | ], | ||
| 2033 | ], | ||
| 2034 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 2035 | }, | ||
| 2036 | |||
| 2037 | 'snapshot.delete_repository' => { | ||
| 2038 | doc => "modules-snapshots", | ||
| 2039 | method => "DELETE", | ||
| 2040 | parts => { repository => { multi => 1, required => 1 } }, | ||
| 2041 | paths => [ [ { repository => 1 }, "_snapshot", "{repository}" ] ], | ||
| 2042 | qs => { | ||
| 2043 | filter_path => "list", | ||
| 2044 | master_timeout => "time", | ||
| 2045 | timeout => "time" | ||
| 2046 | }, | ||
| 2047 | }, | ||
| 2048 | |||
| 2049 | 'snapshot.get' => { | ||
| 2050 | doc => "modules-snapshots", | ||
| 2051 | parts => { | ||
| 2052 | repository => { required => 1 }, | ||
| 2053 | snapshot => { multi => 1, required => 1 }, | ||
| 2054 | }, | ||
| 2055 | paths => [ | ||
| 2056 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||
| 2057 | "{repository}", "{snapshot}", | ||
| 2058 | ], | ||
| 2059 | ], | ||
| 2060 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 2061 | }, | ||
| 2062 | |||
| 2063 | 'snapshot.get_repository' => { | ||
| 2064 | doc => "modules-snapshots", | ||
| 2065 | parts => { repository => { multi => 1 } }, | ||
| 2066 | paths => [ | ||
| 2067 | [ { repository => 1 }, "_snapshot", "{repository}" ], | ||
| 2068 | [ {}, "_snapshot" ], | ||
| 2069 | ], | ||
| 2070 | qs => { | ||
| 2071 | filter_path => "list", | ||
| 2072 | local => "boolean", | ||
| 2073 | master_timeout => "time" | ||
| 2074 | }, | ||
| 2075 | }, | ||
| 2076 | |||
| 2077 | 'snapshot.restore' => { | ||
| 2078 | body => {}, | ||
| 2079 | doc => "modules-snapshots", | ||
| 2080 | method => "POST", | ||
| 2081 | parts => { | ||
| 2082 | repository => { required => 1 }, | ||
| 2083 | snapshot => { required => 1 } | ||
| 2084 | }, | ||
| 2085 | paths => [ | ||
| 2086 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||
| 2087 | "{repository}", "{snapshot}", | ||
| 2088 | "_restore", | ||
| 2089 | ], | ||
| 2090 | ], | ||
| 2091 | qs => { | ||
| 2092 | filter_path => "list", | ||
| 2093 | master_timeout => "time", | ||
| 2094 | wait_for_completion => "boolean", | ||
| 2095 | }, | ||
| 2096 | }, | ||
| 2097 | |||
| 2098 | 'snapshot.status' => { | ||
| 2099 | doc => "modules-snapshots", | ||
| 2100 | parts => { repository => {}, snapshot => { multi => 1 } }, | ||
| 2101 | paths => [ | ||
| 2102 | [ { repository => 1, snapshot => 2 }, "_snapshot", | ||
| 2103 | "{repository}", "{snapshot}", | ||
| 2104 | "_status", | ||
| 2105 | ], | ||
| 2106 | [ { repository => 1 }, "_snapshot", "{repository}", "_status" ], | ||
| 2107 | [ {}, "_snapshot", "_status" ], | ||
| 2108 | ], | ||
| 2109 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 2110 | }, | ||
| 2111 | |||
| 2112 | 'snapshot.verify_repository' => { | ||
| 2113 | doc => "modules-snapshots", | ||
| 2114 | method => "POST", | ||
| 2115 | parts => { repository => { required => 1 } }, | ||
| 2116 | paths => [ | ||
| 2117 | [ { repository => 1 }, "_snapshot", "{repository}", "_verify" ], | ||
| 2118 | ], | ||
| 2119 | qs => { | ||
| 2120 | filter_path => "list", | ||
| 2121 | master_timeout => "time", | ||
| 2122 | timeout => "time" | ||
| 2123 | }, | ||
| 2124 | }, | ||
| 2125 | |||
| 2126 | 'tasks.cancel' => { | ||
| 2127 | doc => "tasks-cancel", | ||
| 2128 | method => "POST", | ||
| 2129 | parts => { task_id => {} }, | ||
| 2130 | paths => [ | ||
| 2131 | [ { task_id => 1 }, "_tasks", "{task_id}", "_cancel" ], | ||
| 2132 | [ {}, "_tasks", "_cancel" ], | ||
| 2133 | ], | ||
| 2134 | qs => { | ||
| 2135 | actions => "list", | ||
| 2136 | filter_path => "list", | ||
| 2137 | node_id => "list", | ||
| 2138 | parent_node => "string", | ||
| 2139 | parent_task => "string", | ||
| 2140 | }, | ||
| 2141 | }, | ||
| 2142 | |||
| 2143 | 'tasks.list' => { | ||
| 2144 | doc => "tasks-list", | ||
| 2145 | parts => { task_id => {} }, | ||
| 2146 | paths => | ||
| 2147 | [ [ { task_id => 1 }, "_tasks", "{task_id}" ], [ {}, "_tasks" ] ], | ||
| 2148 | qs => { | ||
| 2149 | actions => "list", | ||
| 2150 | detailed => "boolean", | ||
| 2151 | filter_path => "list", | ||
| 2152 | node_id => "list", | ||
| 2153 | parent_node => "string", | ||
| 2154 | parent_task => "string", | ||
| 2155 | wait_for_completion => "boolean", | ||
| 2156 | }, | ||
| 2157 | }, | ||
| 2158 | |||
| 2159 | #=== AUTOGEN - END === | ||
| 2160 | |||
| 2161 | ); | ||
| 2162 | |||
| 2163 | __PACKAGE__->_qs_init( \%API ); | ||
| 2164 | 1; | ||
| 2165 | |||
| 2166 | =pod | ||
| 2167 | |||
| 2168 | =encoding UTF-8 | ||
| 2169 | |||
| 2170 | =head1 NAME | ||
| 2171 | |||
| 2172 | Search::Elasticsearch::Client::2_0::Role::API - This class contains the spec for the Elasticsearch APIs | ||
| 2173 | |||
| 2174 | =head1 VERSION | ||
| 2175 | |||
| 2176 | version 7.30_1 | ||
| 2177 | |||
| 2178 | =head1 DESCRIPTION | ||
| 2179 | |||
| 2180 | All of the Elasticsearch APIs are defined in this role. The example given below | ||
| 2181 | is the definition for the L<Search::Elasticsearch::Client::2_0::Direct/index()> method: | ||
| 2182 | |||
| 2183 | 'index' => { | ||
| 2184 | body => { required => 1 }, | ||
| 2185 | doc => "docs-index_", | ||
| 2186 | method => "POST", | ||
| 2187 | parts => { | ||
| 2188 | id => {}, | ||
| 2189 | index => { required => 1 }, | ||
| 2190 | type => { required => 1 } | ||
| 2191 | }, | ||
| 2192 | paths => [ | ||
| 2193 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 2194 | "{type}", "{id}" | ||
| 2195 | ], | ||
| 2196 | [ { index => 0, type => 1 }, "{index}", "{type}" ], | ||
| 2197 | ], | ||
| 2198 | qs => { | ||
| 2199 | consistency => "enum", | ||
| 2200 | filter_path => "list", | ||
| 2201 | op_type => "enum", | ||
| 2202 | parent => "string", | ||
| 2203 | refresh => "boolean", | ||
| 2204 | routing => "string", | ||
| 2205 | timeout => "time", | ||
| 2206 | timestamp => "time", | ||
| 2207 | ttl => "time", | ||
| 2208 | version => "number", | ||
| 2209 | version_type => "enum", | ||
| 2210 | }, | ||
| 2211 | }, | ||
| 2212 | |||
| 2213 | These definitions can be used by different L<Search::Elasticsearch::Role::Client> | ||
| 2214 | implementations to provide distinct user interfaces. | ||
| 2215 | |||
| 2216 | =head1 METHODS | ||
| 2217 | |||
| 2218 | =head2 C<api()> | ||
| 2219 | |||
| 2220 | $defn = $api->api($name); | ||
| 2221 | |||
| 2222 | The only method in this class is the C<api()> method which takes the name | ||
| 2223 | of the I<action> and returns its definition. Actions in the | ||
| 2224 | C<indices> or C<cluster> namespace use the namespace as a prefix, eg: | ||
| 2225 | |||
| 2226 | $defn = $e->api('indices.create'); | ||
| 2227 | $defn = $e->api('cluster.node_stats'); | ||
| 2228 | |||
| 2229 | =head1 SEE ALSO | ||
| 2230 | |||
| 2231 | =over | ||
| 2232 | |||
| 2233 | =item * | ||
| 2234 | |||
| 2235 | L<Search::Elasticsearch::Role::API> | ||
| 2236 | |||
| 2237 | =item * | ||
| 2238 | |||
| 2239 | L<Search::Elasticsearch::Client::2_0::Direct> | ||
| 2240 | |||
| 2241 | =back | ||
| 2242 | |||
| 2243 | =head1 AUTHOR | ||
| 2244 | |||
| 2245 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 2246 | |||
| 2247 | =head1 COPYRIGHT AND LICENSE | ||
| 2248 | |||
| 2249 | This software is Copyright (c) 2020 by Elasticsearch BV. | ||
| 2250 | |||
| 2251 | This is free software, licensed under: | ||
| 2252 | |||
| 2253 | The Apache License, Version 2.0, January 2004 | ||
| 2254 | |||
| 2255 | =cut | ||
| 2256 | |||
| 2257 | __END__ |