Searching in RefinementList for Label?

I have a list of values that are currently just identifier ID’s.

For example, a value may be -Kfasdfjk234ezZf4.
These ID’s are connected to a dynamic label in the sense that it could change.

I’m using transformItems to change the items to match their appropriate name, it works fine.

So while the value stored in Algolia is -Kfasdfjk234ezZf4, the label will be transformed into Peter's Team.

The works great but the issue is searching within that list.

Users aren’t going to search by some random ID, they are going to search for what the label will be.

I know that sffv is looking for values but is there a way for me to search on the labels?

Hi @peter4,

Where is the labels come from? Is it hard coded inside your front end application? If so the search for facet values feature will search directly inside the Algolia index not inside the list display by the widgets. It means you can’t search for your labels with InstantSearch. The engine doesn’t have any knowledge of the labels.

It depends a lot on your use case but (if feasible) it would be preferable to index the label directly rather than the identifier. You can then update the records each time the label change in the other system. That way you don’t have to use transformItems and you’ll be able to leverage the search for facet values feature.

Hope that helps!