Skip to main content

Options

true
Only items that at least partialy matched are highlighted and snippeted.
false
All items are highlighted and snippeted.

Examples

Set default value

Current API clients

var response = await client.SetSettingsAsync(
  "ALGOLIA_INDEX_NAME",
  new IndexSettings { RestrictHighlightAndSnippetArrays = true }
);
IndexSettings settings = new IndexSettings()
settings.RestrictHighlightAndSnippetArrays = true;

index.SetSettings(settings);

Current API clients

var response = await client.SearchSingleIndexAsync<Hit>(
  "ALGOLIA_INDEX_NAME",
  new SearchParams(
    new SearchParamsObject { Query = "query", RestrictHighlightAndSnippetArrays = false }
  )
);
index.Search(new Query("query")
{
    RestrictHighlightAndSnippetArrays = false
});