Skip to content

Synonym Set upsert method mismatch with docs #51

@andrewjtait

Description

@andrewjtait

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions