Filter posts out based on their category in a instantsearch page

Hello,

I built an instantsearch page with Algolia and everything works fine so far, but I would like to know if it’s possible to filter out posts based on their taxonomies when a search is made.
For example, when I search for a post, I would like to get only get ‘podcasts’, ‘videos’ and ‘audio’ from taxonomies.category

Thank you.

Hello @adren.holobut

In order to help you I would like to know which library and version are you using to integrate Algolia on your page?

Hello @iam4x, I am using Instantsearch libray, version 1.11.7.

Thank you.

Hello,

Sorry for the late answer, I was not available for the last week because of health issues.

That being said, you can use either use a menu widget (https://community.algolia.com/instantsearch.js/documentation/#menu) or a refinement list widget (https://community.algolia.com/instantsearch.js/documentation/#refinementlist) to filter/refine your results depending on a search attribute. In your case the taxonomies.category

Can you try to add on of the two widgets on your page and get back to me?

Thank you, Maxime.

Hello Maxime, I hope your health issues are solved.
Unfortunately, that’s not the solution I am looking for. What I really want is to exclude a post category from indexing or exclude it by default when the user searches. A solution like this would be alright, as well, but instead of excluding a post type, I need to exclude a post category. How to exclude pages from search results

Let me know if there is a solution for this. Thanks.