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?
Asked
Active
Viewed 1,360 times
6

Mark Tucker
- 434
- 5
- 13
1 Answers
14
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

Ali Ben Messaoud
- 11,690
- 8
- 54
- 87

simon.ro
- 2,984
- 2
- 22
- 36