Debian Codegraph @

lib/Search/Elasticsearch/Client/2_0/Direct/Indices.pm

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