Magento, out of stock products in search results

Wondered if anyone might be able to help
I’ve finding that my “simple products” in magento that are out of stock are still appearing in the search results. We still wish to leave our simple products visible on our site so that we sget traffic to our site from google. But is there a way to make sure these products don’t turn up in the search results in our onsite Alogolia results? We are on your extension ver 1.8.1 and magento v1

Hello @marshall,

the extension out of the box respects the global configuration for displaying products. So if you want to still display it, Algolia will index it and offer in on search.

What you can do is to write small piece of code to modify the search function by filters to not retrieve out of stock products. You can do it defining custom JS methods and modify the Algolia datasources. Here’s documentation: https://community.algolia.com/magento/doc/m1/frontend-events/

Would that work for you?