How to fix cached search and apply customer/product filters in Debut theme?

I am using Debut theme which has a search feature in the header. This appears to use ajax or other web calls. I have two questions.

The search appears to be cached, so if I edit or delete products they still appear in a search. Haw can I flush the cache?

I have implemented customer/product tags to display different products/prices to retail and wholesale customers and generally this works well, however I cannot find the code that provides the search results, so cannot apply the filters I require which means that my retail customers can see wholesale products in their searches. Any ideas how to fix this? I have seen posts that refer to an ajax javascript file in the assets folder but I do not seem to have this.

Hello @StuartE

You can try the Merchandising tool in the Collection Filter & Search Bar to show the products by tag for specific customer groups.

I accomplished this by tweaking the PredictiveSearchComponent.prototype code in theme.js.

I was able to inspect the products returned in the search and throw out ones that did not match the sales-channel of my user.