← Index
NYTProf Performance Profile   « line view »
For flows_to_es.pl
  Run on Mon May 9 23:27:59 2016
Reported on Mon May 9 23:28:09 2016

Filename/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct/Indices.pm
StatementsExecuted 9 statements in 642µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11119µs327µsSearch::Elasticsearch::Client::2_0::Direct::Indices::::BEGIN@3Search::Elasticsearch::Client::2_0::Direct::Indices::BEGIN@3
1117µs43µsSearch::Elasticsearch::Client::2_0::Direct::Indices::::__ANON__[:3]Search::Elasticsearch::Client::2_0::Direct::Indices::__ANON__[:3]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Search::Elasticsearch::Client::2_0::Direct::Indices;
21700ns$Search::Elasticsearch::Client::2_0::Direct::Indices::VERSION = '2.02';
34627µs3672µs
# spent 327µs (19+308) within Search::Elasticsearch::Client::2_0::Direct::Indices::BEGIN@3 which was called: # once (19µs+308µs) by Module::Runtime::require_module at line 3 # spent 43µs (7+36) within Search::Elasticsearch::Client::2_0::Direct::Indices::__ANON__[/opt/flows/lib/lib/perl5/Search/Elasticsearch/Client/2_0/Direct/Indices.pm:3] which was called: # once (7µs+36µs) by import::into at line 34 of Import/Into.pm
use Moo;
# spent 327µs making 1 call to Search::Elasticsearch::Client::2_0::Direct::Indices::BEGIN@3 # spent 308µs making 1 call to Moo::import # spent 36µs making 1 call to strictures::import
412µs1338µswith 'Search::Elasticsearch::Role::API::2_0';
# spent 338µs making 1 call to Moo::with
51900ns1429µswith 'Search::Elasticsearch::Role::Client::Direct';
# spent 429µs making 1 call to Moo::with
615µs11.68ms__PACKAGE__->_install_api('indices');
7
816µs1;
9
10=pod
11
12=encoding UTF-8
13
14=head1 NAME
15
16Search::Elasticsearch::Client::2_0::Direct::Indices - A client for running index-level requests
17
18=head1 VERSION
19
20version 2.02
21
22=head1 DESCRIPTION
23
24This module provides methods to make index-level requests, such as
25creating and deleting indices, managing type mappings, index settings,
26warmers, index templates and aliases.
27
28It 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
44The C<create()> method is used to create an index. Optionally, index
45settings, type mappings and index warmers can be added at the same time.
46
47Query string parameters:
48 C<master_timeout>,
49 C<timeout>,
50 C<update_all_types>
51
52See the L<create index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html>
53for 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
62Returns the aliases, settings, mappings, and warmers for the specified indices.
63The C<feature> parameter can be set to none or more of: C<_settings>, C<_mappings>,
64C<_warmers> and C<_aliases>.
65
66See the L<get index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html>.
67
68Query 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
81The C<exists()> method returns C<1> or the empty string to indicate
82whether the specified index or indices exist.
83
84Query string parameters:
85 C<allow_no_indices>,
86 C<expand_wildcards>,
87 C<ignore_unavailable>,
88 C<local>
89
90See the L<index exists docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-indices-exists.html>
91for more information.
92
93=head2 C<delete()>
94
95 $response = $e->indices->delete(
96 index => 'index' | \@indices # required
97 );
98
99The C<delete()> method deletes the specified indices.
100
101Query string parameters:
102 C<allow_no_indices>,
103 C<expand_wildcards>,
104 C<ignore_unavailable>,
105 C<master_timeout>,
106 C<timeout>
107
108See the L<delete index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html>
109for more information.
110
111=head2 C<close()>
112
113 $response = $e->indices->close(
114 index => 'index' | \@indices # required
115 );
116
117The C<close()> method closes the specified indices, reducing resource usage
118but allowing them to be reopened later.
119
120Query string parameters:
121 C<allow_no_indices>,
122 C<expand_wildcards>,
123 C<ignore_unavailable>
124 C<master_timeout>,
125 C<timeout>
126
127See the L<close index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>
128for more information.
129
130=head2 C<open()>
131
132 $response = $e->indices->open(
133 index => 'index' | \@indices # required
134 );
135
136The C<open()> method opens closed indices.
137
138Query string parameters:
139 C<allow_no_indices>,
140 C<expand_wildcards>,
141 C<ignore_unavailable>
142 C<master_timeout>,
143 C<timeout>
144
145See the L<open index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html>
146for more information.
147
148=head2 C<clear_cache()>
149
150 $response = $e->indices->clear_cache(
151 index => 'index' | \@indices # optional
152 );
153
154The C<clear_cache()> method is used to clear the in-memory filter, fielddata,
155or id cache for the specified indices.
156
157Query 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
167See the L<clear_cache docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html>
168for more information.
169
170=head2 C<refresh()>
171
172 $response = $e->indices->refresh(
173 index => 'index' | \@indices # optional
174 );
175
176The C<refresh()> method refreshes the specified indices (or all indices),
177allowing recent changes to become visible to search. This process normally
178happens automatically once every second by default.
179
180Query string parameters:
181 C<allow_no_indices>,
182 C<expand_wildcards>,
183 C<force>,
184 C<ignore_unavailable>
185
186See the L<refresh index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html>
187for more information.
188
189=head2 C<flush()>
190
191 $response = $e->indices->flush(
192 index => 'index' | \@indices # optional
193 );
194
195The C<flush()> method causes the specified indices (or all indices) to be
196written to disk with an C<fsync>, and clears out the transaction log.
197This process normally happens automatically.
198
199Query string parameters:
200 C<allow_no_indices>,
201 C<expand_wildcards>,
202 C<force>,
203 C<ignore_unavailable>,
204 C<wait_if_ongoing>
205
206See the L<flush index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html>
207for more information.
208
209=head2 C<flush_synced()>
210
211 $respnse = $e->indices->flush_synced(
212 index => 'index' | \@indices # optional
213 );
214
215The C<flush_synced()> method does a synchronised L<flush()> on the primaries and replicas of
216all the specified indices. In other words, after flushing it tries to write a C<sync_id>
217on the primaries and replicas to mark them as containing the same documents. During
218recovery, if a replica has the same C<sync_id> as the primary, then it doesn't need to check
219whether the segment files on primary and replica are the same, and it can move on
220directly to just replaying the translog. This can greatly speed up recovery.
221
222Synced flushes happens automatically in the background on indices that have not received any
223writes for a while, but the L<flush_synced()> method can be used to trigger this process
224manually, eg before shutting down. Any new commits immediately break the sync.
225
226See the L<flush synced docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html>
227for more information.
228
229Query 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
240The C<forcemerge()> method rewrites all the data in an index into at most
241C<max_num_segments>. This is a very heavy operation and should only be run
242with care, and only on indices that are no longer being updated.
243
244Query 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
253See the L<forcemerge docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html>
254for more information.
255
256=head2 C<optimize()>
257
258The 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
264The C<optimize()> method rewrites all the data in an index into at most
265C<max_num_segments>. This is a very heavy operation and should only be run
266with care, and only on indices that are no longer being updated.
267
268Query 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
277See the L<optimize index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-optimize.html>
278for more information.
279
280=head2 C<get_upgrade()>
281
282 $response = $e->indices->get_upgrade(
283 index => 'index' | \@indices # optional
284 );
285
286The C<get_upgrade()> method returns information about which indices need to be
287upgraded, which can be done with the C<upgrade()> method.
288
289Query string parameters:
290 C<allow_no_indices>,
291 C<expand_wildcards>,
292 C<human>,
293 C<ignore_unavailable>
294
295See the L<upgrade docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>
296for more information.
297
298=head2 C<upgrade()>
299
300 $response = $e->indices->upgrade(
301 index => 'index' | \@indices # optional
302 );
303
304The C<upgrade()> method upgrades all segments in the specified indices to the latest format.
305
306Query 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
313See the L<upgrade docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html>
314for 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
327The C<put_mapping()> method is used to create or update a type
328mapping on an existing index. Mapping updates are allowed to add new
329fields, but not to overwrite or change existing fields.
330
331For 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
346Query 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
354See the L<put_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html>
355for 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
364The C<get_mapping()> method returns the type definitions for one, more or
365all types in one, more or all indices.
366
367Query string parameters:
368 C<allow_no_indices>,
369 C<expand_wildcards>,
370 C<ignore_unavailable>,
371 C<local>
372
373See the L<get_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html>
374for 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
386The C<get_field_mapping()> method returns the field definitions for one, more or
387all fields in one, more or all types and indices.
388
389Query string parameters:
390 C<allow_no_indices>,
391 C<expand_wildcards>,
392 C<ignore_unavailable>,
393 C<include_defaults>,
394 C<local>
395
396See the L<get_mapping docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html>
397for 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
406The C<exists_type()> method checks for the existence of all specified types
407in all specified indices, and returns C<1> or the empty string.
408
409Query string parameters:
410 C<allow_no_indices>,
411 C<expand_wildcards>,
412 C<ignore_unavailable>,
413 C<local>
414
415See the L<exists_type docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html>
416for 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
426The C<update_aliases()> method changes (by adding or removing) multiple
427index 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
438Query string parameters:
439 C<master_timeout>,
440 C<timeout>
441
442See the L<update_aliases docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
443for 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
452The C<get_aliases()> method returns a list of aliases per index for all
453the specified indices.
454
455Query string parameters:
456 C<local>,
457 C<timeout>
458
459See the L<get_aliases docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
460for 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
471The 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
481Query string parameters:
482 C<master_timeout>,
483 C<timeout>
484
485See the L<put_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
486for 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
495The C<get_alias()> method returns the alias definitions for the specified
496aliases in the specified indices.
497
498Query string parameters:
499 C<allow_no_indices>,
500 C<expand_wildcards>,
501 C<ignore_unavailable>,
502 C<local>
503
504See the L<get_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
505for 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
514The C<exists_alias()> method returns C<1> or the empty string depending on
515whether the specified aliases exist in the specified indices.
516
517Query string parameters:
518 C<allow_no_indices>,
519 C<expand_wildcards>,
520 C<ignore_unavailable>,
521 C<local>
522
523See the L<exists_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
524for 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
533The C<delete_alias()> method deletes one or more aliases from one or more
534indices.
535
536Query string parameters:
537 C<master_timeout>,
538 C<timeout>
539
540See the L<delete_alias docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html>
541for 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
553The C<put_settings()> method sets the index settings for the specified
554indices or all indices. For instance:
555
556 $response = $e->indices->put_settings(
557 body => {
558 "index.refresh_interval" => -1
559 }
560 );
561
562Query string parameters:
563 C<allow_no_indices>,
564 C<expand_wildcards>,
565 C<flat_settings>,
566 C<ignore_unavailable>,
567 C<master_timeout>
568
569See the L<put_settings docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html>
570for 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
579The C<get_settings()> method retrieves the index settings for the specified
580indices or all indices.
581
582Query 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
590See the L<get_settings docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html>
591for 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
602The C<put_template()> method is used to create or update index templates.
603
604Query 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
614See the L<put_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
615for more information.
616
617=head2 C<get_template()>
618
619 $result = $e->indices->get_template(
620 name => 'template' | \@templates # optional
621 );
622
623The C<get_template()> method is used to retrieve a named template.
624
625Query string parameters:
626 C<flat_settings>,
627 C<local>,
628 C<master_timeout>
629
630See the L<get_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
631for more information.
632
633=head2 C<exists_template()>
634
635 $result = $e->indices->exists_template(
636 name => 'template' # required
637 );
638
639The C<exists_template()> method is used to check whether the named template exists.
640
641Query string parameters:
642 C<local>,
643 C<master_timeout>
644
645See the L<get_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
646for more information.
647
648=head2 C<delete_template()>
649
650 $response = $e->indices->delete_template(
651 name => 'template' # required
652 );
653
654The C<delete_template()> method is used to delete a named template.
655
656Query string parameters:
657 C<master_timeout>,
658 C<timeout>,
659 C<version>,
660 C<version_type>
661
662See the L<delete_template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html>
663for 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
677The C<put_warmer()> method is used to create or update named warmers which
678are used to I<warm up> new segments in the index before they are exposed
679to 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
689Query string parameters:
690 C<allow_no_indices>,
691 C<expand_wildcards>,
692 C<ignore_unavailable>,
693 C<master_timeout>,
694 C<request_cache>
695
696See the L<put_warmer docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-warmers.html>
697for 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
707The C<get_warmer()> method is used to retrieve warmers by name.
708
709Query string parameters:
710 C<allow_no_indices>,
711 C<expand_wildcards>,
712 C<ignore_unavailable>,
713 C<local>
714
715See the L<get_warmer docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-warmers.html>
716for 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
725The C<delete_warmer()> method is used to delete warmers by name.
726
727Query string parameters:
728 C<master_timeout>
729
730See the L<delete_warmer docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-warmers.html>
731for 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
742The C<stats()> method returns statistical information about one, more or all
743indices. By default it returns all metrics, but you can limit which metrics
744are returned by specifying the C<metric>.
745
746Allowed 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
766Query 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
775See the L<stats docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html>
776for more information.
777
778=head2 C<recovery()>
779
780 $result = $e->indices->recovery(
781 index => 'index' | \@indices # optional
782 );
783
784Provides insight into on-going shard recoveries.
785
786Query string parameters:
787 C<active_only>,
788 C<detailed>,
789 C<human>
790
791See the L<recovery docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html>
792for more information.
793
794=head2 C<segments()>
795
796 $result = $e->indices->segments(
797 index => 'index' | \@indices # optional
798 );
799
800The C<segments()> method is used to return information about the segments
801that an index contains.
802
803Query string parameters:
804 C<allow_no_indices>,
805 C<expand_wildcards>,
806 C<human>,
807 C<ignore_unavailable>,
808 C<verbose>
809
810See the L<segments docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html>
811for more information.
812
813=head2 C<shard_stores()>
814
815 $result = $e->indices->shard_stores(
816 index => 'index' | \@indices # optional
817 );
818
819The C<shard_stores()> method is used to find out which nodes contain
820copies of which shards, whether the shards are allocated or not.
821
822Query string parameters:
823 C<allow_no_indices>,
824 C<expand_wildcards>,
825 C<human>,
826 C<ignore_unavailable>,
827 C<status>
828
829See the L<shard_stores docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html>
830for 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
841The C<analyze()> method passes the text in the C<body> through the specified
842C<analyzer>, C<tokenizer> or token C<filter> - which may be global, or associated
843with a particular index or field - and returns the tokens. Very useful
844for debugging analyzer configurations.
845
846Query string parameters:
847 C<analyzer>,
848 C<attributes>,
849 C<char_filters>,
850 C<explain>,
851 C<field>,
852 C<filters>,
853 C<format>,
854 C<prefer_local>,
855 C<text>,
856 C<tokenizer>
857
858See the L<analyze docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html>
859for 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
870The C<validate_query()> method accepts a query in the C<body> and checks
871whether the query is valid or not. Most useful when C<explain> is set
872to C<true>, in which case it includes an execution plan in the output.
873
874Query 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
888See the L<validate_query docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-validate.html>
889for more information.
890
891=head1 AUTHOR
892
893Clinton Gormley <drtech@cpan.org>
894
895=head1 COPYRIGHT AND LICENSE
896
897This software is Copyright (c) 2016 by Elasticsearch BV.
898
899This is free software, licensed under:
900
901 The Apache License, Version 2.0, January 2004
902
903=cut
904
905__END__