Reputation: 434
In the response from a search
call, I get back a hits
array and each item in the array includes a _highlightResult
property. Is there any way to prevent that property from being returned in the search results?
Upvotes: 6
Views: 2042
Reputation: 3312
There's an option attributesToHighlight
.
You can use it as an index setting or specify it per search request in the params. By default, all searchable attributes will be highlighted, but if you explicitly set it to an empty array attributesToHighlight: []
, none will be highlighted.
Please see https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/?language=javascript
Upvotes: 15