Skip to main content
Required ACL: settings This helper method iterates over the paginated API response from the Search for synonyms API operation and lets you run an aggregator function on every iteration. You can use this, for example, to retrieve all synonyms from your index.

Usage

using Algolia.Search.Clients;
using Algolia.Search.Models.Search;

var appID = "ALGOLIA_APPLICATION_ID";
var apiKey = "ALGOLIA_API_KEY";
var indexName = "ALGOLIA_INDEX_NAME";

var client = new SearchClient(appID, apiKey);

var results = await client.BrowseSynonymsAsync(indexName, new SearchSynonymsParams {});

results.ToList().ForEach(synonym => Console.WriteLine($"  - Synonym: {synonym.ObjectID}"));

Parameters

  • C#
  • Go
  • Java
  • JavaScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Scala
  • Swift
indexName
string
required
Index name from which to retrieve the synonyms.
searchSynonymsParams
SearchSynonymsParams
required
Parameters for the Search for synonyms request.
requestOptions
RequestOptions
Additional request options.
I