Search for exact term in an Algolia index
Asked Answered
M

1

6

I want to filter an index by an exact value of an attribute. I wonder what possibilities Algolia offers for that.

Querying an index always results in a search for substrings, that means a search term abc will always match any object which attribute values contain abc. What I want to achieve is a search for abc that finds only abc as a value of an attribute (in this case I have specific attributes to search in).

One possibility I came up with was tagging, which doesn't seem to be the best way to think of.

Edit

I think I could also use facet filters. I thought about the different pros and cons and can't come up with arguments that places either one position above the other.

Matelot answered 19/12, 2015 at 18:27 Comment(0)
P
4

You're right with your edit that facet filters would be the way to go on this one. You'll get the exact match you're looking for and won't have to create a new attribute of _tags to use the tag filter.

Pardo answered 20/12, 2015 at 11:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.