I am getting product ids from external product search system. I need them to be the result of search done through CatalogSearch.

I thought of adding a filter to searchCriteria in _renderFiltersBefore() function located in



$this->filterBuilder->setValue([1,2,24]); // <-- product ids

but it doesn't seem there's a filter that could select products by ids.

I have also found addIdFilter($productId, $exclude = false) function in
but can't find a way to make use of it in CatalogSearch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.