Collection
Query\Collection
Magento\Search\Model\ResourceModel\Query\Collection
What it does
This collection class manages search query data in Magento 2, allowing developers to retrieve and filter search terms that customers have entered in the store's search box.
Use it when you need to work with popular searches, recent queries, or autocomplete suggestions, such as building custom search reports or displaying trending search terms on the frontend.
Public Methods
- setStoreId()
- getStoreId()
- setQueryFilter()
- setPopularQueryFilter()
- isTopSearchResult()
- setRecentQueryFilter()
- addStoreFilter()