6_0/Direct.pm untested

filter: Statementstmt 0.0% 0 / 51 Branchbran n/a Conditioncond 0.0% 0 / 10 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 18 Podpod 0.0% 0 / 15 totaltotal 0.0% 0 / 94 CC 1 SCAR 6.9
CC
1
Cov
0%
_namespace
2.0
_build__bulk_class
2.0
_build__scroll_class
2.0
CRAP 2.0
1 # Licensed to Elasticsearch B.V under one or more agreements.
2 # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3 # See the LICENSE file in the project root for more information
4  
5 package Search::Elasticsearch::Client::6_0::Direct;
6 $Search::Elasticsearch::Client::6_0::Direct::VERSION = '7.711001';
7 use Moo;
8 with 'Search::Elasticsearch::Client::6_0::Role::API';
9 with 'Search::Elasticsearch::Role::Client::Direct';
10  
11 use Search::Elasticsearch::Util qw(parse_params is_compat);
12 use namespace::clean;
13  
14 sub _namespace {__PACKAGE__}
15  
16 has 'cluster' => ( is => 'lazy', init_arg => undef );
17 has 'nodes' => ( is => 'lazy', init_arg => undef );
18 has 'indices' => ( is => 'lazy', init_arg => undef );
19 has 'ingest' => ( is => 'lazy', init_arg => undef );
20 has 'snapshot' => ( is => 'lazy', init_arg => undef );
21 has 'cat' => ( is => 'lazy', init_arg => undef );
22 has 'ccr' => ( is => 'lazy', init_arg => undef );
23 has 'ilm' => ( is => 'lazy', init_arg => undef );
24 has 'tasks' => ( is => 'lazy', init_arg => undef );
25 has 'xpack' => ( is => 'lazy', init_arg => undef );
26 has 'bulk_helper_class' => ( is => 'rw' );
27 has 'scroll_helper_class' => ( is => 'rw' );
28 has '_bulk_class' => ( is => 'lazy' );
29 has '_scroll_class' => ( is => 'lazy' );
30  
31 #===================================
32 sub _build__bulk_class {
33 #===================================
34 my $self = shift;
35 my $bulk_class = $self->bulk_helper_class
36 || 'Client::' . $self->api_version . '::Bulk';
37 $self->_build_helper( 'bulk', $bulk_class );
38 }
39  
40 #===================================
41 sub _build__scroll_class {
42 #===================================
43 my $self = shift;
44 my $scroll_class = $self->scroll_helper_class
45 || 'Client::' . $self->api_version . '::Scroll';
46 $self->_build_helper( 'scroll', $scroll_class );
47 }
48  
49 #===================================
50 sub bulk_helper {
51 #===================================
52 my ( $self, $params ) = parse_params(@_);
53 $params->{es} ||= $self;
54 $self->_bulk_class->new($params);
55 }
56  
57 #===================================
58 sub scroll_helper {
59 #===================================
60 my ( $self, $params ) = parse_params(@_);
61 $params->{es} ||= $self;
62 $self->_scroll_class->new($params);
63 }
64  
65 #===================================
66 sub _build_cluster { shift->_build_namespace('Cluster') }
67 sub _build_nodes { shift->_build_namespace('Nodes') }
68 sub _build_indices { shift->_build_namespace('Indices') }
69 sub _build_ingest { shift->_build_namespace('Ingest') }
70 sub _build_snapshot { shift->_build_namespace('Snapshot') }
71 sub _build_cat { shift->_build_namespace('Cat') }
72 sub _build_ccr { shift->_build_namespace('CCR') }
73 sub _build_ilm { shift->_build_namespace('ILM') }
74 sub _build_tasks { shift->_build_namespace('Tasks') }
75 sub _build_xpack { shift->_build_namespace('XPack') }
76 #===================================
77  
78 __PACKAGE__->_install_api('');
79  
80 1;
81  
82 =pod
83  
84 =encoding UTF-8
85  
86 =head1 NAME
87  
88 Search::Elasticsearch::Client::6_0::Direct - Thin client with full support for Elasticsearch 6.x APIs
89  
90 =head1 VERSION
91  
92 version 7.711001
93  
94 =head1 SYNOPSIS
95  
96 Create a client:
97  
98 use Search::Elasticsearch;
99 my $e = Search::Elasticsearch->new(
100 client => '6_0::Direct'
101 );
102  
103 Index a doc:
104  
105 $e->index(
106 index => 'my_index',
107 type => 'blog_post',
108 id => 123,
109 body => {
110 title => "Elasticsearch clients",
111 content => "Interesting content...",
112 date => "2013-09-23"
113 }
114 );
115  
116 Get a doc:
117  
118 $e->get(
119 index => 'my_index',
120 type => 'my_type',
121 id => 123
122 );
123  
124 Search for docs:
125  
126 $results = $e->search(
127 index => 'my_index',
128 body => {
129 query => {
130 match => {
131 title => "elasticsearch"
132 }
133 }
134 }
135 );
136  
137 Index-level requests:
138  
139 $e->indices->create( index => 'my_index' );
140 $e->indices->delete( index => 'my_index' )
141  
142 Ingest pipeline requests:
143  
144 $e->ingest->get_pipeline( id => 'apache-logs' );
145  
146 Cluster-level requests:
147  
148 $health = $e->cluster->health;
149  
150 Node-level requests:
151  
152 $info = $e->nodes->info;
153 $stats = $e->nodes->stats;
154  
155 Snapshot and restore:
156  
157 $e->snapshot->create_repository(
158 repository => 'my_backups',
159 type => 'fs',
160 settings => {
161 location => '/mnt/backups'
162 }
163 );
164  
165 $e->snapshot->create(
166 repository => 'my_backups',
167 snapshot => 'backup_2014'
168 );
169  
170 Task management:
171  
172 $e->tasks->list;
173  
174 `cat` debugging:
175  
176 say $e->cat->allocation;
177 say $e->cat->health;
178  
179 Cross-cluster replication requests:
180  
181 say $e->ccr->follow;
182  
183 Index lifecycle management requests:
184  
185 say $e->ilm->put_lifecycle;
186  
187 =head1 DESCRIPTION
188  
189 The L<Search::Elasticsearch::Client::6_0::Direct> class provides the
190 Elasticsearch 6.x compatible client returned by:
191  
192 $e = Search::Elasticsearch->new(
193 client => "6_0::Direct" # default
194 );
195  
196 It is intended to be as close as possible to the native REST API that
197 Elasticsearch uses, so that it is easy to translate the
198 L<Elasticsearch reference documentation|http://www.elasticsearch/guide>
199 for an API to the equivalent in this client.
200  
201 This class provides the methods for L<document CRUD|/DOCUMENT CRUD METHODS>,
202 L<bulk document CRUD|/BULK DOCUMENT CRUD METHODS> and L<search|/SEARCH METHODS>.
203 It also provides access to clients for managing L<indices|/indices()>
204 and the L<cluster|/cluster()>.
205  
206 =head1 PREVIOUS VERSIONS OF ELASTICSEARCH
207  
208 This version of the client supports the Elasticsearch 6.0 branch,
209 which is not backwards compatible with earlier branches.
210  
211 If you need to talk to a version of Elasticsearch before 6.0.0, please
212 install one of the following modules:
213  
214 =over
215  
216 =item *
217  
218 L<Search::Elasticsearch::Client::5_0>
219  
220 =item *
221  
222 L<Search::Elasticsearch::Client::2_0>
223  
224 =item *
225  
226 L<Search::Elasticsearch::Client::1_0>
227  
228 =item *
229  
230 L<Search::Elasticsearch::Client::0_90>
231  
232 =back
233  
234 =head1 CONVENTIONS
235  
236 =head2 Parameter passing
237  
238 Parameters can be passed to any request method as a list or as a hash
239 reference. The following two statements are equivalent:
240  
241 $e->search( size => 10 );
242 $e->search({size => 10});
243  
244 =head2 Path parameters
245  
246 Any values that should be included in the URL path, eg C</{index}/{type}>
247 should be passed as top level parameters:
248  
249 $e->search( index => 'my_index', type => 'my_type' );
250  
251 Alternatively, you can specify a C<path> parameter directly:
252  
253 $e->search( path => '/my_index/my_type' );
254  
255 =head2 Query-string parameters
256  
257 Any values that should be included in the query string should be passed
258 as top level parameters:
259  
260 $e->search( size => 10 );
261  
262 If you pass in a C<\%params> hash, then it will be included in the
263 query string parameters without any error checking. The following:
264  
265 $e->search( size => 10, params => { from => 6, size => 6 })
266  
267 would result in this query string:
268  
269 ?from=6&size=10
270  
271 =head2 Body parameter
272  
273 The request body should be passed in the C<body> key:
274  
275 $e->search(
276 body => {
277 query => {...}
278 }
279 );
280  
281 The body can also be a UTF8-decoded string, which will be converted into
282 UTF-8 bytes and passed as is:
283  
284 $e->indices->analyze( body => "The quick brown fox");
285  
286 =head2 Boolean parameters
287  
288 Elasticsearch 6.0.0 and above no longer accepts truthy and falsey values for booleans. Instead,
289 it will accept only a JSON C<true> or C<false>, or the string equivalents C<"true"> or C<"false">.
290  
291 In the Perl client, you can use the following values:
292  
293 =over
294  
295 =item * True: C<true>, C<\1>, or a L<JSON::PP::Boolean> object.
296  
297 =item * False: C<false>, C<\0>, or a L<JSON::PP::Boolean> object.
298  
299 =back
300  
301 =head2 Filter path parameter
302  
303 Any API which returns a JSON body accepts a C<filter_path> parameter
304 which will filter the JSON down to only the specified paths. For instance,
305 if you are running a search request and only want the C<total> hits and
306 the C<_source> field for each hit (without the C<_id>, C<_index> etc),
307 you can do:
308  
309 $e->search(
310 query => {...},
311 filter_paths => [ 'hits.total', 'hits.hits._source' ]
312 );
313  
314 =head2 Ignore parameter
315  
316 Normally, any HTTP status code outside the 200-299 range will result in
317 an error being thrown. To suppress these errors, you can specify which
318 status codes to ignore in the C<ignore> parameter.
319  
320 $e->indices->delete(
321 index => 'my_index',
322 ignore => 404
323 );
324  
325 This is most useful for
326 L<Missing|Search::Elasticsearch::Error/Search::Elasticsearch::Error::Missing> errors, which
327 are triggered by a C<404> status code when some requested resource does
328 not exist.
329  
330 Multiple error codes can be specified with an array:
331  
332 $e->indices->delete(
333 index => 'my_index',
334 ignore => [404,409]
335 );
336  
337 =head1 CONFIGURATION
338  
339 =head2 C<bulk_helper_class>
340  
341 The class to use for the L</bulk_helper()> method. Defaults to
342 L<Search::Elasticsearch::Client::6_0::Bulk>.
343  
344 =head2 C<scroll_helper_class>
345  
346 The class to use for the L</scroll_helper()> method. Defaults to
347 L<Search::Elasticsearch::Client::6_0::Scroll>.
348  
349 =head1 GENERAL METHODS
350  
351 =head2 C<info()>
352  
353 $info = $e->info
354  
355 Returns information about the version of Elasticsearch that the responding node
356 is running.
357  
358 =head2 C<ping()>
359  
360 $e->ping
361  
362 Pings a node in the cluster and returns C<1> if it receives a C<200>
363 response, otherwise it throws an error.
364  
365 =head2 C<indices()>
366  
367 $indices_client = $e->indices;
368  
369 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Indices> object which can be used
370 for managing indices, eg creating, deleting indices, managing mapping,
371 index settings etc.
372  
373 =head2 C<ingest()>
374  
375 $ingest_client = $e->ingest;
376  
377 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Ingest> object which can be used
378 for managing ingest pipelines.
379  
380 =head2 C<cluster()>
381  
382 $cluster_client = $e->cluster;
383  
384 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Cluster> object which can be used
385 for managing the cluster, eg cluster-wide settings and cluster health.
386  
387 =head2 C<nodes()>
388  
389 $node_client = $e->nodes;
390  
391 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Nodes> object which can be used
392 to retrieve node info and stats.
393  
394 =head2 C<snapshot()>
395  
396 $snapshot_client = $e->snapshot;
397  
398 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Snapshot> object which
399 is used for managing backup repositories and creating and restoring
400 snapshots.
401  
402 =head2 C<tasks()>
403  
404 $tasks_client = $e->tasks;
405  
406 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Tasks> object which
407 is used for accessing the task management API.
408  
409 =head2 C<cat()>
410  
411 $cat_client = $e->cat;
412  
413 Returns a L<Search::Elasticsearch::Client::6_0::Direct::Cat> object which can be used
414 to retrieve simple to read text info for debugging and monitoring an
415 Elasticsearch cluster.
416  
417 =head2 C<ccr()>
418  
419 $ccr_client = $e->ccr;
420  
421 Returns a L<Search::Elasticsearch::Client::6_0::Direct::CCR> object which can be used
422 to handle cross-cluster replication requests.
423  
424 =head2 C<ilm()>
425  
426 $ilm_client = $e->ilm;
427  
428 Returns a L<Search::Elasticsearch::Client::6_0::Direct::ILM> object which can be used
429 to handle index lifecycle management requests.
430  
431 =head1 DOCUMENT CRUD METHODS
432  
433 These methods allow you to perform create, index, update and delete requests
434 for single documents:
435  
436 =head2 C<index()>
437  
438 $response = $e->index(
439 index => 'index_name', # required
440 type => 'type_name', # required
441 id => 'doc_id', # optional, otherwise auto-generated
442  
443 body => { document } # required
444 );
445  
446 The C<index()> method is used to index a new document or to reindex
447 an existing document.
448  
449 Query string parameters:
450 C<error_trace>,
451 C<human>,
452 C<if_primary_term>,
453 C<if_seq_no>,
454 C<op_type>,
455 C<parent>,
456 C<pipeline>,
457 C<refresh>,
458 C<routing>,
459 C<timeout>,
460 C<version>,
461 C<version_type>,
462 C<wait_for_active_shards>
463  
464 See the L<index docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html>
465 for more information.
466  
467 =head2 C<create()>
468  
469 $response = $e->create(
470 index => 'index_name', # required
471 type => 'type_name', # required
472 id => 'doc_id', # required
473  
474 body => { document } # required
475 );
476  
477 The C<create()> method works exactly like the L</index()> method, except
478 that it will throw a C<Conflict> error if a document with the same
479 C<index>, C<type> and C<id> already exists.
480  
481 Query string parameters:
482 C<consistency>,
483 C<error_trace>,
484 C<human>,
485 C<op_type>,
486 C<parent>,
487 C<refresh>,
488 C<routing>,
489 C<timeout>,
490 C<version>,
491 C<version_type>
492  
493 See the L<create docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-create.html>
494 for more information.
495  
496 =head2 C<get()>
497  
498 $response = $e->get(
499 index => 'index_name', # required
500 type => 'type_name', # required
501 id => 'doc_id', # required
502 );
503  
504 The C<get()> method will retrieve the document with the specified
505 C<index>, C<type> and C<id>, or will throw a C<Missing> error.
506  
507 Query string parameters:
508 C<_source>,
509 C<_source_excludes>,
510 C<_source_includes>,
511 C<error_trace>,
512 C<human>,
513 C<parent>,
514 C<preference>,
515 C<realtime>,
516 C<refresh>,
517 C<routing>,
518 C<stored_fields>,
519 C<version>,
520 C<version_type>
521  
522 See the L<get docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html>
523 for more information.
524  
525 =head2 C<get_source()>
526  
527 $response = $e->get_source(
528 index => 'index_name', # required
529 type => 'type_name', # required
530 id => 'doc_id', # required
531 );
532  
533 The C<get_source()> method works just like the L</get()> method except that
534 it returns just the C<_source> field (the value of the C<body> parameter
535 in the L</index()> method) instead of returning the C<_source> field
536 plus the document metadata, ie the C<_index>, C<_type> etc.
537  
538 Query string parameters:
539 C<_source>,
540 C<_source_excludes>,
541 C<_source_includes>,
542 C<error_trace>,
543 C<human>,
544 C<parent>,
545 C<preference>,
546 C<realtime>,
547 C<refresh>,
548 C<routing>,
549 C<version>,
550 C<version_type>
551  
552 See the L<get_source docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html>
553 for more information.
554  
555 =head2 C<exists()>
556  
557 $response = $e->exists(
558 index => 'index_name', # required
559 type => 'type_name', # required
560 id => 'doc_id', # required
561 );
562  
563 The C<exists()> method returns C<1> if a document with the specified
564 C<index>, C<type> and C<id> exists, or an empty string if it doesn't.
565  
566 Query string parameters:
567 C<_source>,
568 C<_source_excludes>,
569 C<_source_includes>,
570 C<error_trace>,
571 C<human>,
572 C<parent>,
573 C<preference>,
574 C<realtime>,
575 C<refresh>,
576 C<routing>,
577 C<version>,
578 C<version_type>
579  
580 See the L<exists docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html>
581 for more information.
582  
583 =head2 C<delete()>
584  
585 $response = $e->delete(
586 index => 'index_name', # required
587 type => 'type_name', # required
588 id => 'doc_id', # required
589 );
590  
591 The C<delete()> method will delete the document with the specified
592 C<index>, C<type> and C<id>, or will throw a C<Missing> error.
593  
594 Query string parameters:
595 C<error_trace>,
596 C<human>,
597 C<if_primary_term>,
598 C<if_seq_no>,
599 C<parent>,
600 C<refresh>,
601 C<routing>,
602 C<timeout>,
603 C<version>,
604 C<version_type>,
605 C<wait_for_active_shards>
606  
607 See the L<delete docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html>
608 for more information.
609  
610 =head2 C<update()>
611  
612 $response = $e->update(
613 index => 'index_name', # required
614 type => 'type_name', # required
615 id => 'doc_id', # required
616  
617 body => { update } # required
618 );
619  
620 The C<update()> method updates a document with the corresponding
621 C<index>, C<type> and C<id> if it exists. Updates can be performed either by:
622  
623 =over
624  
625 =item * providing a partial document to be merged in to the existing document:
626  
627 $response = $e->update(
628 ...,
629 body => {
630 doc => { new_field => 'new_value'},
631 }
632 );
633  
634 =item * with an inline script:
635  
636 $response = $e->update(
637 ...,
638 body => {
639 script => {
640 source => "ctx._source.counter += incr",
641 params => { incr => 6 }
642 }
643 }
644 );
645  
646 =item * with an indexed script:
647  
648 $response = $e->update(
649 ...,
650 body => {
651 script => {
652 id => $id,
653 lang => 'painless',
654 params => { incr => 6 }
655 }
656 }
657 );
658  
659 See L<indexed scripts|https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#_indexed_scripts>
660 for more information.
661  
662 =item * with a script stored as a file:
663  
664 $response = $e->update(
665 ...,
666 body => {
667 script => {
668 file => 'counter',
669 lang => 'painless',
670 params => { incr => 6 }
671 }
672 }
673 );
674  
675 See L<scripting docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html>
676 for more information.
677  
678 =back
679  
680 Query string parameters:
681 C<_source>,
682 C<_source_excludes>,
683 C<_source_includes>,
684 C<error_trace>,
685 C<fields>,
686 C<human>,
687 C<if_primary_term>,
688 C<if_seq_no>,
689 C<lang>,
690 C<parent>,
691 C<refresh>,
692 C<retry_on_conflict>,
693 C<routing>,
694 C<timeout>,
695 C<version>,
696 C<version_type>,
697 C<wait_for_active_shards>
698  
699 See the L<update docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html>
700 for more information.
701  
702 =head2 C<termvectors()>
703  
704 $results = $e->termvectors(
705 index => $index, # required
706 type => $type, # required
707  
708 id => $id, # optional
709 body => {...} # optional
710 )
711  
712 The C<termvectors()> method retrieves term and field statistics, positions,
713 offsets and payloads for the specified document, assuming that termvectors
714 have been enabled.
715  
716 Query string parameters:
717 C<error_trace>,
718 C<field_statistics>,
719 C<fields>,
720 C<human>,
721 C<offsets>,
722 C<parent>,
723 C<payloads>,
724 C<positions>,
725 C<preference>,
726 C<realtime>,
727 C<routing>,
728 C<term_statistics>,
729 C<version>,
730 C<version_type>
731  
732 See the L<termvector docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html>
733 for more information.
734  
735 =head1 BULK DOCUMENT CRUD METHODS
736  
737 The bulk document CRUD methods are used for running multiple CRUD actions
738 within a single request. By reducing the number of network requests
739 that need to be made, bulk requests greatly improve performance.
740  
741 =head2 C<bulk()>
742  
743 $response = $e->bulk(
744 index => 'index_name', # required if type specified
745 type => 'type_name', # optional
746  
747 body => [ actions ] # required
748 );
749  
750 See L<Search::Elasticsearch::Client::6_0::Bulk> and L</bulk_helper()> for a helper module that makes
751 bulk indexing simpler to use.
752  
753 The C<bulk()> method can perform multiple L</index()>, L</create()>,
754 L</delete()> or L</update()> actions with a single request. The C<body>
755 parameter expects an array containing the list of actions to perform.
756  
757 An I<action> consists of an initial metadata hash ref containing the action
758 type, plus the associated metadata, eg :
759  
760 { delete => { _index => 'index', _type => 'type', _id => 123 }}
761  
762 The C<index> and C<create> actions then expect a hashref containing
763 the document itself:
764  
765 { create => { _index => 'index', _type => 'type', _id => 123 }},
766 { title => "A newly created document" }
767  
768 And the C<update> action expects a hashref containing the update commands,
769 eg:
770  
771 { update => { _index => 'index', _type => 'type', _id => 123 }},
772 { script => "ctx._source.counter+=1" }
773  
774 Each action can include the same parameters that you would pass to
775 the equivalent L</index()>, L</create()>, L</delete()> or L</update()>
776 request, except that C<_index>, C<_type> and C<_id> must be specified with
777 the preceding underscore. All other parameters can be specified with or
778 without the underscore.
779  
780 For instance:
781  
782 $response = $e->bulk(
783 index => 'index_name', # default index name
784 type => 'type_name', # default type name
785 body => [
786  
787 # create action
788 { create => {
789 _index => 'not_the_default_index',
790 _type => 'not_the_default_type',
791 _id => 123
792 }},
793 { title => 'Foo' },
794  
795 # index action
796 { index => { _id => 124 }},
797 { title => 'Foo' },
798  
799 # delete action
800 { delete => { _id => 126 }},
801  
802 # update action
803 { update => { _id => 126 }},
804 { script => "ctx._source.counter+1" }
805 ]
806 );
807  
808 Each action is performed separately. One failed action will not
809 cause the others to fail as well.
810  
811 Query string parameters:
812 C<_source>,
813 C<_source_excludes>,
814 C<_source_includes>,
815 C<error_trace>,
816 C<fields>,
817 C<human>,
818 C<pipeline>,
819 C<refresh>,
820 C<routing>,
821 C<timeout>,
822 C<wait_for_active_shards>
823  
824 See the L<bulk docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html>
825 for more information.
826  
827 =head2 C<bulk_helper()>
828  
829 $bulk_helper = $e->bulk_helper( @args );
830  
831 Returns a new instance of the class specified in the L</bulk_helper_class>,
832 which defaults to L<Search::Elasticsearch::Client::6_0::Bulk>.
833  
834 =head2 C<mget()>
835  
836 $results = $e->mget(
837 index => 'default_index', # optional, required when type specified
838 type => 'default_type', # optional
839  
840 body => { docs or ids } # required
841 );
842  
843 The C<mget()> method will retrieve multiple documents with a single request.
844 The C<body> consists of an array of documents to retrieve:
845  
846 $results = $e->mget(
847 index => 'default_index',
848 type => 'default_type',
849 body => {
850 docs => [
851 { _id => 1},
852 { _id => 2, _type => 'not_the_default_type' }
853 ]
854 }
855 );
856  
857 You can also pass any of the other parameters that the L</get()> request
858 accepts.
859  
860 If you have specified an C<index> and C<type>, you can just include the
861 C<ids> of the documents to retrieve:
862  
863 $results = $e->mget(
864 index => 'default_index',
865 type => 'default_type',
866 body => {
867 ids => [ 1, 2, 3]
868 }
869 );
870  
871 Query string parameters:
872 C<_source>,
873 C<_source_excludes>,
874 C<_source_includes>,
875 C<error_trace>,
876 C<human>,
877 C<preference>,
878 C<realtime>,
879 C<refresh>,
880 C<routing>,
881 C<stored_fields>
882  
883 See the L<mget docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html>
884 for more information.
885  
886 =head2 C<mtermvectors()>
887  
888 $results = $e->mtermvectors(
889 index => $index, # required if type specified
890 type => $type, # optional
891  
892 body => { } # optional
893 )
894  
895 Runs multiple L</termvector()> requests in a single request, eg:
896  
897 $results = $e->mtermvectors(
898 index => 'test',
899 body => {
900 docs => [
901 { _type => 'test', _id => 1, fields => ['text'] },
902 { _type => 'test', _id => 2, payloads => 1 },
903 ]
904 }
905 );
906  
907 Query string parameters:
908 C<error_trace>,
909 C<field_statistics>,
910 C<fields>,
911 C<human>,
912 C<ids>,
913 C<offsets>,
914 C<parent>,
915 C<payloads>,
916 C<positions>,
917 C<preference>,
918 C<realtime>,
919 C<routing>,
920 C<term_statistics>,
921 C<version>,
922 C<version_type>
923  
924 See the L<mtermvectors docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html>
925 for more information.
926  
927 =head1 SEARCH METHODS
928  
929 The search methods are used for querying documents in one, more or all indices
930 and of one, more or all types:
931  
932 =head2 C<search()>
933  
934 $results = $e->search(
935 index => 'index' | \@indices, # optional
936 type => 'type' | \@types, # optional
937  
938 body => { search params } # optional
939 );
940  
941 The C<search()> method searches for matching documents in one or more
942 indices. It is just as easy to search a single index as it is to search
943 all the indices in your cluster. It can also return
944 L<aggregations|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html>
945 L<highlighted snippets|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-highlighting.html>
946 and L<did-you-mean|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-phrase.html>
947 or L<search-as-you-type|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html>
948 suggestions.
949  
950 The I<lite> L<version of search|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html>
951 allows you to specify a query string in the C<q> parameter, using the
952 Lucene query string syntax:
953  
954 $results = $e->search( q => 'title:(elasticsearch clients)');
955  
956 However, the preferred way to search is by using the
957 L<Query DSL|http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html>
958 to create a query, and passing that C<query> in the
959 L<request body|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html>:
960  
961 $results = $e->search(
962 body => {
963 query => {
964 match => { title => 'Elasticsearch clients'}
965 }
966 }
967 );
968  
969 Query string parameters:
970 C<_source>,
971 C<_source_excludes>,
972 C<_source_includes>,
973 C<allow_no_indices>,
974 C<allow_partial_search_results>,
975 C<analyze_wildcard>,
976 C<analyzer>,
977 C<batched_reduce_size>,
978 C<default_operator>,
979 C<df>,
980 C<docvalue_fields>,
981 C<error_trace>,
982 C<expand_wildcards>,
983 C<explain>,
984 C<from>,
985 C<human>,
986 C<ignore_throttled>,
987 C<ignore_unavailable>,
988 C<lenient>,
989 C<max_concurrent_shard_requests>,
990 C<pre_filter_shard_size>,
991 C<preference>,
992 C<q>,
993 C<request_cache>,
994 C<rest_total_hits_as_int>,
995 C<routing>,
996 C<scroll>,
997 C<search_type>,
998 C<seq_no_primary_term>,
999 C<size>,
1000 C<sort>,
1001 C<stats>,
1002 C<stored_fields>,
1003 C<suggest_field>,
1004 C<suggest_mode>,
1005 C<suggest_size>,
1006 C<suggest_text>,
1007 C<terminate_after>,
1008 C<timeout>,
1009 C<track_scores>,
1010 C<track_total_hits>,
1011 C<typed_keys>,
1012 C<version>
1013  
1014 See the L<search reference|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html>
1015 for more information.
1016  
1017 Also see L<Search::Elasticsearch::Transport/send_get_body_as>.
1018  
1019 =head2 C<count()>
1020  
1021 $results = $e->count(
1022 index => 'index' | \@indices, # optional
1023 type => 'type' | \@types, # optional
1024  
1025 body => { query } # optional
1026 )
1027  
1028 The C<count()> method returns the total count of all documents matching the
1029 query:
1030  
1031 $results = $e->count(
1032 body => {
1033 query => {
1034 match => { title => 'Elasticsearch clients' }
1035 }
1036 }
1037 );
1038  
1039 Query string parameters:
1040 C<allow_no_indices>,
1041 C<analyze_wildcard>,
1042 C<analyzer>,
1043 C<default_operator>,
1044 C<df>,
1045 C<error_trace>,
1046 C<expand_wildcards>,
1047 C<human>,
1048 C<ignore_throttled>,
1049 C<ignore_unavailable>,
1050 C<lenient>,
1051 C<lowercase_expanded_terms>
1052 C<min_score>,
1053 C<preference>,
1054 C<q>,
1055 C<routing>,
1056 C<terminate_after>
1057  
1058 See the L<count docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html>
1059 for more information.
1060  
1061 =head2 C<search_template()>
1062  
1063 $results = $e->search_template(
1064 index => 'index' | \@indices, # optional
1065 type => 'type' | \@types, # optional
1066  
1067 body => { search params } # required
1068 );
1069  
1070 Perform a search by specifying a template (either predefined or defined
1071 within the C<body>) and parameters to use with the template, eg:
1072  
1073 $results = $e->search_template(
1074 body => {
1075 source => {
1076 query => {
1077 match => {
1078 "{{my_field}}" => "{{my_value}}"
1079 }
1080 },
1081 size => "{{my_size}}"
1082 },
1083 params => {
1084 my_field => 'foo',
1085 my_value => 'bar',
1086 my_size => 6
1087 }
1088 }
1089 );
1090  
1091 See the L<search template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html>
1092 for more information.
1093  
1094 Query string parameters:
1095 C<allow_no_indices>,
1096 C<error_trace>,
1097 C<expand_wildcards>,
1098 C<explain>,
1099 C<human>,
1100 C<ignore_throttled>,
1101 C<ignore_unavailable>,
1102 C<preference>,
1103 C<profile>,
1104 C<rest_total_hits_as_int>,
1105 C<scroll>,
1106 C<search_type>,
1107 C<typed_keys>
1108  
1109 =head2 C<render_search_template()>
1110  
1111 $response = $e->render_search_template(
1112 id => 'id', # optional
1113 body => { template } # optional
1114 );
1115  
1116 Renders the template, filling in the passed-in parameters and returns the resulting JSON, eg:
1117  
1118 $results = $e->render_search_template(
1119 body => {
1120 source => {
1121 query => {
1122 match => {
1123 "{{my_field}}" => "{{my_value}}"
1124 }
1125 },
1126 size => "{{my_size}}"
1127 },
1128 params => {
1129 my_field => 'foo',
1130 my_value => 'bar',
1131 my_size => 6
1132 }
1133 }
1134 );
1135  
1136 See the L<search template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html>
1137 for more information.
1138  
1139 =head2 C<scroll()>
1140  
1141 $results = $e->scroll(
1142 scroll => '1m',
1143 body => {
1144 scroll_id => $id
1145 }
1146 );
1147  
1148 When a L</search()> has been performed with the
1149 C<scroll> parameter, the C<scroll()>
1150 method allows you to keep pulling more results until the results
1151 are exhausted.
1152  
1153 See L</scroll_helper()> and L<Search::Elasticsearch::Client::6_0::Scroll> for a helper utility
1154 which makes managing scroll requests much easier.
1155  
1156 Query string parameters:
1157 C<error_trace>,
1158 C<human>,
1159 C<rest_total_hits_as_int>,
1160 C<scroll>,
1161 C<scroll_id>
1162  
1163 See the L<scroll docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html>
1164 and the L<search_type docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search.html/search-request-search-type.html>
1165 for more information.
1166  
1167 =head2 C<clear_scroll()>
1168  
1169 $response = $e->clear_scroll(
1170 body => {
1171 scroll_id => $id | \@ids # required
1172 }
1173 );
1174  
1175 The C<clear_scroll()> method can clear unfinished scroll requests, freeing
1176 up resources on the server.
1177  
1178 =head2 C<scroll_helper()>
1179  
1180 $scroll_helper = $e->scroll_helper( @args );
1181  
1182 Returns a new instance of the class specified in the L</scroll_helper_class>,
1183 which defaults to L<Search::Elasticsearch::Client::6_0::Scroll>.
1184  
1185 =head2 C<msearch()>
1186  
1187 $results = $e->msearch(
1188 index => 'default_index' | \@indices, # optional
1189 type => 'default_type' | \@types, # optional
1190  
1191 body => [ searches ] # required
1192 );
1193  
1194 The C<msearch()> method allows you to perform multiple searches in a single
1195 request. Similar to the L</bulk()> request, each search request in the
1196 C<body> consists of two hashes: the metadata hash then the search request
1197 hash (the same data that you'd specify in the C<body> of a L</search()>
1198 request). For instance:
1199  
1200 $results = $e->msearch(
1201 index => 'default_index',
1202 type => ['default_type_1', 'default_type_2'],
1203 body => [
1204 # uses defaults
1205 {},
1206 { query => { match_all => {} }},
1207  
1208 # uses a custom index
1209 { index => 'not_the_default_index' },
1210 { query => { match_all => {} }}
1211 ]
1212 );
1213  
1214 Query string parameters:
1215 C<error_trace>,
1216 C<human>,
1217 C<max_concurrent_searches>,
1218 C<max__concurrent_shard_requests>,
1219 C<pre_filter_shard_size>,
1220 C<rest_total_hits_as_int>,
1221 C<search_type>,
1222 C<typed_keys>
1223  
1224 See the L<msearch docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html>
1225 for more information.
1226  
1227 =head2 C<msearch_template()>
1228  
1229 $results = $e->msearch_template(
1230 index => 'default_index' | \@indices, # optional
1231 type => 'default_type' | \@types, # optional
1232  
1233 body => [ search_templates ] # required
1234 );
1235  
1236 The C<msearch_template()> method allows you to perform multiple searches in a single
1237 request using search templates. Similar to the L</bulk()> request, each search
1238 request in the C<body> consists of two hashes: the metadata hash then the search request
1239 hash (the same data that you'd specify in the C<body> of a L</search()>
1240 request). For instance:
1241  
1242 $results = $e->msearch(
1243 index => 'default_index',
1244 type => ['default_type_1', 'default_type_2'],
1245 body => [
1246 # uses defaults
1247 {},
1248 { source => { query => { match => { user => "{{user}}" }}} params => { user => 'joe' }},
1249  
1250 # uses a custom index
1251 { index => 'not_the_default_index' },
1252 { source => { query => { match => { user => "{{user}}" }}} params => { user => 'joe' }},
1253 ]
1254 );
1255  
1256 Query string parameters:
1257 C<error_trace>,
1258 C<human>,
1259 C<max_concurrent_searches>,
1260 C<rest_total_hits_as_int>,
1261 C<search_type>,
1262 C<typed_keys>
1263  
1264 See the L<msearch-template docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html>
1265 for more information.
1266  
1267 =head2 C<explain()>
1268  
1269 $response = $e->explain(
1270 index => 'my_index', # required
1271 type => 'my_type', # required
1272 id => 123, # required
1273  
1274 body => { search } # required
1275 );
1276  
1277 The C<explain()> method explains why the specified document did or
1278 did not match a query, and how the relevance score was calculated.
1279 For instance:
1280  
1281 $response = $e->explain(
1282 index => 'my_index',
1283 type => 'my_type',
1284 id => 123,
1285 body => {
1286 query => {
1287 match => { title => 'Elasticsearch clients' }
1288 }
1289 }
1290 );
1291  
1292 Query string parameters:
1293 C<_source>,
1294 C<_source_excludes>,
1295 C<_source_includes>,
1296 C<analyze_wildcard>,
1297 C<analyzer>,
1298 C<default_operator>,
1299 C<df>,
1300 C<error_trace>,
1301 C<human>,
1302 C<lenient>,
1303 C<parent>,
1304 C<preference>,
1305 C<q>,
1306 C<routing>,
1307 C<stored_fields>
1308  
1309 See the L<explain docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html>
1310 for more information.
1311  
1312 =head2 C<field_caps()>
1313  
1314 $response = $e->field_caps(
1315 index => 'index' | \@indices, # optional
1316 body => { filters } # optional
1317 );
1318  
1319 The C<field-caps> API returns field types and abilities, merged across indices.
1320  
1321 Query string parameters:
1322 C<allow_no_indices>,
1323 C<error_trace>,
1324 C<expand_wildcards>,
1325 C<fields>,
1326 C<human>,
1327 C<ignore_unavailable>
1328  
1329 See the L<field-caps docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html>
1330 for more information.
1331  
1332 =head2 C<search_shards()>
1333  
1334 $response = $e->search_shards(
1335 index => 'index' | \@indices, # optional
1336 )
1337  
1338 The C<search_shards()> method returns information about which shards on
1339 which nodes will execute a search request.
1340  
1341 Query string parameters:
1342 C<allow_no_indices>,
1343 C<error_trace>,
1344 C<expand_wildcards>,
1345 C<human>,
1346 C<ignore_unavailable>,
1347 C<local>,
1348 C<preference>,
1349 C<routing>
1350  
1351 See the L<search-shards docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html>
1352 for more information.
1353  
1354 =head2 C<rank_eval()>
1355  
1356 $result = $e->rank_eval(
1357 index => 'index' | \@indices, # optional
1358 body => {...} # required
1359 );
1360  
1361 The ranking evaluation API provides a way to execute test cases to determine whether search results
1362 are improving or worsening.
1363  
1364 Query string parameters:
1365 C<allow_no_indices>,
1366 C<error_trace>,
1367 C<expand_wildcards>,
1368 C<filter_path>,
1369 C<human>,
1370 C<ignore_unavailable>
1371  
1372 See the L<rank-eval docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/search-rank-eval.html>
1373 for more information.
1374  
1375 =head1 CRUD-BY-QUERY METHODS
1376  
1377 =head2 C<delete_by_query()>
1378  
1379 $response = $e->delete_by_query(
1380 index => 'index' | \@indices, # optional
1381 type => 'type' | \@types, # optional,
1382 body => { delete-by-query } # required
1383 );
1384  
1385 The C<delete_by_query()> method deletes all documents which match the specified query.
1386  
1387 Query string parameters:
1388 C<_source>,
1389 C<_source_excludes>,
1390 C<_source_includes>,
1391 C<allow_no_indices>,
1392 C<analyze_wildcard>,
1393 C<analyzer>,
1394 C<conflicts>,
1395 C<default_operator>,
1396 C<df>,
1397 C<error_trace>,
1398 C<expand_wildcards>,
1399 C<from>,
1400 C<human>,
1401 C<ignore_unavailable>,
1402 C<lenient>,
1403 C<preference>,
1404 C<q>,
1405 C<refresh>,
1406 C<request_cache>,
1407 C<requests_per_second>,
1408 C<routing>,
1409 C<scroll>,
1410 C<scroll_size>,
1411 C<search_timeout>,
1412 C<search_type>,
1413 C<size>,
1414 C<slices>,
1415 C<sort>,
1416 C<stats>,
1417 C<terminate_after>,
1418 C<version>,
1419 C<timeout>,
1420 C<wait_for_active_shards>,
1421 C<wait_for_completion>
1422  
1423 See the L<delete-by-query docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html>
1424 for more information.
1425  
1426 =head2 C<delete_by_query_rethrottle()>
1427  
1428 $response = $e->delete_by_query_rethrottle(
1429 task_id => 'id' # required
1430 requests_per_second => num
1431 );
1432  
1433 The C<delete_by_query_rethrottle()> API is used to dynamically update the throtting
1434 of an existing delete-by-query request, identified by C<task_id>.
1435  
1436 Query string parameters:
1437 C<error_trace>,
1438 C<filter_path>,
1439 C<human>,
1440 C<requests_per_second>
1441  
1442 See the L<delete-by-query-rethrottle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html>
1443 for more information.
1444  
1445 =head2 C<reindex()>
1446  
1447 $response = $e->reindex(
1448 body => { reindex } # required
1449 );
1450  
1451 The C<reindex()> API is used to index documents from one index or multiple indices
1452 to a new index.
1453  
1454 Query string parameters:
1455 C<error_trace>,
1456 C<human>,
1457 C<refresh>,
1458 C<requests_per_second>,
1459 C<slices>,
1460 C<timeout>,
1461 C<wait_for_active_shards>,
1462 C<wait_for_completion>
1463  
1464 See the L<reindex docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html>
1465 for more information.
1466  
1467 =head2 C<reindex_rethrottle()>
1468  
1469 $response = $e->delete_by_query_rethrottle(
1470 task_id => 'id', # required
1471 requests_per_second => num
1472 );
1473  
1474 The C<reindex_rethrottle()> API is used to dynamically update the throtting
1475 of an existing reindex request, identified by C<task_id>.
1476  
1477 Query string parameters:
1478 C<error_trace>,
1479 C<filter_path>,
1480 C<human>,
1481 C<requests_per_second>
1482  
1483 See the L<reindex-rethrottle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html>
1484 for more information.
1485  
1486 =head2 C<update_by_query()>
1487  
1488 $response = $e->update_by_query(
1489 index => 'index' | \@indices, # optional
1490 type => 'type' | \@types, # optional,
1491 body => { update-by-query } # optional
1492 );
1493  
1494 The C<update_by_query()> API is used to bulk update documents from one index or
1495 multiple indices using a script.
1496  
1497 Query string parameters:
1498 C<_source>,
1499 C<_source_excludes>,
1500 C<_source_includes>,
1501 C<allow_no_indices>,
1502 C<analyze_wildcard>,
1503 C<analyzer>,
1504 C<conflicts>,
1505 C<default_operator>,
1506 C<df>,
1507 C<error_trace>,
1508 C<expand_wildcards>,
1509 C<from>,
1510 C<human>,
1511 C<ignore_unavailable>,
1512 C<lenient>,
1513 C<pipeline>,
1514 C<preference>,
1515 C<q>,
1516 C<refresh>,
1517 C<request_cache>,
1518 C<requests_per_second>,
1519 C<routing>,
1520 C<scroll>,
1521 C<scroll_size>,
1522 C<search_timeout>,
1523 C<search_type>,
1524 C<size>,
1525 C<slices>,
1526 C<sort>,
1527 C<stats>,
1528 C<terminate_after>,
1529 C<timeout>,
1530 C<version>,
1531 C<version_type>,
1532 C<wait_for_active_shards>,
1533 C<wait_for_completion>
1534  
1535 See the L<update_by_query docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html>
1536 for more information.
1537  
1538 =head2 C<update_by_query_rethrottle()>
1539  
1540 $response = $e->update_by_query_rethrottle(
1541 task_id => 'id' # required
1542 requests_per_second => num
1543 );
1544  
1545 The C<update_by_query_rethrottle()> API is used to dynamically update the throtting
1546 of an existing update-by-query request, identified by C<task_id>.
1547  
1548 Query string parameters:
1549 C<error_trace>,
1550 C<filter_path>,
1551 C<human>,
1552 C<requests_per_second>
1553  
1554 See the L<update-by-query-rethrottle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html>
1555 for more information.
1556  
1557 =head1 INDEXED SCRIPT METHODS
1558  
1559 Elasticsearch allows you to store scripts in the cluster state
1560 and reference them by id. The methods to manage indexed scripts are as follows:
1561  
1562 =head2 C<put_script()>
1563  
1564 $result = $e->put_script(
1565 id => 'id', # required
1566 context => $context, # optional
1567 body => { script } # required
1568 );
1569  
1570 The C<put_script()> method is used to store a script in the cluster state. For instance:
1571  
1572 $result = $e->put_scripts(
1573 id => 'hello_world',
1574 body => {
1575 script => {
1576 lang => 'painless',
1577 source => q(return "hello world")
1578 }
1579 }
1580 );
1581  
1582 Query string parameters:
1583 C<error_trace>,
1584 C<human>
1585  
1586 See the L<indexed scripts docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#_indexed_scripts> for more.
1587  
1588 =head2 C<get_script()>
1589  
1590 $script = $e->get_script(
1591 id => 'id', # required
1592 );
1593  
1594 Retrieve the indexed script from the cluster state.
1595  
1596 Query string parameters:
1597 C<error_trace>,
1598 C<human>,
1599 C<master_timeout>
1600  
1601 See the L<indexed scripts docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#_indexed_scripts> for more.
1602  
1603 =head2 C<delete_script()>
1604  
1605 $script = $e->delete_script(
1606 id => 'id', # required
1607 );
1608  
1609 Delete the indexed script from the cluster state.
1610  
1611 Query string parameters:
1612 C<error_trace>,
1613 C<human>,
1614 C<master_timeout>,
1615 C<timeout>
1616  
1617 See the L<indexed scripts docs|http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#_indexed_scripts> for more.
1618  
1619 =head2 C<scripts_painless_execute()>
1620  
1621 $result = $e->scripts_painless_execute(
1622 body => {...} # required
1623 );
1624  
1625 The Painless execute API allows an arbitrary script to be executed and a result to be returned.
1626  
1627 Query string parameters:
1628 C<error_trace>,
1629 C<filter_path>,
1630 C<human>
1631  
1632 See the L<painless execution docs|https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-execute-api.html> for more.
1633  
1634 =head1 AUTHOR
1635  
1636 Enrico Zimuel <enrico.zimuel@elastic.co>
1637  
1638 =head1 COPYRIGHT AND LICENSE
1639  
1640 This software is Copyright (c) 2021 by Elasticsearch BV.
1641  
1642 This is free software, licensed under:
1643  
1644 The Apache License, Version 2.0, January 2004
1645  
1646 =cut
1647  
1648 __END__