I am using App Search via a manual API integration on Elastic Stack 7.8.0.
I understand how to use filter and facets to narrow down the focus of any search query, but how do I get a list of filters/facets that are contextually relevant only to the current search?
For example, let's say I sell thousands of shoes in a variety of 100 colours. When the user searches for the term sneaker, the search query returns 100 products, and all of them just so happen to be in only the colours black, white and orange.
In designing my interface to allow users to filter the search results (which are paginated to 20 products at a time), it doesn't make any sense to show a list of 100 colour options - I only want to show the 3 colours that are contextually relevant to the search term they are currently on.
How do I get the list of those three colours that apply to the current search?
This seems quite basic, but yet I cannot seem to find the reference on how to do this. Please help!