Separating filtering and search

I am using nextjs, firebase and algolia. I have list of products and product informations kept in firebase. I made the Firebase and Algolia connection. There is a pagination structure with 9 products on each page and ssr is required. Actually, I solved everything with Algolia, but client wanted me to change some things because instant filtering was not desired. they suggest me to use Algolia for search and use Firebase for filtering.

Can Algolia index be used to search for products and Firebase index separately for filtering? does this make sense?

You could separate the two, but when you have both search and the filtering powered by Algolia the results will be the most relevant and work the quickest.

The issue I could see popping up from this is that you’ll need to keep the two in sync with each other. In your code, when one bucket changes you’ll have to update the metadata available to the other bucket.

For example, when you filter by ‘Shoes’ using your Firebase index, you’ll also want to behind the scenes set the filter on the Algolia index as well so your results are relevant and make sense. Otherwise, one index will include items that shouldn’t be there.

It’s not recommended and will require some custom work, but you could do it, we probably won’t have any examples for this kind of use case but hopefully this helps!

Thank you very much for long answer and sorry for late reply