Filter works on Instant Search; not on my index, why?

I’d like to add a filter to instantsearch.js such that the user’s results are filtered by a field. I’ve got this working with the instantsearch.js e-commerce demo, but when I apply it to my own index I don’t get a result. What am I missing?

Working example: Filter results on Brand = Amazon only displays Amazon products

image

Broken example: Filter results on First_Name = “Test” doesn’t return a result when there are users with name = “Test”

Hi @whitney,

Thanks for contacting Algolia!

I’ve included a link here to a live sandbox: https://codesandbox.io/s/zlwm7pr54m

Can you try your filter in here, using your AppID and Search API Key?

If it does not work, double check that your first_name attribute is set as an attributesForFaceting for filters to work.

If still running into a hurdle, feel free to Save and re-post the link to the updated sandbox.

Let us know how it goes!

1 Like

Thanks Ajay. Yes, I see. I need to add a filter to the field on the dashboard so that it’s recongized.

1 Like