Search...ct::SQL(3pm)
π Search::Elasticsearch::Client::7_0::Direct::SQL π
okay bestie, sit down, hydrate, and let me tell you about this lil Perl module. it lives in the User Contributed Perl Documentation section of your man pages (the 3pm girlies know π
), and it's the plugin that brings SQL to Search::Elasticsearch 7.x. yes, actual SQL. in your Elasticsearch. iconic behavior fr fr.
β¨ VERSION β¨
version 7.715 β that's the one, that's her π
πΈ SYNOPSIS πΈ
the whole vibe in one line:
my $response = $es->sql->query( body => {...} )
that's it. that's the group chat. π¦
π§ DESCRIPTION π§
so the way this works is: this class extends the Search::Elasticsearch client by handing it an "sql" namespace, which is what makes all the SQL APIs go brrr π₯.
the official SQL APIs live over here: <https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
and the full, no-skipped-details documentation for the whole SQL feature? right here bestie: <https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html>
π GENERAL METHODS π
π query()
$response = $es->sql->query(
body => {...} # required
)
query()</purpose> executes an SQL query and hands you back the results. it's giving "just run my SQL, queen" β¨
query string parameters you can pass:
"error_trace""filter_path""format""human"
want the tea on all of them? see the query docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
π¦ translate()
$response = $es->sql->translate(
body => {...} # required
)
translate() takes an SQL query and gives you back the query DSL that would get executed. it's the translator of the friend group, no cap π«Ά
query string parameters:
"error_trace""filter_path""human"
more deets in the translate docs: <https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html>
π clear_cursor()
$response = $es->sql->clear_cursor(
body => {...} # required
)
clear_cursor() cleans up an ongoing scroll request. the responsible bestie who closes the tabs she opened ππ
query string parameters:
"error_trace""filter_path""human"
see the query docs for more: <https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
π AUTHOR π
Enrico Zimuel <enrico.zimuel@elastic.co> β thank you king π
β COPYRIGHT AND LICENSE β
This software is Copyright (c) 2021 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
ok so legally speaking this is free software, and the license it ships under is the Apache License, Version 2.0, January 2004. keep that receipt bestie π§Ύ
aaaand that's the page!! π perl v5.32.1 energy, dated 2021-10-23, and honestly? she ate. mwah π go write some SQL in your Elasticsearch, bestie, you got this π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: libsearch-elasticsearch-perl 7.715-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms