Search...ct::SQL(3pm)
πΈ Search::Elasticsearch::Client::8_0::Direct::SQL β the 3pm manual page, but make it cute πΈ
okay bestie, welcome to the User Contributed Perl Documentation section, we're doing SQL stuff today and it's gonna be iconic π
β¨ NAME β¨
Search::Elasticsearch::Client::8_0::Direct::SQL β it's a plugin that brings the SQL to your Search::Elasticsearch 8.x, no cap π«Ά
π VERSION π
version 8.12 β that's the one, periodt.
π SYNOPSIS π
my $response = $es->sql->query( body => {...} )
that's it, that's the whole vibe check. look at her go β¨
π¦ DESCRIPTION π¦
so basically this class extends the Search::Elasticsearch client with a whole "sql" namespace, and that namespace exists to support the SQL APIs β you can find those over at:
<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
and if you want the full full documentation for the SQL feature (the whole meal, not just the snack), it lives right here:
<https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-sql.html>
go read it, i'll wait π
π GENERAL METHODS π
β query()
$response = $es->sql->query(
body => {...} # required
)
the query() method executes an SQL query and hands you back the results. like, you ask, it answers, main character energy fr fr.
query string parameters you can pass:
"error_trace""filter_path""format""human"
want the deets? the query docs are right here, go off:
<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
π§ translate()
$response = $es->sql->translate(
body => {...} # required
)
the translate() method takes an SQL query and gives you back the query DSL that would actually get executed. it's giving translator, it's giving "here's what you really meant" π
query string parameters:
"error_trace""filter_path""human"
the translate docs are over here if you're nosy (affectionate):
<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-translate.html>
π«Ά clear_cursor()
$response = $es->sql->clear_cursor(
body => {...} # required
)
the clear_cursor() method cleans up an ongoing scroll request. tidy queen behaviour, we love to see it β¨
query string parameters:
"error_trace""filter_path""human"
and yep, the docs for this one are the query docs (same link as query(), that's just how it is bestie):
<https://www.elastic.co/guide/en/elasticsearch/reference/current/sql-rest.html>
π AUTHOR π
Enrico Zimuel <enrico.zimuel@elastic.co> β thank you for your service π«‘
πΈ COPYRIGHT AND LICENSE πΈ
This software is Copyright (c) 2024 by Elasticsearch BV.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
and that's a wrap!! this page was served up by perl v5.38.2 on 2024-02-04, mwah π stay slaying, bestie, and remember: read your docs before you ship π₯
π¦ where this page comes from
- debian trixie: libsearch-elasticsearch-perl 8.12-1 Β· Apache-2.0
- ubuntu noble: libsearch-elasticsearch-perl 8.12-1 Β· Apache-2.0
- ubuntu resolute: libsearch-elasticsearch-perl 8.12-1 Β· Apache-2.0
- ubuntu stonking: libsearch-elasticsearch-perl 8.12-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms