NAME
Search::Elasticsearch::Role::API::2_0 - This class contains the spec for the Elasticsearch APIs
VERSION
version 2.03
DESCRIPTION
All of the Elasticsearch APIs are defined in this role. The example given below is the definition for the "index()" in Search::Elasticsearch::Client::2_0::Direct method:
'index' => {
body => {
desc => 'The document',
required => 1
},
doc => '/api/index_/',
method => 'PUT',
path => '{index}/{type}/{id|blank}',
qs => [
'consistency', 'op_type', 'parent', 'percolate',
'refresh', 'routing', 'timeout',
'timestamp', 'ttl', 'version', 'version_type'
],
},
These definitions can be used by different Search::Elasticsearch::Role::Client implementations to provide distinct user interfaces.
METHODS
api()
$defn = $api->api($name);
The only method in this class is the api()
method which takes the name of the action and returns its definition. Actions in the indices
or cluster
namespace use the namespace as a prefix, eg:
$defn = $e->api('indices.create');
$defn = $e->api('cluster.node_stats');
SEE ALSO
AUTHOR
Clinton Gormley <drtech@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2016 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
COPYRIGHT
This software is copyright (c) 2019, Anthony Lucas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.