How can I see the list of facets in the search response itself

I am trying to use the search API to get the search results. I see the hits in the response, but the applicable facets are not returning along with the response. How can i get those?

Hi @tina.oswal

The current state of the facets is not reflected in the search results – you’d need to check the UI state for that.

You can also retrieve facets values and their corresponding record counts by querying against them directly:

index.search('query', {
  facets: ['*']
});