Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for exact term in an Algolia index

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.

like image 275
Matthias Dietrich Avatar asked Dec 19 '15 18:12

Matthias Dietrich


1 Answers

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.

like image 68
dcoates Avatar answered Oct 06 '22 05:10

dcoates