To highlight all attributes in search results, you can use the wildcard value * for attributesToHighlight.
Setting attributesToHighlight to ["*"] tells Algolia to apply highlighting to every attribute eligible for highlighting in the record.
Example:
{
"attributesToHighlight": ["*"]
}This behavior is documented in the attributesToHighlight usage guidelines and applies to all searchable attributes unless otherwise restricted by your index settings.
More information can be found inthis usage documentation for attributesToHighlight.