Search...nonyms(3pm)

πŸ“¦
version 8.12 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 🌟


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