Log in
Model

SuggestedQueries

Magento\AdvancedSearch\Model\SuggestedQueries

What it does

This class acts as a factory/proxy for retrieving search query suggestions based on the currently configured search engine (like Elasticsearch or OpenSearch).

It dynamically loads the appropriate suggestion provider for the active search engine and delegates calls to get suggested queries and check if result counts should be displayed.

Developers use this when implementing search autocomplete or 'did you mean' features that need to work across different search engines.

Public Methods

  • isResultsCountEnabled()
  • getItems()