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