I'm new with Magento2, I have a problem trying to add a new filter to the search module.
I created an attribute that names: "flag" of type "text field", that will be invisible in storefront.
I have 3 products:
name | description | flag
Product1 | Description1 | 1
Product2 | Description2 | 1
Product3 | Description3 | 0
When I type in the search box "product", by default Magento2 returns all the products, because all matches with the search, what I want is add a filter to the search, that only returns the products with flag = 1, so it will returns only the product 1 and 2.
I don't know what is the exactly block or model that I must override.