Skip to main content
Required ACL: editSettings This operation is subject to indexing rate limits.

Usage

// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));

// Call the API
var response = await client.SaveSynonymsAsync(
  "<YOUR_INDEX_NAME>",
  new List<SynonymHit>
  {
    new SynonymHit
    {
      ObjectID = "id1",
      Type = Enum.Parse<SynonymType>("Synonym"),
      Synonyms = new List<string> { "car", "vehicule", "auto" },
    },
    new SynonymHit
    {
      ObjectID = "id2",
      Type = Enum.Parse<SynonymType>("Onewaysynonym"),
      Input = "iphone",
      Synonyms = new List<string> { "ephone", "aphone", "yphone" },
    },
  },
  true,
  true
);
// >LOG

See the full API reference

For more details about input parameters and response fields.
I