| 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::0_90::Role::API; | ||
| 6 | $Search::Elasticsearch::Client::0_90::Role::API::VERSION = '7.30_1'; # TRIAL | ||
| 7 | |||
| 8 | $Search::Elasticsearch::Client::0_90::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 => '0_90' ); | ||
| 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', | ||
| 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 | filter_path => "list", | ||
| 65 | refresh => "boolean", | ||
| 66 | replication => "enum", | ||
| 67 | timeout => "time", | ||
| 68 | }, | ||
| 69 | serialize => "bulk", | ||
| 70 | }, | ||
| 71 | |||
| 72 | 'clear_scroll' => { | ||
| 73 | doc => "search-request-scroll", | ||
| 74 | method => "DELETE", | ||
| 75 | parts => { scroll_id => { multi => 1 } }, | ||
| 76 | paths => | ||
| 77 | [ [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ] ], | ||
| 78 | qs => { filter_path => "list" }, | ||
| 79 | }, | ||
| 80 | |||
| 81 | 'count' => { | ||
| 82 | body => {}, | ||
| 83 | doc => "search-count", | ||
| 84 | method => "POST", | ||
| 85 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 86 | paths => [ | ||
| 87 | [ { index => 0, type => 1 }, "{index}", "{type}", "_count" ], | ||
| 88 | [ { index => 0 }, "{index}", "_count" ], | ||
| 89 | [ {}, "_count" ], | ||
| 90 | ], | ||
| 91 | qs => { | ||
| 92 | filter_path => "list", | ||
| 93 | ignore_indices => "enum", | ||
| 94 | min_score => "number", | ||
| 95 | preference => "string", | ||
| 96 | routing => "string", | ||
| 97 | source => "string", | ||
| 98 | }, | ||
| 99 | }, | ||
| 100 | |||
| 101 | 'delete' => { | ||
| 102 | doc => "docs-delete", | ||
| 103 | method => "DELETE", | ||
| 104 | parts => { | ||
| 105 | id => { required => 1 }, | ||
| 106 | index => { required => 1 }, | ||
| 107 | type => { required => 1 }, | ||
| 108 | }, | ||
| 109 | paths => [ | ||
| 110 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 111 | "{type}", "{id}" | ||
| 112 | ], | ||
| 113 | ], | ||
| 114 | qs => { | ||
| 115 | consistency => "enum", | ||
| 116 | filter_path => "list", | ||
| 117 | parent => "string", | ||
| 118 | refresh => "boolean", | ||
| 119 | replication => "enum", | ||
| 120 | routing => "string", | ||
| 121 | timeout => "time", | ||
| 122 | version => "number", | ||
| 123 | version_type => "enum", | ||
| 124 | }, | ||
| 125 | }, | ||
| 126 | |||
| 127 | 'delete_by_query' => { | ||
| 128 | body => {}, | ||
| 129 | doc => "docs-delete-by-query", | ||
| 130 | method => "DELETE", | ||
| 131 | parts => { | ||
| 132 | index => { multi => 1, required => 1 }, | ||
| 133 | type => { multi => 1 } | ||
| 134 | }, | ||
| 135 | paths => [ | ||
| 136 | [ { index => 0, type => 1 }, "{index}", "{type}", "_query" ], | ||
| 137 | [ { index => 0 }, "{index}", "_query" ], | ||
| 138 | ], | ||
| 139 | qs => { | ||
| 140 | analyzer => "string", | ||
| 141 | consistency => "enum", | ||
| 142 | default_operator => "enum", | ||
| 143 | df => "string", | ||
| 144 | filter_path => "list", | ||
| 145 | ignore_indices => "enum", | ||
| 146 | q => "string", | ||
| 147 | replication => "enum", | ||
| 148 | routing => "string", | ||
| 149 | source => "string", | ||
| 150 | timeout => "time", | ||
| 151 | }, | ||
| 152 | }, | ||
| 153 | |||
| 154 | 'exists' => { | ||
| 155 | doc => "docs-get", | ||
| 156 | method => "HEAD", | ||
| 157 | parts => { | ||
| 158 | id => { required => 1 }, | ||
| 159 | index => { required => 1 }, | ||
| 160 | type => { required => 1 }, | ||
| 161 | }, | ||
| 162 | paths => [ | ||
| 163 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 164 | "{type}", "{id}" | ||
| 165 | ], | ||
| 166 | ], | ||
| 167 | qs => { | ||
| 168 | parent => "string", | ||
| 169 | preference => "string", | ||
| 170 | realtime => "boolean", | ||
| 171 | refresh => "boolean", | ||
| 172 | routing => "string", | ||
| 173 | }, | ||
| 174 | }, | ||
| 175 | |||
| 176 | 'explain' => { | ||
| 177 | body => {}, | ||
| 178 | doc => "search-explain", | ||
| 179 | parts => { | ||
| 180 | id => { required => 1 }, | ||
| 181 | index => { required => 1 }, | ||
| 182 | type => { required => 1 }, | ||
| 183 | }, | ||
| 184 | paths => [ | ||
| 185 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 186 | "{type}", "{id}", | ||
| 187 | "_explain", | ||
| 188 | ], | ||
| 189 | ], | ||
| 190 | qs => { | ||
| 191 | _source => "list", | ||
| 192 | _source_exclude => "list", | ||
| 193 | _source_include => "list", | ||
| 194 | analyze_wildcard => "boolean", | ||
| 195 | analyzer => "string", | ||
| 196 | default_operator => "enum", | ||
| 197 | df => "string", | ||
| 198 | fields => "list", | ||
| 199 | filter_path => "list", | ||
| 200 | lenient => "boolean", | ||
| 201 | lowercase_expanded_terms => "boolean", | ||
| 202 | parent => "string", | ||
| 203 | preference => "string", | ||
| 204 | q => "string", | ||
| 205 | routing => "string", | ||
| 206 | source => "string", | ||
| 207 | }, | ||
| 208 | }, | ||
| 209 | |||
| 210 | 'get' => { | ||
| 211 | doc => "docs-get", | ||
| 212 | parts => { | ||
| 213 | id => { required => 1 }, | ||
| 214 | index => { required => 1 }, | ||
| 215 | type => { required => 1 }, | ||
| 216 | }, | ||
| 217 | paths => [ | ||
| 218 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 219 | "{type}", "{id}" | ||
| 220 | ], | ||
| 221 | ], | ||
| 222 | qs => { | ||
| 223 | _source => "list", | ||
| 224 | _source_exclude => "list", | ||
| 225 | _source_include => "list", | ||
| 226 | fields => "list", | ||
| 227 | filter_path => "list", | ||
| 228 | parent => "string", | ||
| 229 | preference => "string", | ||
| 230 | realtime => "boolean", | ||
| 231 | refresh => "boolean", | ||
| 232 | routing => "string", | ||
| 233 | }, | ||
| 234 | }, | ||
| 235 | |||
| 236 | 'get_source' => { | ||
| 237 | doc => "docs-get", | ||
| 238 | parts => { | ||
| 239 | id => { required => 1 }, | ||
| 240 | index => { required => 1 }, | ||
| 241 | type => { required => 1 }, | ||
| 242 | }, | ||
| 243 | paths => [ | ||
| 244 | [ { id => 2, index => 0, type => 1 }, | ||
| 245 | "{index}", "{type}", "{id}", "_source", | ||
| 246 | ], | ||
| 247 | ], | ||
| 248 | qs => { | ||
| 249 | _source => "list", | ||
| 250 | _source_exclude => "list", | ||
| 251 | _source_include => "list", | ||
| 252 | filter_path => "list", | ||
| 253 | parent => "string", | ||
| 254 | preference => "string", | ||
| 255 | realtime => "boolean", | ||
| 256 | refresh => "boolean", | ||
| 257 | routing => "string", | ||
| 258 | version => "number", | ||
| 259 | version_type => "enum", | ||
| 260 | }, | ||
| 261 | }, | ||
| 262 | |||
| 263 | 'index' => { | ||
| 264 | body => { required => 1 }, | ||
| 265 | doc => "docs-index_", | ||
| 266 | method => "POST", | ||
| 267 | parts => { | ||
| 268 | id => {}, | ||
| 269 | index => { required => 1 }, | ||
| 270 | type => { required => 1 } | ||
| 271 | }, | ||
| 272 | paths => [ | ||
| 273 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 274 | "{type}", "{id}" | ||
| 275 | ], | ||
| 276 | [ { index => 0, type => 1 }, "{index}", "{type}" ], | ||
| 277 | ], | ||
| 278 | qs => { | ||
| 279 | consistency => "enum", | ||
| 280 | filter_path => "list", | ||
| 281 | op_type => "enum", | ||
| 282 | parent => "string", | ||
| 283 | percolate => "string", | ||
| 284 | refresh => "boolean", | ||
| 285 | replication => "enum", | ||
| 286 | routing => "string", | ||
| 287 | timeout => "time", | ||
| 288 | timestamp => "time", | ||
| 289 | ttl => "time", | ||
| 290 | version => "number", | ||
| 291 | version_type => "enum", | ||
| 292 | }, | ||
| 293 | }, | ||
| 294 | |||
| 295 | 'info' => { | ||
| 296 | doc => "", | ||
| 297 | parts => {}, | ||
| 298 | paths => [ [ {} ] ], | ||
| 299 | qs => { filter_path => "list" } | ||
| 300 | }, | ||
| 301 | |||
| 302 | 'mget' => { | ||
| 303 | body => { required => 1 }, | ||
| 304 | doc => "docs-multi-get", | ||
| 305 | parts => { index => {}, type => {} }, | ||
| 306 | paths => [ | ||
| 307 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mget" ], | ||
| 308 | [ { index => 0 }, "{index}", "_mget" ], | ||
| 309 | [ {}, "_mget" ], | ||
| 310 | ], | ||
| 311 | qs => { | ||
| 312 | _source => "list", | ||
| 313 | _source_exclude => "list", | ||
| 314 | _source_include => "list", | ||
| 315 | fields => "list", | ||
| 316 | filter_path => "list", | ||
| 317 | preference => "string", | ||
| 318 | realtime => "boolean", | ||
| 319 | refresh => "boolean", | ||
| 320 | }, | ||
| 321 | }, | ||
| 322 | |||
| 323 | 'mlt' => { | ||
| 324 | body => {}, | ||
| 325 | doc => "search-more-like-this", | ||
| 326 | parts => { | ||
| 327 | id => { required => 1 }, | ||
| 328 | index => { required => 1 }, | ||
| 329 | type => { required => 1 }, | ||
| 330 | }, | ||
| 331 | paths => [ | ||
| 332 | [ { id => 2, index => 0, type => 1 }, | ||
| 333 | "{index}", "{type}", "{id}", "_mlt", | ||
| 334 | ], | ||
| 335 | ], | ||
| 336 | qs => { | ||
| 337 | boost_terms => "number", | ||
| 338 | filter_path => "list", | ||
| 339 | max_doc_freq => "number", | ||
| 340 | max_query_terms => "number", | ||
| 341 | max_word_len => "number", | ||
| 342 | min_doc_freq => "number", | ||
| 343 | min_term_freq => "number", | ||
| 344 | min_word_len => "number", | ||
| 345 | mlt_fields => "list", | ||
| 346 | percent_terms_to_match => "number", | ||
| 347 | routing => "string", | ||
| 348 | search_from => "number", | ||
| 349 | search_indices => "list", | ||
| 350 | search_query_hint => "string", | ||
| 351 | search_scroll => "string", | ||
| 352 | search_size => "number", | ||
| 353 | search_source => "string", | ||
| 354 | search_type => "string", | ||
| 355 | search_types => "list", | ||
| 356 | stop_words => "list", | ||
| 357 | }, | ||
| 358 | }, | ||
| 359 | |||
| 360 | 'msearch' => { | ||
| 361 | body => { required => 1 }, | ||
| 362 | doc => "search-multi-search", | ||
| 363 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 364 | paths => [ | ||
| 365 | [ { index => 0, type => 1 }, "{index}", "{type}", "_msearch" ], | ||
| 366 | [ { index => 0 }, "{index}", "_msearch" ], | ||
| 367 | [ {}, "_msearch" ], | ||
| 368 | ], | ||
| 369 | qs => { filter_path => "list", search_type => "enum" }, | ||
| 370 | serialize => "bulk", | ||
| 371 | }, | ||
| 372 | |||
| 373 | 'percolate' => { | ||
| 374 | body => { required => 1 }, | ||
| 375 | doc => "search-percolate", | ||
| 376 | parts => { index => { required => 1 }, type => { required => 1 } }, | ||
| 377 | paths => [ | ||
| 378 | [ { index => 0, type => 1 }, "{index}", "{type}", "_percolate" ], | ||
| 379 | ], | ||
| 380 | qs => { filter_path => "list", prefer_local => "boolean" }, | ||
| 381 | }, | ||
| 382 | |||
| 383 | 'ping' => { | ||
| 384 | doc => "", | ||
| 385 | method => "HEAD", | ||
| 386 | parts => {}, | ||
| 387 | paths => [ [ {} ] ], | ||
| 388 | qs => {} | ||
| 389 | }, | ||
| 390 | |||
| 391 | 'scroll' => { | ||
| 392 | body => {}, | ||
| 393 | doc => "search-request-scroll", | ||
| 394 | parts => { scroll_id => {} }, | ||
| 395 | paths => [ | ||
| 396 | [ { scroll_id => 2 }, "_search", "scroll", "{scroll_id}" ], | ||
| 397 | [ {}, "_search", "scroll" ], | ||
| 398 | ], | ||
| 399 | qs => { filter_path => "list", scroll => "time" }, | ||
| 400 | }, | ||
| 401 | |||
| 402 | 'search' => { | ||
| 403 | body => {}, | ||
| 404 | doc => "search-search", | ||
| 405 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 406 | paths => [ | ||
| 407 | [ { index => 0, type => 1 }, "{index}", "{type}", "_search" ], | ||
| 408 | [ { index => 0 }, "{index}", "_search" ], | ||
| 409 | [ {}, "_search" ], | ||
| 410 | ], | ||
| 411 | qs => { | ||
| 412 | _source => "list", | ||
| 413 | _source_exclude => "list", | ||
| 414 | _source_include => "list", | ||
| 415 | analyze_wildcard => "boolean", | ||
| 416 | analyzer => "string", | ||
| 417 | default_operator => "enum", | ||
| 418 | df => "string", | ||
| 419 | explain => "boolean", | ||
| 420 | fields => "list", | ||
| 421 | filter_path => "list", | ||
| 422 | from => "number", | ||
| 423 | ignore_indices => "enum", | ||
| 424 | indices_boost => "list", | ||
| 425 | lenient => "boolean", | ||
| 426 | lowercase_expanded_terms => "boolean", | ||
| 427 | preference => "string", | ||
| 428 | q => "string", | ||
| 429 | routing => "list", | ||
| 430 | scroll => "time", | ||
| 431 | search_type => "enum", | ||
| 432 | size => "number", | ||
| 433 | sort => "list", | ||
| 434 | source => "string", | ||
| 435 | stats => "list", | ||
| 436 | suggest_field => "string", | ||
| 437 | suggest_mode => "enum", | ||
| 438 | suggest_size => "number", | ||
| 439 | suggest_text => "string", | ||
| 440 | timeout => "time", | ||
| 441 | version => "boolean", | ||
| 442 | }, | ||
| 443 | }, | ||
| 444 | |||
| 445 | 'suggest' => { | ||
| 446 | body => {}, | ||
| 447 | doc => "search-search", | ||
| 448 | method => "POST", | ||
| 449 | parts => { index => { multi => 1 } }, | ||
| 450 | paths => | ||
| 451 | [ [ { index => 0 }, "{index}", "_suggest" ], [ {}, "_suggest" ] ], | ||
| 452 | qs => { | ||
| 453 | filter_path => "list", | ||
| 454 | ignore_indices => "enum", | ||
| 455 | preference => "string", | ||
| 456 | routing => "string", | ||
| 457 | source => "string", | ||
| 458 | }, | ||
| 459 | }, | ||
| 460 | |||
| 461 | 'update' => { | ||
| 462 | body => {}, | ||
| 463 | doc => "docs-update", | ||
| 464 | method => "POST", | ||
| 465 | parts => { | ||
| 466 | id => { required => 1 }, | ||
| 467 | index => { required => 1 }, | ||
| 468 | type => { required => 1 }, | ||
| 469 | }, | ||
| 470 | paths => [ | ||
| 471 | [ { id => 2, index => 0, type => 1 }, | ||
| 472 | "{index}", "{type}", "{id}", "_update", | ||
| 473 | ], | ||
| 474 | ], | ||
| 475 | qs => { | ||
| 476 | consistency => "enum", | ||
| 477 | fields => "list", | ||
| 478 | filter_path => "list", | ||
| 479 | lang => "string", | ||
| 480 | parent => "string", | ||
| 481 | percolate => "string", | ||
| 482 | refresh => "boolean", | ||
| 483 | replication => "enum", | ||
| 484 | retry_on_conflict => "number", | ||
| 485 | routing => "string", | ||
| 486 | script => "string", | ||
| 487 | timeout => "time", | ||
| 488 | timestamp => "time", | ||
| 489 | ttl => "time", | ||
| 490 | version => "number", | ||
| 491 | version_type => "enum", | ||
| 492 | }, | ||
| 493 | }, | ||
| 494 | |||
| 495 | 'cluster.get_settings' => { | ||
| 496 | doc => "cluster-update-settings", | ||
| 497 | parts => {}, | ||
| 498 | paths => [ [ {}, "_cluster", "settings" ] ], | ||
| 499 | qs => { filter_path => "list" }, | ||
| 500 | }, | ||
| 501 | |||
| 502 | 'cluster.health' => { | ||
| 503 | doc => "cluster-health", | ||
| 504 | parts => { index => {} }, | ||
| 505 | paths => [ | ||
| 506 | [ { index => 2 }, "_cluster", "health", "{index}" ], | ||
| 507 | [ {}, "_cluster", "health" ], | ||
| 508 | ], | ||
| 509 | qs => { | ||
| 510 | filter_path => "list", | ||
| 511 | level => "enum", | ||
| 512 | local => "boolean", | ||
| 513 | master_timeout => "time", | ||
| 514 | timeout => "time", | ||
| 515 | wait_for_active_shards => "number", | ||
| 516 | wait_for_nodes => "string", | ||
| 517 | wait_for_relocating_shards => "number", | ||
| 518 | wait_for_status => "enum", | ||
| 519 | }, | ||
| 520 | }, | ||
| 521 | |||
| 522 | 'cluster.node_hot_threads' => { | ||
| 523 | doc => "cluster-nodes-hot-threads", | ||
| 524 | parts => { node_id => { multi => 1 } }, | ||
| 525 | paths => [ | ||
| 526 | [ { node_id => 1 }, "_nodes", "{node_id}", "hot_threads" ], | ||
| 527 | [ {}, "_nodes", "hot_threads" ], | ||
| 528 | ], | ||
| 529 | qs => { | ||
| 530 | filter_path => "list", | ||
| 531 | interval => "time", | ||
| 532 | snapshots => "number", | ||
| 533 | threads => "number", | ||
| 534 | type => "enum", | ||
| 535 | }, | ||
| 536 | }, | ||
| 537 | |||
| 538 | 'cluster.node_info' => { | ||
| 539 | doc => "cluster-nodes-info", | ||
| 540 | parts => { node_id => { multi => 1 } }, | ||
| 541 | paths => | ||
| 542 | [ [ { node_id => 1 }, "_nodes", "{node_id}" ], [ {}, "_nodes" ] ], | ||
| 543 | qs => { | ||
| 544 | all => "boolean", | ||
| 545 | clear => "boolean", | ||
| 546 | filter_path => "list", | ||
| 547 | http => "boolean", | ||
| 548 | jvm => "boolean", | ||
| 549 | network => "boolean", | ||
| 550 | os => "boolean", | ||
| 551 | plugin => "boolean", | ||
| 552 | process => "boolean", | ||
| 553 | settings => "boolean", | ||
| 554 | thread_pool => "boolean", | ||
| 555 | timeout => "time", | ||
| 556 | transport => "boolean", | ||
| 557 | }, | ||
| 558 | }, | ||
| 559 | |||
| 560 | 'cluster.node_shutdown' => { | ||
| 561 | doc => "cluster-nodes-shutdown", | ||
| 562 | method => "POST", | ||
| 563 | parts => { node_id => { multi => 1 } }, | ||
| 564 | paths => [ | ||
| 565 | [ { node_id => 2 }, "_cluster", | ||
| 566 | "nodes", "{node_id}", | ||
| 567 | "_shutdown" | ||
| 568 | ], | ||
| 569 | [ {}, "_shutdown" ], | ||
| 570 | ], | ||
| 571 | qs => { delay => "time", exit => "boolean", filter_path => "list" }, | ||
| 572 | }, | ||
| 573 | |||
| 574 | 'cluster.node_stats' => { | ||
| 575 | doc => "cluster-nodes-stats", | ||
| 576 | parts => { | ||
| 577 | fields => { multi => 1 }, | ||
| 578 | metric => {}, | ||
| 579 | metric_family => {}, | ||
| 580 | node_id => { multi => 1 }, | ||
| 581 | }, | ||
| 582 | paths => [ | ||
| 583 | [ { fields => 5, metric => 4, node_id => 1 }, | ||
| 584 | "_nodes", "{node_id}", "stats", "indices", "{metric}", | ||
| 585 | "{fields}", | ||
| 586 | ], | ||
| 587 | [ { fields => 4, metric => 3 }, "_nodes", | ||
| 588 | "stats", "indices", | ||
| 589 | "{metric}", "{fields}", | ||
| 590 | ], | ||
| 591 | [ { metric_family => 3, node_id => 1 }, "_nodes", | ||
| 592 | "{node_id}", "stats", | ||
| 593 | "{metric_family}", | ||
| 594 | ], | ||
| 595 | [ { metric_family => 2 }, "_nodes", "stats", "{metric_family}" ], | ||
| 596 | [ { node_id => 1 }, "_nodes", "{node_id}", "stats" ], | ||
| 597 | [ {}, "_nodes", "stats" ], | ||
| 598 | ], | ||
| 599 | qs => { | ||
| 600 | all => "boolean", | ||
| 601 | clear => "boolean", | ||
| 602 | filter_path => "list", | ||
| 603 | fs => "boolean", | ||
| 604 | http => "boolean", | ||
| 605 | indices => "boolean", | ||
| 606 | jvm => "boolean", | ||
| 607 | network => "boolean", | ||
| 608 | os => "boolean", | ||
| 609 | process => "boolean", | ||
| 610 | thread_pool => "boolean", | ||
| 611 | transport => "boolean", | ||
| 612 | }, | ||
| 613 | }, | ||
| 614 | |||
| 615 | 'cluster.pending_tasks' => { | ||
| 616 | doc => "cluster-pending", | ||
| 617 | parts => {}, | ||
| 618 | paths => [ [ {}, "_cluster", "pending_tasks" ] ], | ||
| 619 | qs => { | ||
| 620 | filter_path => "list", | ||
| 621 | local => "boolean", | ||
| 622 | master_timeout => "time" | ||
| 623 | }, | ||
| 624 | }, | ||
| 625 | |||
| 626 | 'cluster.put_settings' => { | ||
| 627 | body => {}, | ||
| 628 | doc => "cluster-update-settings", | ||
| 629 | method => "PUT", | ||
| 630 | parts => {}, | ||
| 631 | paths => [ [ {}, "_cluster", "settings" ] ], | ||
| 632 | qs => { filter_path => "list" }, | ||
| 633 | }, | ||
| 634 | |||
| 635 | 'cluster.reroute' => { | ||
| 636 | body => {}, | ||
| 637 | doc => "cluster-reroute", | ||
| 638 | method => "POST", | ||
| 639 | parts => {}, | ||
| 640 | paths => [ [ {}, "_cluster", "reroute" ] ], | ||
| 641 | qs => { | ||
| 642 | dry_run => "boolean", | ||
| 643 | filter_metadata => "boolean", | ||
| 644 | filter_path => "list", | ||
| 645 | }, | ||
| 646 | }, | ||
| 647 | |||
| 648 | 'cluster.state' => { | ||
| 649 | doc => "cluster-state", | ||
| 650 | parts => {}, | ||
| 651 | paths => [ [ {}, "_cluster", "state" ] ], | ||
| 652 | qs => { | ||
| 653 | filter_blocks => "boolean", | ||
| 654 | filter_index_templates => "boolean", | ||
| 655 | filter_indices => "list", | ||
| 656 | filter_metadata => "boolean", | ||
| 657 | filter_nodes => "boolean", | ||
| 658 | filter_path => "list", | ||
| 659 | filter_routing_table => "boolean", | ||
| 660 | local => "boolean", | ||
| 661 | master_timeout => "time", | ||
| 662 | }, | ||
| 663 | }, | ||
| 664 | |||
| 665 | 'indices.analyze' => { | ||
| 666 | body => {}, | ||
| 667 | doc => "indices-analyze", | ||
| 668 | parts => { index => {} }, | ||
| 669 | paths => | ||
| 670 | [ [ { index => 0 }, "{index}", "_analyze" ], [ {}, "_analyze" ] ], | ||
| 671 | qs => { | ||
| 672 | analyzer => "string", | ||
| 673 | field => "string", | ||
| 674 | filter_path => "list", | ||
| 675 | filters => "list", | ||
| 676 | format => "enum", | ||
| 677 | prefer_local => "boolean", | ||
| 678 | text => "string", | ||
| 679 | tokenizer => "string", | ||
| 680 | }, | ||
| 681 | }, | ||
| 682 | |||
| 683 | 'indices.clear_cache' => { | ||
| 684 | doc => "indices-clearcache", | ||
| 685 | method => "POST", | ||
| 686 | parts => { index => { multi => 1 } }, | ||
| 687 | paths => [ | ||
| 688 | [ { index => 0 }, "{index}", "_cache", "clear" ], | ||
| 689 | [ {}, "_cache", "clear" ], | ||
| 690 | ], | ||
| 691 | qs => { | ||
| 692 | fielddata => "boolean", | ||
| 693 | fields => "list", | ||
| 694 | filter => "boolean", | ||
| 695 | filter_cache => "boolean", | ||
| 696 | filter_keys => "boolean", | ||
| 697 | filter_path => "list", | ||
| 698 | id => "boolean", | ||
| 699 | id_cache => "boolean", | ||
| 700 | ignore_indices => "enum", | ||
| 701 | recycler => "boolean", | ||
| 702 | }, | ||
| 703 | }, | ||
| 704 | |||
| 705 | 'indices.close' => { | ||
| 706 | doc => "indices-open-close", | ||
| 707 | method => "POST", | ||
| 708 | parts => { index => { required => 1 } }, | ||
| 709 | paths => [ [ { index => 0 }, "{index}", "_close" ] ], | ||
| 710 | qs => { | ||
| 711 | filter_path => "list", | ||
| 712 | master_timeout => "time", | ||
| 713 | timeout => "time" | ||
| 714 | }, | ||
| 715 | }, | ||
| 716 | |||
| 717 | 'indices.create' => { | ||
| 718 | body => {}, | ||
| 719 | doc => "indices-create-index", | ||
| 720 | method => "PUT", | ||
| 721 | parts => { index => { required => 1 } }, | ||
| 722 | paths => [ [ { index => 0 }, "{index}" ] ], | ||
| 723 | qs => { | ||
| 724 | filter_path => "list", | ||
| 725 | master_timeout => "time", | ||
| 726 | timeout => "time" | ||
| 727 | }, | ||
| 728 | }, | ||
| 729 | |||
| 730 | 'indices.delete' => { | ||
| 731 | doc => "indices-delete-index", | ||
| 732 | method => "DELETE", | ||
| 733 | parts => { index => { multi => 1 } }, | ||
| 734 | paths => [ [ { index => 0 }, "{index}" ], [ {} ] ], | ||
| 735 | qs => { | ||
| 736 | filter_path => "list", | ||
| 737 | master_timeout => "time", | ||
| 738 | timeout => "time" | ||
| 739 | }, | ||
| 740 | }, | ||
| 741 | |||
| 742 | 'indices.delete_alias' => { | ||
| 743 | doc => "indices-aliases", | ||
| 744 | method => "DELETE", | ||
| 745 | parts => { index => { required => 1 }, name => { required => 1 } }, | ||
| 746 | paths => | ||
| 747 | [ [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ] ], | ||
| 748 | qs => { | ||
| 749 | filter_path => "list", | ||
| 750 | master_timeout => "time", | ||
| 751 | timeout => "time" | ||
| 752 | }, | ||
| 753 | }, | ||
| 754 | |||
| 755 | 'indices.delete_mapping' => { | ||
| 756 | doc => "indices-delete-mapping", | ||
| 757 | method => "DELETE", | ||
| 758 | parts => { | ||
| 759 | index => { multi => 1, required => 1 }, | ||
| 760 | type => { required => 1 } | ||
| 761 | }, | ||
| 762 | paths => [ | ||
| 763 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mapping" ] | ||
| 764 | ], | ||
| 765 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 766 | }, | ||
| 767 | |||
| 768 | 'indices.delete_template' => { | ||
| 769 | doc => "indices-templates", | ||
| 770 | method => "DELETE", | ||
| 771 | parts => { name => { required => 1 } }, | ||
| 772 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||
| 773 | qs => { | ||
| 774 | filter_path => "list", | ||
| 775 | master_timeout => "time", | ||
| 776 | timeout => "time" | ||
| 777 | }, | ||
| 778 | }, | ||
| 779 | |||
| 780 | 'indices.delete_warmer' => { | ||
| 781 | doc => "indices-warmers", | ||
| 782 | method => "DELETE", | ||
| 783 | parts => { | ||
| 784 | index => { multi => 1, required => 1 }, | ||
| 785 | name => {}, | ||
| 786 | type => { multi => 1 }, | ||
| 787 | }, | ||
| 788 | paths => [ | ||
| 789 | [ { index => 0, name => 3, type => 1 }, | ||
| 790 | "{index}", "{type}", "_warmer", "{name}", | ||
| 791 | ], | ||
| 792 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||
| 793 | [ { index => 0 }, "{index}", "_warmer" ], | ||
| 794 | ], | ||
| 795 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 796 | }, | ||
| 797 | |||
| 798 | 'indices.exists' => { | ||
| 799 | doc => "indices-get-settings", | ||
| 800 | method => "HEAD", | ||
| 801 | parts => { index => { multi => 1, required => 1 } }, | ||
| 802 | paths => [ [ { index => 0 }, "{index}" ] ], | ||
| 803 | qs => {}, | ||
| 804 | }, | ||
| 805 | |||
| 806 | 'indices.exists_alias' => { | ||
| 807 | doc => "indices-aliases", | ||
| 808 | method => "HEAD", | ||
| 809 | parts => { | ||
| 810 | index => { multi => 1 }, | ||
| 811 | name => { multi => 1, required => 1 } | ||
| 812 | }, | ||
| 813 | paths => [ | ||
| 814 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||
| 815 | [ { name => 1 }, "_alias", "{name}" ], | ||
| 816 | ], | ||
| 817 | qs => { ignore_indices => "enum" }, | ||
| 818 | }, | ||
| 819 | |||
| 820 | 'indices.exists_type' => { | ||
| 821 | doc => "indices-types-exists", | ||
| 822 | method => "HEAD", | ||
| 823 | parts => { | ||
| 824 | index => { multi => 1, required => 1 }, | ||
| 825 | type => { multi => 1, required => 1 }, | ||
| 826 | }, | ||
| 827 | paths => [ [ { index => 0, type => 1 }, "{index}", "{type}" ] ], | ||
| 828 | qs => { ignore_indices => "enum" }, | ||
| 829 | }, | ||
| 830 | |||
| 831 | 'indices.flush' => { | ||
| 832 | doc => "indices-flush", | ||
| 833 | method => "POST", | ||
| 834 | parts => { index => { multi => 1 } }, | ||
| 835 | paths => | ||
| 836 | [ [ { index => 0 }, "{index}", "_flush" ], [ {}, "_flush" ] ], | ||
| 837 | qs => { | ||
| 838 | filter_path => "list", | ||
| 839 | force => "boolean", | ||
| 840 | full => "boolean", | ||
| 841 | ignore_indices => "enum", | ||
| 842 | refresh => "boolean", | ||
| 843 | }, | ||
| 844 | }, | ||
| 845 | |||
| 846 | 'indices.get_alias' => { | ||
| 847 | doc => "indices-aliases", | ||
| 848 | parts => { | ||
| 849 | index => { multi => 1 }, | ||
| 850 | name => { multi => 1, required => 1 } | ||
| 851 | }, | ||
| 852 | paths => [ | ||
| 853 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||
| 854 | [ { name => 1 }, "_alias", "{name}" ], | ||
| 855 | ], | ||
| 856 | qs => { filter_path => "list", ignore_indices => "enum" }, | ||
| 857 | }, | ||
| 858 | |||
| 859 | 'indices.get_aliases' => { | ||
| 860 | doc => "indices-aliases", | ||
| 861 | parts => { index => { multi => 1 } }, | ||
| 862 | paths => | ||
| 863 | [ [ { index => 0 }, "{index}", "_aliases" ], [ {}, "_aliases" ] ], | ||
| 864 | qs => { filter_path => "list", timeout => "time" }, | ||
| 865 | }, | ||
| 866 | |||
| 867 | 'indices.get_field_mapping' => { | ||
| 868 | doc => "indices-get-field-mapping", | ||
| 869 | parts => { | ||
| 870 | field => { multi => 1, required => 1 }, | ||
| 871 | index => { multi => 1 }, | ||
| 872 | type => { multi => 1 }, | ||
| 873 | }, | ||
| 874 | paths => [ | ||
| 875 | [ { field => 4, index => 0, type => 1 }, "{index}", | ||
| 876 | "{type}", "_mapping", | ||
| 877 | "field", "{field}", | ||
| 878 | ], | ||
| 879 | [ { field => 3, index => 0 }, "{index}", | ||
| 880 | "_mapping", "field", | ||
| 881 | "{field}", | ||
| 882 | ], | ||
| 883 | [ { field => 2 }, "_mapping", "field", "{field}" ], | ||
| 884 | ], | ||
| 885 | qs => { filter_path => "list", include_defaults => "boolean" }, | ||
| 886 | }, | ||
| 887 | |||
| 888 | 'indices.get_mapping' => { | ||
| 889 | doc => "indices-get-mapping", | ||
| 890 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 891 | paths => [ | ||
| 892 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mapping" ], | ||
| 893 | [ { index => 0 }, "{index}", "_mapping" ], | ||
| 894 | [ {}, "_mapping" ], | ||
| 895 | ], | ||
| 896 | qs => { filter_path => "list" }, | ||
| 897 | }, | ||
| 898 | |||
| 899 | 'indices.get_settings' => { | ||
| 900 | doc => "indices-get-mapping", | ||
| 901 | parts => { index => { multi => 1 } }, | ||
| 902 | paths => [ | ||
| 903 | [ { index => 0 }, "{index}", "_settings" ], | ||
| 904 | [ {}, "_settings" ] | ||
| 905 | ], | ||
| 906 | qs => { filter_path => "list" }, | ||
| 907 | }, | ||
| 908 | |||
| 909 | 'indices.get_template' => { | ||
| 910 | doc => "indices-templates", | ||
| 911 | parts => { name => {} }, | ||
| 912 | paths => | ||
| 913 | [ [ { name => 1 }, "_template", "{name}" ], [ {}, "_template" ] ], | ||
| 914 | qs => { filter_path => "list" }, | ||
| 915 | }, | ||
| 916 | |||
| 917 | 'indices.get_warmer' => { | ||
| 918 | doc => "indices-warmers", | ||
| 919 | parts => { | ||
| 920 | index => { multi => 1, required => 1 }, | ||
| 921 | name => {}, | ||
| 922 | type => { multi => 1 }, | ||
| 923 | }, | ||
| 924 | paths => [ | ||
| 925 | [ { index => 0, name => 3, type => 1 }, | ||
| 926 | "{index}", "{type}", "_warmer", "{name}", | ||
| 927 | ], | ||
| 928 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||
| 929 | [ { index => 0 }, "{index}", "_warmer" ], | ||
| 930 | ], | ||
| 931 | qs => { filter_path => "list" }, | ||
| 932 | }, | ||
| 933 | |||
| 934 | 'indices.open' => { | ||
| 935 | doc => "indices-open-close", | ||
| 936 | method => "POST", | ||
| 937 | parts => { index => { required => 1 } }, | ||
| 938 | paths => [ [ { index => 0 }, "{index}", "_open" ] ], | ||
| 939 | qs => { | ||
| 940 | filter_path => "list", | ||
| 941 | master_timeout => "time", | ||
| 942 | timeout => "time" | ||
| 943 | }, | ||
| 944 | }, | ||
| 945 | |||
| 946 | 'indices.optimize' => { | ||
| 947 | doc => "indices-optimize", | ||
| 948 | method => "POST", | ||
| 949 | parts => { index => { multi => 1 } }, | ||
| 950 | paths => [ | ||
| 951 | [ { index => 0 }, "{index}", "_optimize" ], | ||
| 952 | [ {}, "_optimize" ] | ||
| 953 | ], | ||
| 954 | qs => { | ||
| 955 | filter_path => "list", | ||
| 956 | flush => "boolean", | ||
| 957 | ignore_indices => "enum", | ||
| 958 | max_num_segments => "number", | ||
| 959 | only_expunge_deletes => "boolean", | ||
| 960 | refresh => "boolean", | ||
| 961 | wait_for_merge => "boolean", | ||
| 962 | }, | ||
| 963 | }, | ||
| 964 | |||
| 965 | 'indices.put_alias' => { | ||
| 966 | body => {}, | ||
| 967 | doc => "indices-aliases", | ||
| 968 | method => "PUT", | ||
| 969 | parts => { index => { required => 1 }, name => { required => 1 } }, | ||
| 970 | paths => [ | ||
| 971 | [ { index => 0, name => 2 }, "{index}", "_alias", "{name}" ], | ||
| 972 | [ { index => 0 }, "{index}", "_alias" ], | ||
| 973 | [ { name => 1 }, "_alias", "{name}" ], | ||
| 974 | [ {}, "_alias" ], | ||
| 975 | ], | ||
| 976 | qs => { | ||
| 977 | filter_path => "list", | ||
| 978 | master_timeout => "time", | ||
| 979 | timeout => "time" | ||
| 980 | }, | ||
| 981 | }, | ||
| 982 | |||
| 983 | 'indices.put_mapping' => { | ||
| 984 | body => { required => 1 }, | ||
| 985 | doc => "indices-put-mapping", | ||
| 986 | method => "PUT", | ||
| 987 | parts => { | ||
| 988 | index => { multi => 1, required => 1 }, | ||
| 989 | type => { required => 1 } | ||
| 990 | }, | ||
| 991 | paths => [ | ||
| 992 | [ { index => 0, type => 1 }, "{index}", "{type}", "_mapping" ] | ||
| 993 | ], | ||
| 994 | qs => { | ||
| 995 | filter_path => "list", | ||
| 996 | ignore_conflicts => "boolean", | ||
| 997 | master_timeout => "time", | ||
| 998 | timeout => "time", | ||
| 999 | }, | ||
| 1000 | }, | ||
| 1001 | |||
| 1002 | 'indices.put_settings' => { | ||
| 1003 | body => { required => 1 }, | ||
| 1004 | doc => "indices-update-settings", | ||
| 1005 | method => "PUT", | ||
| 1006 | parts => { index => { multi => 1 } }, | ||
| 1007 | paths => [ | ||
| 1008 | [ { index => 0 }, "{index}", "_settings" ], | ||
| 1009 | [ {}, "_settings" ] | ||
| 1010 | ], | ||
| 1011 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 1012 | }, | ||
| 1013 | |||
| 1014 | 'indices.put_template' => { | ||
| 1015 | body => { required => 1 }, | ||
| 1016 | doc => "indices-templates", | ||
| 1017 | method => "PUT", | ||
| 1018 | parts => { name => { required => 1 } }, | ||
| 1019 | paths => [ [ { name => 1 }, "_template", "{name}" ] ], | ||
| 1020 | qs => { | ||
| 1021 | filter_path => "list", | ||
| 1022 | master_timeout => "time", | ||
| 1023 | order => "number", | ||
| 1024 | timeout => "time", | ||
| 1025 | }, | ||
| 1026 | }, | ||
| 1027 | |||
| 1028 | 'indices.put_warmer' => { | ||
| 1029 | body => { required => 1 }, | ||
| 1030 | doc => "indices-warmers", | ||
| 1031 | method => "PUT", | ||
| 1032 | parts => { | ||
| 1033 | index => { multi => 1, required => 1 }, | ||
| 1034 | name => { required => 1 }, | ||
| 1035 | type => { multi => 1 }, | ||
| 1036 | }, | ||
| 1037 | paths => [ | ||
| 1038 | [ { index => 0, name => 3, type => 1 }, | ||
| 1039 | "{index}", "{type}", "_warmer", "{name}", | ||
| 1040 | ], | ||
| 1041 | [ { index => 0, name => 2 }, "{index}", "_warmer", "{name}" ], | ||
| 1042 | ], | ||
| 1043 | qs => { filter_path => "list", master_timeout => "time" }, | ||
| 1044 | }, | ||
| 1045 | |||
| 1046 | 'indices.refresh' => { | ||
| 1047 | doc => "indices-refresh", | ||
| 1048 | method => "POST", | ||
| 1049 | parts => { index => { multi => 1 } }, | ||
| 1050 | paths => | ||
| 1051 | [ [ { index => 0 }, "{index}", "_refresh" ], [ {}, "_refresh" ] ], | ||
| 1052 | qs => { filter_path => "list", ignore_indices => "enum" }, | ||
| 1053 | }, | ||
| 1054 | |||
| 1055 | 'indices.segments' => { | ||
| 1056 | doc => "indices-segments", | ||
| 1057 | parts => { index => { multi => 1 } }, | ||
| 1058 | paths => [ | ||
| 1059 | [ { index => 0 }, "{index}", "_segments" ], | ||
| 1060 | [ {}, "_segments" ] | ||
| 1061 | ], | ||
| 1062 | qs => { filter_path => "list", ignore_indices => "enum" }, | ||
| 1063 | }, | ||
| 1064 | |||
| 1065 | 'indices.snapshot_index' => { | ||
| 1066 | doc => "indices-gateway-snapshot", | ||
| 1067 | method => "POST", | ||
| 1068 | parts => { index => { multi => 1 } }, | ||
| 1069 | paths => [ | ||
| 1070 | [ { index => 0 }, "{index}", "_gateway", "snapshot" ], | ||
| 1071 | [ {}, "_gateway", "snapshot" ], | ||
| 1072 | ], | ||
| 1073 | qs => { filter_path => "list", ignore_indices => "enum" }, | ||
| 1074 | }, | ||
| 1075 | |||
| 1076 | 'indices.stats' => { | ||
| 1077 | doc => "indices-stats", | ||
| 1078 | parts => { | ||
| 1079 | fields => { multi => 1 }, | ||
| 1080 | index => { multi => 1 }, | ||
| 1081 | indexing_types => { multi => 1 }, | ||
| 1082 | metric_family => {}, | ||
| 1083 | search_groups => { multi => 1 }, | ||
| 1084 | }, | ||
| 1085 | paths => [ | ||
| 1086 | [ { fields => 3, index => 0 }, "{index}", | ||
| 1087 | "_stats", "fielddata", | ||
| 1088 | "{fields}", | ||
| 1089 | ], | ||
| 1090 | [ { index => 0, metric_family => 2 }, "{index}", | ||
| 1091 | "_stats", "{metric_family}", | ||
| 1092 | ], | ||
| 1093 | [ { index => 0, search_groups => 3 }, "{index}", | ||
| 1094 | "_stats", "search", | ||
| 1095 | "{search_groups}", | ||
| 1096 | ], | ||
| 1097 | [ { fields => 2 }, "_stats", "fielddata", "{fields}" ], | ||
| 1098 | [ { index => 0 }, "{index}", "_stats" ], | ||
| 1099 | [ { indexing_types => 2 }, "_stats", | ||
| 1100 | "indexing", "{indexing_types}", | ||
| 1101 | ], | ||
| 1102 | [ { metric_family => 1 }, "_stats", "{metric_family}" ], | ||
| 1103 | [ { search_groups => 2 }, "_stats", "search", "{search_groups}" ], | ||
| 1104 | [ {}, "_stats" ], | ||
| 1105 | ], | ||
| 1106 | qs => { | ||
| 1107 | all => "boolean", | ||
| 1108 | clear => "boolean", | ||
| 1109 | completion => "boolean", | ||
| 1110 | completion_fields => "list", | ||
| 1111 | docs => "boolean", | ||
| 1112 | fielddata => "boolean", | ||
| 1113 | fielddata_fields => "list", | ||
| 1114 | filter_cache => "boolean", | ||
| 1115 | filter_path => "list", | ||
| 1116 | flush => "boolean", | ||
| 1117 | get => "boolean", | ||
| 1118 | groups => "boolean", | ||
| 1119 | id_cache => "boolean", | ||
| 1120 | ignore_indices => "enum", | ||
| 1121 | indexing => "boolean", | ||
| 1122 | merge => "boolean", | ||
| 1123 | refresh => "boolean", | ||
| 1124 | search => "boolean", | ||
| 1125 | store => "boolean", | ||
| 1126 | warmer => "boolean", | ||
| 1127 | }, | ||
| 1128 | }, | ||
| 1129 | |||
| 1130 | 'indices.status' => { | ||
| 1131 | doc => "indices-status", | ||
| 1132 | parts => { index => { multi => 1 } }, | ||
| 1133 | paths => | ||
| 1134 | [ [ { index => 0 }, "{index}", "_status" ], [ {}, "_status" ] ], | ||
| 1135 | qs => { | ||
| 1136 | filter_path => "list", | ||
| 1137 | ignore_indices => "enum", | ||
| 1138 | recovery => "boolean", | ||
| 1139 | snapshot => "boolean", | ||
| 1140 | }, | ||
| 1141 | }, | ||
| 1142 | |||
| 1143 | 'indices.update_aliases' => { | ||
| 1144 | body => { required => 1 }, | ||
| 1145 | doc => "indices-aliases", | ||
| 1146 | method => "POST", | ||
| 1147 | parts => { index => { multi => 1 } }, | ||
| 1148 | paths => [ [ {}, "_aliases" ] ], | ||
| 1149 | qs => { | ||
| 1150 | filter_path => "list", | ||
| 1151 | master_timeout => "time", | ||
| 1152 | timeout => "time" | ||
| 1153 | }, | ||
| 1154 | }, | ||
| 1155 | |||
| 1156 | 'indices.validate_query' => { | ||
| 1157 | body => {}, | ||
| 1158 | doc => "search-validate", | ||
| 1159 | parts => { index => { multi => 1 }, type => { multi => 1 } }, | ||
| 1160 | paths => [ | ||
| 1161 | [ { index => 0, type => 1 }, "{index}", | ||
| 1162 | "{type}", "_validate", | ||
| 1163 | "query", | ||
| 1164 | ], | ||
| 1165 | [ { index => 0 }, "{index}", "_validate", "query" ], | ||
| 1166 | [ {}, "_validate", "query" ], | ||
| 1167 | ], | ||
| 1168 | qs => { | ||
| 1169 | explain => "boolean", | ||
| 1170 | filter_path => "list", | ||
| 1171 | ignore_indices => "enum", | ||
| 1172 | q => "string", | ||
| 1173 | source => "string", | ||
| 1174 | }, | ||
| 1175 | }, | ||
| 1176 | |||
| 1177 | #=== AUTOGEN - END === | ||
| 1178 | |||
| 1179 | ); | ||
| 1180 | |||
| 1181 | __PACKAGE__->_qs_init( \%API ); | ||
| 1182 | 1; | ||
| 1183 | |||
| 1184 | =pod | ||
| 1185 | |||
| 1186 | =encoding UTF-8 | ||
| 1187 | |||
| 1188 | =head1 NAME | ||
| 1189 | |||
| 1190 | Search::Elasticsearch::Client::0_90::Role::API - This class contains the spec for the Elasticsearch APIs | ||
| 1191 | |||
| 1192 | =head1 VERSION | ||
| 1193 | |||
| 1194 | version 7.30_1 | ||
| 1195 | |||
| 1196 | =head1 DESCRIPTION | ||
| 1197 | |||
| 1198 | All of the Elasticsearch APIs are defined in this role. The example given below | ||
| 1199 | is the definition for the L<Search::Elasticsearch::Client::0_90::Direct/index()> method: | ||
| 1200 | |||
| 1201 | 'index' => { | ||
| 1202 | body => { required => 1 }, | ||
| 1203 | doc => "docs-index_", | ||
| 1204 | method => "POST", | ||
| 1205 | parts => { | ||
| 1206 | id => {}, | ||
| 1207 | index => { required => 1 }, | ||
| 1208 | type => { required => 1 } | ||
| 1209 | }, | ||
| 1210 | paths => [ | ||
| 1211 | [ { id => 2, index => 0, type => 1 }, "{index}", | ||
| 1212 | "{type}", "{id}" | ||
| 1213 | ], | ||
| 1214 | [ { index => 0, type => 1 }, "{index}", "{type}" ], | ||
| 1215 | ], | ||
| 1216 | qs => { | ||
| 1217 | filter_path => "list", | ||
| 1218 | op_type => "enum", | ||
| 1219 | parent => "string", | ||
| 1220 | pipeline => "string", | ||
| 1221 | refresh => "enum", | ||
| 1222 | routing => "string", | ||
| 1223 | timeout => "time", | ||
| 1224 | timestamp => "time", | ||
| 1225 | ttl => "time", | ||
| 1226 | version => "number", | ||
| 1227 | version_type => "enum", | ||
| 1228 | wait_for_active_shards => "string", | ||
| 1229 | }, | ||
| 1230 | }, | ||
| 1231 | |||
| 1232 | These definitions can be used by different L<Search::Elasticsearch::Role::Client> | ||
| 1233 | implementations to provide distinct user interfaces. | ||
| 1234 | |||
| 1235 | =head1 METHODS | ||
| 1236 | |||
| 1237 | =head2 C<api()> | ||
| 1238 | |||
| 1239 | $defn = $api->api($name); | ||
| 1240 | |||
| 1241 | The only method in this class is the C<api()> method which takes the name | ||
| 1242 | of the I<action> and returns its definition. Actions in the | ||
| 1243 | C<indices> or C<cluster> namespace use the namespace as a prefix, eg: | ||
| 1244 | |||
| 1245 | $defn = $e->api('indices.create'); | ||
| 1246 | $defn = $e->api('cluster.node_stats'); | ||
| 1247 | |||
| 1248 | =head1 SEE ALSO | ||
| 1249 | |||
| 1250 | =over | ||
| 1251 | |||
| 1252 | =item * | ||
| 1253 | |||
| 1254 | L<Search::Elasticsearch::Role::API> | ||
| 1255 | |||
| 1256 | =item * | ||
| 1257 | |||
| 1258 | L<Search::Elasticsearch::Client::0_90::Direct> | ||
| 1259 | |||
| 1260 | =back | ||
| 1261 | |||
| 1262 | =head1 AUTHOR | ||
| 1263 | |||
| 1264 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 1265 | |||
| 1266 | =head1 COPYRIGHT AND LICENSE | ||
| 1267 | |||
| 1268 | This software is Copyright (c) 2020 by Elasticsearch BV. | ||
| 1269 | |||
| 1270 | This is free software, licensed under: | ||
| 1271 | |||
| 1272 | The Apache License, Version 2.0, January 2004 | ||
| 1273 | |||
| 1274 | =cut | ||
| 1275 | |||
| 1276 | __END__ |