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?
Algolia Remove _highlightResult from search results
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
© 2022 - 2024 — McMap. All rights reserved.