Elasticsearch/Client/6_0/Direct/Indices.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 9 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 package Search::Elasticsearch::Client::6_0::Direct::Indices;
2 $Search::Elasticsearch::Client::6_0::Direct::Indices::VERSION = '6.80';
3 use Moo;
4 with 'Search::Elasticsearch::Client::6_0::Role::API';
5 with 'Search::Elasticsearch::Role::Client::Direct';
6 __PACKAGE__->_install_api('indices');
7  
8 1;
9  
10 =pod
11  
12 =encoding UTF-8
13  
14 =head1 NAME
15  
16 Search::Elasticsearch::Client::6_0::Direct::Indices - A client for running index-level requests
17  
18 =head1 VERSION
19  
20 version 6.80
21  
22 =head1 DESCRIPTION
23  
24 This module provides methods to make index-level requests, such as
25 creating and deleting indices, managing type mappings, index settings,
26 index templates and aliases.
27  
28 It does L<Search::Elasticsearch::Role::Client::Direct>.
29  
30 =head1 INDEX METHODS
31  
32 =head2 C<create()>
33  
34 $result = $e->indices->create(
35 index => 'my_index' # required
36  
37 body => { # optional
38 index settings
39 mappings
40 aliases
41 }
42 );
43  
44 The C<create()> method is used to create an index. Optionally, index
45 settings, type mappings, and aliases can be added at the same time.
46  
47 Query string parameters:
48 C<error_trace>,
49 C<human>,
50 C<include_type_name>,
51 C<master_timeout>,
52 C<timeout>,
53 C<update_all_types>,
54 C<wait_for_active_shards>
55  
56 See the L<create index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html>
57 for more information.
58  
59 =head2 C<get()>
60  
61 $response = $e->indices->get(
62 index => 'index' | \@indices # required
63 );
64  
65 Returns the aliases, settings, and mappings for the specified indices.
66  
67 See the L<get index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>.
68  
69 Query string parameters:
70 C<allow_no_indices>,
71 C<error_trace>,
72 C<expand_wildcards>,
73 C<flat_settings>,
74 C<human>,
75 C<ignore_unavailable>,
76 C<include_defaults>,
77 C<include_type_name>,
78 C<local>,
79 C<master_timeout>
80  
81 =head2 C<exists()>
82  
83 $bool = $e->indices->exists(
84 index => 'index' | \@indices # required
85 );
86  
87 The C<exists()> method returns C<1> or the empty string to indicate
88 whether the specified index or indices exist.
89  
90 Query string parameters:
91 C<allow_no_indices>,
92 C<error_trace>,
93 C<expand_wildcards>,
94 C<flat_settings>,
95 C<human>,
96 C<ignore_unavailable>,
97 C<include_defaults>,
98 C<local>
99  
100 See the L<index exists docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-indices-exists.html>
101 for more information.
102  
103 =head2 C<delete()>
104  
105 $response = $e->indices->delete(
106 index => 'index' | \@indices # required
107 );
108  
109 The C<delete()> method deletes the specified indices.
110  
111 Query string parameters:
112 C<allow_no_indices>,
113 C<error_trace>,
114 C<expand_wildcards>,
115 C<human>,
116 C<ignore_unavailable>,
117 C<master_timeout>,
118 C<timeout>
119  
120 See the L<delete index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html>
121 for more information.
122  
123 =head2 C<close()>
124  
125 $response = $e->indices->close(
126 index => 'index' | \@indices # required
127 );
128  
129 The C<close()> method closes the specified indices, reducing resource usage
130 but allowing them to be reopened later.
131  
132 Query string parameters:
133 C<allow_no_indices>,
134 C<error_trace>,
135 C<expand_wildcards>,
136 C<human>,
137 C<ignore_unavailable>
138 C<master_timeout>,
139 C<timeout>
140  
141 See the L<close index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>
142 for more information.
143  
144 =head2 C<open()>
145  
146 $response = $e->indices->open(
147 index => 'index' | \@indices # required
148 );
149  
150 The C<open()> method opens closed indices.
151  
152 Query string parameters:
153 C<allow_no_indices>,
154 C<error_trace>,
155 C<expand_wildcards>,
156 C<human>,
157 C<ignore_unavailable>
158 C<master_timeout>,
159 C<timeout>,
160 C<wait_for_active_shards>
161  
162 See the L<open index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>
163 for more information.
164  
165 =head2 C<rollover()>
166  
167 $response = $e->indices->rollover(
168 alias => $alias, # required
169 new_index => $index, # optional
170 body => { rollover conditions } # optional
171 );
172  
173 Rollover an index pointed to by C<alias> if it meets rollover conditions
174 (eg max age, max docs) to a new index name.
175  
176 Query string parameters:
177 C<dry_run>,
178 C<error_trace>,
179 C<human>,
180 C<include_type_name>,
181 C<master_timeout>,
182 C<timeout>,
183 C<wait_for_active_shards>
184  
185 See the L<rollover index docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html>
186 for more information.
187  
188 =head2 C<shrink()>
189  
190 $response = $e->shrink(
191 index => $index, # required
192 target => $target, # required
193 body => { mappings, settings aliases } # optional
194 );
195  
196 The shrink API shrinks the shards of an index down to a single shard (or to a factor
197 of the original shards).
198  
199 Query string parameters:
200 C<copy_settings>,
201 C<error_trace>,
202 C<filter_path>,
203 C<human>,
204 C<master_timeout>,
205 C<timeout>,
206 C<wait_for_active_shards>
207  
208 See the L<shrink index docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html>
209 for more information.
210  
211 =head2 C<split()>
212  
213 $response = $e->split(
214 index => $index, # required
215 target => $target, # required
216 );
217  
218 The split API splits a shard into multiple shards.
219  
220 Query string parameters:
221 C<copy_settings>,
222 C<error_trace>,
223 C<filter_path>,
224 C<human>,
225 C<master_timeout>,
226 C<timeout>,
227 C<wait_for_active_shards>
228  
229 See the L<split index docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-split-index.html>
230 for more information.
231  
232 =head2 C<freeze()>
233  
234 $response = $e->indices->freeze(
235 $index => $index # required
236 );
237  
238 The C<freeze()> API is used to freeze an index, which puts it in a state which has almost no
239 overhead on the cluster.
240  
241 Query string parameters:
242 C<allow_no_indices>,
243 C<error_trace>,
244 C<expand_wildcards>,
245 C<filter_path>,
246 C<human>,
247 C<ignore_unavailable>,
248 C<master_timeout>,
249 C<timeout>,
250 C<wait_for_active_shards>
251  
252 See the L<freeze index docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/freeze-index-api.html>
253 for more information.
254  
255 =head2 C<unfreeze()>
256  
257 $response = $e->indices->unfreeze(
258 $index => $index # required
259 );
260  
261 The C<unfreeze()> API is used to return a frozen index to its normal state.
262  
263 Query string parameters:
264 C<allow_no_indices>,
265 C<error_trace>,
266 C<expand_wildcards>,
267 C<filter_path>,
268 C<human>,
269 C<ignore_unavailable>,
270 C<master_timeout>,
271 C<timeout>,
272 C<wait_for_active_shards>
273  
274 See the L<unfreeze index docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/freeze-index-api.html>
275 for more information.
276  
277 =head2 C<clear_cache()>
278  
279 $response = $e->indices->clear_cache(
280 index => 'index' | \@indices # optional
281 );
282  
283 The C<clear_cache()> method is used to clear the in-memory filter, fielddata,
284 or id cache for the specified indices.
285  
286 Query string parameters:
287 C<allow_no_indices>,
288 C<error_trace>,
289 C<expand_wildcards>,
290 C<fielddata>,
291 C<fields>,
292 C<human>,
293 C<ignore_unavailable>,
294 C<query>,
295 C<request>
296  
297 See the L<clear_cache docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>
298 for more information.
299  
300 =head2 C<refresh()>
301  
302 $response = $e->indices->refresh(
303 index => 'index' | \@indices # optional
304 );
305  
306 The C<refresh()> method refreshes the specified indices (or all indices),
307 allowing recent changes to become visible to search. This process normally
308 happens automatically once every second by default.
309  
310 Query string parameters:
311 C<allow_no_indices>,
312 C<error_trace>,
313 C<expand_wildcards>,
314 C<human>,
315 C<ignore_unavailable>
316  
317 See the L<refresh index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>
318 for more information.
319  
320 =head2 C<flush()>
321  
322 $response = $e->indices->flush(
323 index => 'index' | \@indices # optional
324 );
325  
326 The C<flush()> method causes the specified indices (or all indices) to be
327 written to disk with an C<fsync>, and clears out the transaction log.
328 This process normally happens automatically.
329  
330 Query string parameters:
331 C<allow_no_indices>,
332 C<error_trace>,
333 C<expand_wildcards>,
334 C<force>,
335 C<human>,
336 C<ignore_unavailable>,
337 C<wait_if_ongoing>
338  
339 See the L<flush index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>
340 for more information.
341  
342 =head2 C<flush_synced()>
343  
344 $respnse = $e->indices->flush_synced(
345 index => 'index' | \@indices # optional
346 );
347  
348 The C<flush_synced()> method does a synchronised L<flush()> on the primaries and replicas of
349 all the specified indices. In other words, after flushing it tries to write a C<sync_id>
350 on the primaries and replicas to mark them as containing the same documents. During
351 recovery, if a replica has the same C<sync_id> as the primary, then it doesn't need to check
352 whether the segment files on primary and replica are the same, and it can move on
353 directly to just replaying the translog. This can greatly speed up recovery.
354  
355 Synced flushes happens automatically in the background on indices that have not received any
356 writes for a while, but the L<flush_synced()> method can be used to trigger this process
357 manually, eg before shutting down. Any new commits immediately break the sync.
358  
359 See the L<flush synced docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>
360 for more information.
361  
362 Query string parameters:
363 C<allow_no_indices>,
364 C<error_trace>,
365 C<expand_wildcards>,
366 C<human>,
367 C<ignore_unavailable>
368  
369 =head2 C<forcemerge()>
370  
371 $response = $e->indices->forcemerge(
372 index => 'index' | \@indices # optional
373 );
374  
375 The C<forcemerge()> method rewrites all the data in an index into at most
376 C<max_num_segments>. This is a very heavy operation and should only be run
377 with care, and only on indices that are no longer being updated.
378  
379 Query string parameters:
380 C<allow_no_indices>,
381 C<error_trace>,
382 C<expand_wildcards>,
383 C<flush>,
384 C<human>,
385 C<ignore_unavailable>,
386 C<max_num_segments>,
387 C<only_expunge_deletes>
388  
389 See the L<forcemerge docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html>
390 for more information.
391  
392 =head2 C<get_upgrade()>
393  
394 $response = $e->indices->get_upgrade(
395 index => 'index' | \@indices # optional
396 );
397  
398 The C<get_upgrade()> method returns information about which indices need to be
399 upgraded, which can be done with the C<upgrade()> method.
400  
401 Query string parameters:
402 C<allow_no_indices>,
403 C<error_trace>,
404 C<expand_wildcards>,
405 C<human>,
406 C<ignore_unavailable>
407  
408 See the L<upgrade docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>
409 for more information.
410  
411 =head2 C<upgrade()>
412  
413 $response = $e->indices->upgrade(
414 index => 'index' | \@indices # optional
415 );
416  
417 The C<upgrade()> method upgrades all segments in the specified indices to the latest format.
418  
419 Query string parameters:
420 C<allow_no_indices>,
421 C<error_trace>,
422 C<expand_wildcards>,
423 C<human>,
424 C<ignore_unavailable>,
425 C<only_ancient_segments>,
426 C<wait_for_completion>
427  
428 See the L<upgrade docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>
429 for more information.
430  
431 =head1 MAPPING METHODS
432  
433 =head2 C<put_mapping()>
434  
435 $response = $e->indices->put_mapping(
436 index => 'index' | \@indices # optional,
437 type => 'type', # optional
438  
439 body => { mapping } # required
440 )
441  
442 The C<put_mapping()> method is used to create or update a type
443 mapping on an existing index. Mapping updates are allowed to add new
444 fields, but not to overwrite or change existing fields.
445  
446 For instance:
447  
448 $response = $e->indices->put_mapping(
449 index => 'users',
450 type => 'user',
451 body => {
452 user => {
453 properties => {
454 name => { type => 'string' },
455 age => { type => 'integer' }
456 }
457 }
458 }
459 );
460  
461 Query string parameters:
462 C<allow_no_indices>,
463 C<error_trace>,
464 C<expand_wildcards>,
465 C<human>,
466 C<ignore_unavailable>,
467 C<include_type_name>,
468 C<master_timeout>,
469 C<timeout>,
470 C<update_all_types>
471  
472 See the L<put_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html>
473 for more information.
474  
475 =head2 C<get_mapping()>
476  
477 $result = $e->indices->get_mapping(
478 index => 'index' | \@indices # optional,
479 type => 'type' | \@types # optional
480 );
481  
482 The C<get_mapping()> method returns the type definitions for one, more or
483 all types in one, more or all indices.
484  
485 Query string parameters:
486 C<allow_no_indices>,
487 C<error_trace>,
488 C<expand_wildcards>,
489 C<human>,
490 C<ignore_unavailable>,
491 C<include_type_name>,
492 C<local>,
493 C<master_timeout>
494  
495 See the L<get_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>
496 for more information.
497  
498 =head2 C<get_field_mapping()>
499  
500 $result = $e->indices->get_field_mapping(
501 index => 'index' | \@indices # optional,
502 type => 'type' | \@types # optional,
503 fields => 'field' | \@fields # required
504  
505 include_defaults => 0 | 1
506 );
507  
508 The C<get_field_mapping()> method returns the field definitions for one, more or
509 all fields in one, more or all types and indices.
510  
511 Query string parameters:
512 C<allow_no_indices>,
513 C<error_trace>,
514 C<expand_wildcards>,
515 C<human>,
516 C<ignore_unavailable>,
517 C<include_defaults>,
518 C<include_type_name>,
519 C<local>
520  
521 See the L<get_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>
522 for more information.
523  
524 =head2 C<exists_type()>
525  
526 $bool = $e->indices->exists_type(
527 index => 'index' | \@indices # required,
528 type => 'type' | \@types # required
529 );
530  
531 The C<exists_type()> method checks for the existence of all specified types
532 in all specified indices, and returns C<1> or the empty string.
533  
534 Query string parameters:
535 C<allow_no_indices>,
536 C<error_trace>,
537 C<expand_wildcards>,
538 C<human>,
539 C<ignore_unavailable>,
540 C<local>
541  
542 See the L<exists_type docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>
543 for more information.
544  
545 =head1 ALIAS METHODS
546  
547 =head2 C<update_aliases()>
548  
549 $response = $e->indices->update_aliases(
550 body => { actions } # required
551 );
552  
553 The C<update_aliases()> method changes (by adding or removing) multiple
554 index aliases atomically. For instance:
555  
556 $response = $e->indices->update_aliases(
557 body => {
558 actions => [
559 { add => { alias => 'current', index => 'logs_2013_09' }},
560 { remove => { alias => 'current', index => 'logs_2013_08' }}
561 ]
562 }
563 );
564  
565 Query string parameters:
566 C<error_trace>,
567 C<human>,
568 C<master_timeout>,
569 C<timeout>
570  
571 See the L<update_aliases docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
572 for more information.
573  
574 =head2 C<put_alias()>
575  
576 $response = $e->indices->put_alias(
577 index => 'index' | \@indices, # required
578 name => 'alias', # required
579  
580 body => { alias defn } # optional
581 );
582  
583 The C<put_alias()> method creates an index alias. For instance:
584  
585 $response = $e->indices->put_alias(
586 index => 'my_index',
587 name => 'twitter',
588 body => {
589 filter => { term => { user_id => 'twitter' }}
590 }
591 );
592  
593 Query string parameters:
594 C<error_trace>,
595 C<human>,
596 C<master_timeout>,
597 C<timeout>
598  
599 See the L<put_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
600 for more information.
601  
602 =head2 C<get_alias()>
603  
604 $result = $e->indices->get_alias(
605 index => 'index' | \@indices, # optional
606 name => 'alias' | \@aliases # optional
607 );
608  
609 The C<get_alias()> method returns the alias definitions for the specified
610 aliases in the specified indices.
611  
612 Query string parameters:
613 C<allow_no_indices>,
614 C<error_trace>,
615 C<expand_wildcards>,
616 C<human>,
617 C<ignore_unavailable>,
618 C<local>
619  
620 See the L<get_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
621 for more information.
622  
623 =head2 C<exists_alias()>
624  
625 $bool = $e->indices->exists_alias(
626 index => 'index' | \@indices, # optional
627 name => 'alias' | \@aliases # required
628 );
629  
630 The C<exists_alias()> method returns C<1> or the empty string depending on
631 whether the specified aliases exist in the specified indices.
632  
633 Query string parameters:
634 C<allow_no_indices>,
635 C<error_trace>,
636 C<expand_wildcards>,
637 C<human>,
638 C<ignore_unavailable>,
639 C<local>
640  
641 See the L<exists_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
642 for more information.
643  
644 =head2 C<delete_alias()>
645  
646 $response = $e->indices->delete_alias(
647 index => 'index' | \@indices # required,
648 name => 'alias' | \@aliases # required
649 );
650  
651 The C<delete_alias()> method deletes one or more aliases from one or more
652 indices.
653  
654 Query string parameters:
655 C<error_trace>,
656 C<human>,
657 C<master_timeout>,
658 C<timeout>
659  
660 See the L<delete_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
661 for more information.
662  
663 =head1 SETTINGS METHODS
664  
665 =head2 C<put_settings()>
666  
667 $response = $e->indices->put_settings(
668 index => 'index' | \@indices # optional
669  
670 body => { settings }
671 );
672  
673 The C<put_settings()> method sets the index settings for the specified
674 indices or all indices. For instance:
675  
676 $response = $e->indices->put_settings(
677 body => {
678 "index.refresh_interval" => -1
679 }
680 );
681  
682 Query string parameters:
683 C<allow_no_indices>,
684 C<error_trace>,
685 C<expand_wildcards>,
686 C<flat_settings>,
687 C<human>,
688 C<ignore_unavailable>,
689 C<master_timeout>,
690 C<preserve_existing>,
691 C<timeout>
692  
693 See the L<put_settings docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>
694 for more information.
695  
696 =head2 C<get_settings()>
697  
698 $result = $e->indices->get_settings(
699 index => 'index' | \@indices # optional
700 name => 'name' | \@names # optional
701 );
702  
703 The C<get_settings()> method retrieves the index settings for the specified
704 indices or all indices.
705  
706 Query string parameters:
707 C<allow_no_indices>,
708 C<error_trace>,
709 C<expand_wildcards>,
710 C<flat_settings>,
711 C<human>,
712 C<ignore_unavailable>,
713 C<include_defaults>,
714 C<local>,
715 C<master_timeout>
716  
717 See the L<get_settings docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>
718 for more information.
719  
720 =head1 TEMPLATE METHODS
721  
722 =head2 C<put_template()>
723  
724 $response = $e->indices->put_template(
725 name => 'template' # required
726 body => { template defn } # required
727 );
728  
729 The C<put_template()> method is used to create or update index templates.
730  
731 Query string parameters:
732 C<create>,
733 C<error_trace>,
734 C<flat_settings>,
735 C<human>,
736 C<include_type_name>,
737 C<master_timeout>,
738 C<order>,
739 C<timeout>
740  
741 See the L<put_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
742 for more information.
743  
744 =head2 C<get_template()>
745  
746 $result = $e->indices->get_template(
747 name => 'template' | \@templates # optional
748 );
749  
750 The C<get_template()> method is used to retrieve a named template.
751  
752 Query string parameters:
753 C<error_trace>,
754 C<flat_settings>,
755 C<human>,
756 C<include_type_name>,
757 C<local>,
758 C<master_timeout>
759  
760 See the L<get_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
761 for more information.
762  
763 =head2 C<exists_template()>
764  
765 $result = $e->indices->exists_template(
766 name => 'template' # optional
767 );
768  
769 The C<exists_template()> method is used to check whether the named template exists.
770  
771 Query string parameters:
772 C<error_trace>,
773 C<flat_settings>,
774 C<human>,
775 C<local>,
776 C<master_timeout>
777  
778 See the L<get_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
779 for more information.
780  
781 =head2 C<delete_template()>
782  
783 $response = $e->indices->delete_template(
784 name => 'template' # required
785 );
786  
787 The C<delete_template()> method is used to delete a named template.
788  
789 Query string parameters:
790 C<error_trace>,
791 C<human>,
792 C<master_timeout>,
793 C<timeout>,
794 C<version>,
795 C<version_type>
796  
797 See the L<delete_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
798 for more information.
799  
800 =head1 STATS METHODS
801  
802 =head2 C<stats()>
803  
804 $result = $e->indices->stats(
805 index => 'index' | \@indices # optional
806 metric => 'metric' | \@metrics # optional
807 );
808  
809 The C<stats()> method returns statistical information about one, more or all
810 indices. By default it returns all metrics, but you can limit which metrics
811 are returned by specifying the C<metric>.
812  
813 Allowed metrics are:
814 C<_all>,
815 C<completion>
816 C<docs>,
817 C<fielddata>,
818 C<filter_cache>,
819 C<flush>,
820 C<get>,
821 C<id_cache>,
822 C<indexing>,
823 C<merge>,
824 C<percolate>,
825 C<query_cache>,
826 C<refresh>,
827 C<request_cache>,
828 C<search>,
829 C<segments>,
830 C<store>
831  
832 Query string parameters:
833 C<completion_fields>,
834 C<error_trace>,
835 C<fielddata_fields>,
836 C<fields>,
837 C<groups>,
838 C<human>,
839 C<include_segment_file_sizes>,
840 C<level>,
841 C<types>
842  
843 See the L<stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>
844 for more information.
845  
846 =head2 C<recovery()>
847  
848 $result = $e->indices->recovery(
849 index => 'index' | \@indices # optional
850 );
851  
852 Provides insight into on-going shard recoveries.
853  
854 Query string parameters:
855 C<active_only>,
856 C<detailed>,
857 C<error_trace>,
858 C<human>
859  
860 See the L<recovery docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html>
861 for more information.
862  
863 =head2 C<segments()>
864  
865 $result = $e->indices->segments(
866 index => 'index' | \@indices # optional
867 );
868  
869 The C<segments()> method is used to return information about the segments
870 that an index contains.
871  
872 Query string parameters:
873 C<allow_no_indices>,
874 C<error_trace>,
875 C<expand_wildcards>,
876 C<human>,
877 C<ignore_unavailable>,
878 C<verbose>
879  
880 See the L<segments docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html>
881 for more information.
882  
883 =head2 C<shard_stores()>
884  
885 $result = $e->indices->shard_stores(
886 index => 'index' | \@indices # optional
887 );
888  
889 The C<shard_stores()> method is used to find out which nodes contain
890 copies of which shards, whether the shards are allocated or not.
891  
892 Query string parameters:
893 C<allow_no_indices>,
894 C<error_trace>,
895 C<expand_wildcards>,
896 C<human>,
897 C<ignore_unavailable>,
898 C<status>
899  
900 See the L<shard_stores docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html>
901 for more information.
902  
903 =head1 QUERY AND ANALYSIS METHODS
904  
905 =head2 C<analyze()>
906  
907 $result = $e->indices->analyze(
908 index => 'index' # optional,
909 body => 'text to analyze'
910 );
911  
912 The C<analyze()> method passes the text in the C<body> through the specified
913 C<analyzer>, C<tokenizer> or token C<filter> - which may be global, or associated
914 with a particular index or field - and returns the tokens. Very useful
915 for debugging analyzer configurations.
916  
917 Query string parameters:
918 C<error_trace>,
919 C<human>
920  
921 See the L<analyze docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>
922 for more information.
923  
924 =head2 C<validate_query()>
925  
926 $result = $e->indices->validate_query(
927 index => 'index' | \@indices, # optional
928 type => 'type' | \@types, # optional
929  
930 body => { query }
931 );
932  
933 The C<validate_query()> method accepts a query in the C<body> and checks
934 whether the query is valid or not. Most useful when C<explain> is set
935 to C<true>, in which case it includes an execution plan in the output.
936  
937 Query string parameters:
938 C<all_shards>,
939 C<allow_no_indices>,
940 C<analyze_wildcard>,
941 C<analyzer>,
942 C<default_operator>,
943 C<df>,
944 C<error_trace>,
945 C<explain>,
946 C<expand_wildcards>,
947 C<ignore_unavailable>,
948 C<lenient>,
949 C<q>,
950 C<rewrite>
951  
952 See the L<validate_query docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-validate.html>
953 for more information.
954  
955 =head1 AUTHOR
956  
957 Enrico Zimuel <enrico.zimuel@elastic.co>
958  
959 =head1 COPYRIGHT AND LICENSE
960  
961 This software is Copyright (c) 2020 by Elasticsearch BV.
962  
963 This is free software, licensed under:
964  
965 The Apache License, Version 2.0, January 2004
966  
967 =cut
968  
969 __END__