Magento – use of getFacetedData() in Magento 2

collection;magento2

Can any please explain use of getFacetedData() is Magento 2 with collection

Best Answer

getFacetedData only exists in the product "fulltext" collection, i.e. for search results and category pages.

It returns information for the layered navigation, as returned by the search engine (MySQL, ElasticSearch, or custom implementation).

For each of these, it contains the number of results:

  • price ranges
  • categories
  • filterable attributes
Related Topic