I really like the flexibility offered through ElasticSearch with respect to
Facets (i.e. choose to have facet filter values bound or not bound to
query). As with most ecommerce sites, we are initially returning "globally"
selected facets, and then as the user navigates via those facets, we
continue to show the "globally" selected facet filter values and do not
bind them to the filtered query, so that the customer can quickly and
easily navigate many different directions. However, what we would like to
do now is "grey out/disable" those facet filter values, which are no longer
reachable given the filtering the user has chosen. For example, if the
customer has clicked on a specific brand facet filter value, and that facet
click has removed some price range facet filters from contention, then we
would like to disable those selections.
I know we could implement some request/session logic to maintain collection
of initially provided facet filter values and then invoke "filtered"
queries to bind facets to the query and then do a compare between the two
to determine what was eliminated and disable accordingly, but I first
wanted to check with the group here to see if there is a more elegant
solution using ElasticSearch that others may have implemented to do this.