Autocomplete from array attribute

Hello community,

I have a searchable attribute, which is an array with tags. I want that autocomplete shows single tags from those arrays if the input match - is it possible? What I can do now is just show the complete array. I thought about some data processing in the template but don’t know how.

Hello @aleksandr.epp,

You can perform a search on those arrays with the searchForFacetValues function.
Instead of target an index you will target a facet in your case it will be your tags.

Hope that helps, feel free to reach me if you have any question :slightly_smiling_face:

1 Like