Search...le::API(3pm)
π Search::Elasticsearch::Client::2_0::Role::API π
okay bestie, gather round, because this is the manual page for Search::Elasticsearch::Client::2_0::Role::API(3pm) β the little role that holds the receipts on every Elasticsearch API. it's giving backstage pass, fr fr. π
β¨ VERSION β¨
version 6.81 β that's the one, no cap π¦
πΈ DESCRIPTION πΈ
so like, all of the Elasticsearch APIs are defined in this role. every single one. it's the master doc, the blueprint, the β¨source materialβ¨.
and the example below? that's the definition for the "index()" in Search::Elasticsearch::Client::2_0::Direct method. look at her go:
'index' => {
body => { required => 1 },
doc => "docs-index_",
method => "POST",
parts => {
id => {},
index => { required => 1 },
type => { required => 1 }
},
paths => [
[ { id => 2, index => 0, type => 1 }, "{index}",
"{type}", "{id}"
],
[ { index => 0, type => 1 }, "{index}", "{type}" ],
],
qs => {
consistency => "enum",
filter_path => "list",
op_type => "enum",
parent => "string",
refresh => "boolean",
routing => "string",
timeout => "time",
timestamp => "time",
ttl => "time",
version => "number",
version_type => "enum",
},
},
she's structured, she's thorough, she ate π
and the point of all this? these definitions can be used by different Search::Elasticsearch::Role::Client implementations to provide distinct user interfaces. so like, same spec, different fits. main character energy across the board π
π«Ά METHODS π«Ά
π« "api()"
$defn = $api->api($name);
ngl, there's literally only one method in this whole class and it's "api()". she takes the name of the action and hands you back its definition. simple. iconic. periodt.
and heads up β 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 how the namespace rides in front like a little crown? yes. that's the vibe. π
π¦ SEE ALSO π¦
- Search::Elasticsearch::Role::API
- Search::Elasticsearch::Client::2_0::Direct
go read them, bestie, they're the friends of this page π
π AUTHOR π
Enrico Zimuel <enrico.zimuel@elastic.co> β legend behavior, honestly ππ
β COPYRIGHT AND LICENSE β
This software is Copyright (c) 2020 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
and that's the whole page, no crumbs left π every option, every path, every namespace β preserved exactly. don't come for me, i kept it all. π
mwah π bye bestie, go build something iconic π
perl v5.32.0 β 2020-11-25 β and this little page lives at Search::Elasticsearch::Client::2_0::Role::API(3pm), xoxo π§β¨
π¦ where this page comes from
- debian bookworm: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- debian trixie: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- ubuntu jammy: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- ubuntu noble: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- ubuntu resolute: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- ubuntu stonking: libsearch-elasticsearch-client-2-0-perl 6.81-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms