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