1Search::Elasticsearch::UCsleirenCto:n:tS6re_ia0br:uc:thRe:od:lEePl:ea:rsAltPiIDc(os3ce)uamrecnht:a:tCiloinent::6_0::Role::API(3)
2
3
4
6 Search::Elasticsearch::Client::6_0::Role::API - This class contains the
7 spec for the Elasticsearch APIs
8
10 version 6.00
11
13 All of the Elasticsearch APIs are defined in this role. The example
14 given below is the definition for the "index()" in
15 Search::Elasticsearch::Client::6_0::Direct method:
16
17 'index' => {
18 body => { required => 1 },
19 doc => "docs-index_",
20 method => "POST",
21 parts => {
22 id => {},
23 index => { required => 1 },
24 type => { required => 1 }
25 },
26 paths => [
27 [ { id => 2, index => 0, type => 1 }, "{index}",
28 "{type}", "{id}"
29 ],
30 [ { index => 0, type => 1 }, "{index}", "{type}" ],
31 ],
32 qs => {
33 filter_path => "list",
34 op_type => "enum",
35 parent => "string",
36 pipeline => "string",
37 refresh => "enum",
38 routing => "string",
39 timeout => "time",
40 timestamp => "time",
41 ttl => "time",
42 version => "number",
43 version_type => "enum",
44 wait_for_active_shards => "string",
45 },
46 },
47
48 These definitions can be used by different
49 Search::Elasticsearch::Role::Client implementations to provide distinct
50 user interfaces.
51
53 "api()"
54 $defn = $api->api($name);
55
56 The only method in this class is the "api()" method which takes the
57 name of the action and returns its definition. Actions in the
58 "indices" or "cluster" namespace use the namespace as a prefix, eg:
59
60 $defn = $e->api('indices.create');
61 $defn = $e->api('cluster.node_stats');
62
64 · Search::Elasticsearch::Role::API
65
66 · Search::Elasticsearch::Client::6_0::Direct
67
69 Clinton Gormley <drtech@cpan.org>
70
72 This software is Copyright (c) 2017 by Elasticsearch BV.
73
74 This is free software, licensed under:
75
76 The Apache License, Version 2.0, January 2004
77
78
79
80perl v5.30.1 Sear2c0h2:0:-E0l1a-s3t0icsearch::Client::6_0::Role::API(3)