Search...nonyms(3pm)
π Search::Elasticsearch::Client::8_0::Direct::Synonyms π
okay bestie, welcome to the User Contributed Perl Documentation corner of the internet, where we're talking about the Synonyms module for the Elasticsearch client. this is version 8.12 btw, so like, make sure you're on the right one β¨
πΈ NAME πΈ
Search::Elasticsearch::Client::8_0::Direct::Synonyms β the synonyms management API provides a convenient way π«Ά
no fr that's literally the whole line, the sentence just ends there. it's giving cliffhanger energy but okay we move π
π¦ DESCRIPTION π¦
the full documentation for the Synonyms API is available here, and you should absolutely go read it:
<https://www.elastic.co/guide/en/elasticsearch/reference/current/synonyms-apis.html>
π FOLLOW METHODS π
β¨ follow() β¨
okay so here's the whole vibe, the main character moment, the code:
my $response = $es->synonyms->put_synonym(
'id' => 'my-synonyms-set',
'body' => {
synonyms_set' => [
{
'id' => 'test-1',
'synonyms' => 'hello, hi'
},
{
'synonyms' => 'bye, goodbye'
},
{
'id' => 'test-2',
'synonyms' => 'test => check'
},
]
}
);
like look at that. 'id' => 'my-synonyms-set', a whole synonyms_set array, 'hello, hi', 'bye, goodbye', 'test => check' β it's all there, it's all slaying π
heads up, that synonyms_set' in the source has a lil stray apostrophe on it. not me fixing it, not me touching it, we copy it character for character because that's the rule and the rule is sacred, no cap π§
and if you want the β¨loreβ¨, an introduction to synonyms in Elasticsearch is available right here:
<https://www.elastic.co/blog/update-synonyms-elasticsearch-introducing-synonyms-api>
π AUTHOR π
Enrico Zimuel <enrico.zimuel@elastic.co>
we love a named author. iconic. giving credit where credit is due, periodt π
π 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
free software bestie!! the Apache License, Version 2.0, January 2004, we love to see it π
and that's a wrap on our little journey, mwah π this page was brought to you by perl v5.38.2, dated 2024-02-04, and yes the manpage footer really did abbreviate the module name to Search...nonyms(3pm) because the terminal column budget said "not today" π stay hydrated, read your docs, bye bye π¦πΈ
π¦ 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