I've noticed that the documented API for creating/updating synonym sets does not match the methods available on the Ruby client.
The documentation describes:
synonym_set = {
"items" => [
{
"id" => "coat-synonyms",
"synonyms" => ["blazer", "coat", "jacket"]
}
]
}
# Creates/updates a synonym set called `clothing-synonyms`
client.synonym_sets["clothing-synonyms"].upsert(synonym_set)
However the upsert method does not exist on the SynonymSet class, and is instead on the SynonymSets class.
I was going to submit a PR to update the documentation, however when comparing the clients in other languages they all seem to follow the pattern described in the docs. Therefore I wasn't sure if you would prefer to instead update the Ruby client to support the documented approach and be consistent with other languages? It doesn't mean the upsert method needs removing on the SynonymSets class, as the go client also has this method on both SynonymSets and SynonymSet.
I've noticed that the documented API for creating/updating synonym sets does not match the methods available on the Ruby client.
The documentation describes:
However the
upsertmethod does not exist on theSynonymSetclass, and is instead on theSynonymSetsclass.I was going to submit a PR to update the documentation, however when comparing the clients in other languages they all seem to follow the pattern described in the docs. Therefore I wasn't sure if you would prefer to instead update the Ruby client to support the documented approach and be consistent with other languages? It doesn't mean the
upsertmethod needs removing on theSynonymSetsclass, as the go client also has this method on bothSynonymSetsandSynonymSet.