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