Algolia Remove _highlightResult from search results
Asked Answered
S

1

6

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?

Sciatica answered 7/10, 2019 at 18:24 Comment(0)
B
15

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

Basalt answered 9/10, 2019 at 18:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.