logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Search::Elasticsearch::Client::7_0::Role::API - This class contains the spec for the Elasticsearch APIs

Author

       Enrico Zimuel <enrico.zimuel@elastic.co>

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::7_0::Direct method:

           'index' => {
               body   => { required => 1 },
               doc    => "docs-index_",
               method => "POST",
               parts  => { id => {}, index => {}, type => {} },
               paths  => [
                   [   { id => 2, index => 0, type => 1 }, "{index}",
                       "{type}",                           "{id}"
                   ],
                   [ { id    => 2, index => 0 }, "{index}", "_doc", "{id}" ],
                   [ { index => 0, type  => 1 }, "{index}", "{type}" ],
                   [ { index => 0 }, "{index}", "_doc" ],
               ],
               qs => {
                   error_trace            => "boolean",
                   filter_path            => "list",
                   human                  => "boolean",
                   if_primary_term        => "number",
                   if_seq_no              => "number",
                   op_type                => "enum",
                   pipeline               => "string",
                   refresh                => "enum",
                   require_alias          => "boolean",
                   routing                => "string",
                   timeout                => "time",
                   version                => "number",
                   version_type           => "enum",
                   wait_for_active_shards => "string",
               },
           }

       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');

Name

       Search::Elasticsearch::Client::7_0::Role::API - This class contains the spec for the Elasticsearch APIs

See Also

       •   Search::Elasticsearch::Role::API

       •   Search::Elasticsearch::Client::7_0::Direct

Version

       version 7.715

See Also