T.Okahara
T.Okahara

Reputation: 1234

Algolia highlighResult or snippetResult only what matches

If I search for "brown" I would like to have all or any of my results that contain "brown" within them only highlight that section.

Currently if I were to search "brown" my results appear like this (bold = highlighted)

brown
brownies

When I would like the result to be

brown
brownies

Any suggestions on how I could make this happen? I am currently using snippetResults and the object for brownies would say matchLevel: "full", value: "<em>brownies</em> when it is not actually a full match.

Thank you!

Upvotes: 2

Views: 194

Answers (1)

aseure
aseure

Reputation: 733

The default behaviour is actually to highlight only the matching part. To help you more on that, I'd need to have more informations like the name of your index and its configuration. Could you send us an email at [email protected], we would be happy to help.

Upvotes: 1

Related Questions