I need to search a products using advanced search with custom attributes programmatically. My advanced search works fine, i need to search product programmatically with our custom attributes.

I follow this link But magento 2 doesn't have these files vendor/magento/module-search/Model/ResourceModel/Query/Collection.php

Suggest me How to do this.

2 Answers 2


Find "Search criteria" section :)



Think observing the vendor\magento\module-catalog-search\Controller\Advanced\Result.php should give you enough hints to how Magento does it.

Here is a little article / snippet about it http://foggyline.net/magento-2-programmatically-search-product-using-advanced-search-engine/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.