Skip to main content
The snippetEllipsisText parameter defines the string inserted at the end of a truncated snippet. This applies to attributes defined in attributesToSnippet, and appears in the _snippetResult field of search results.

Examples

Current API clients

Set default snippet ellipsis text

var response = await client.SetSettingsAsync(
  "ALGOLIA_INDEX_NAME",
  new IndexSettings { SnippetEllipsisText = "…" }
);
var response = await client.SearchSingleIndexAsync<Hit>(
  "ALGOLIA_INDEX_NAME",
  new SearchParams(new SearchParamsObject { Query = "query", SnippetEllipsisText = "" })
);

Set default snippet ellipsis text

IndexSettings settings = new IndexSettings()
settings.SnippetEllipsisText = "...";

index.SetSettings(settings);

Override default snippet ellipsis text for the current search

index.Search(new Query("query")
{
    SnippetEllipsisText = ""
});
I