your domain model has a field called " Document Type", this field is single-valued, it describes the mime-type of your document
when faceting on such field, you would like to see stats over the result set with the counts:
what happens if you select one facet? your result set is reduced
this is what you get for the counts:
you lose the ability to navigate fully the result set, but you get accurate counts, not incorrect
Scope of this ticket
Ideal solution (Tag & Exclusion)
Scope of this ticket is to implement in Elasticsearch the Tag & Exclusion feature.
It is supported by Alfresco through the following parameters in a filter query:
The parameters for the filterQueries element are:
The filter query expression. For multi-select facets, selected facets must be ordered together.
The tags used exclude the filters from facet evaluation for multi-select facet support.
The tags are flattened in the same SearchParameters :
Some potential material to fully understand the problem:
Solution In Elasticsearch
there is no easy support for tag & exclusion in Elasticsearch.
Similar behaviour can be achieved using filters in aggregations and PostFilters.
The ticket has been created after a first analysis and implementation, which revealed the need of a further investigation. In the meantime, here’s the code snippet where we managed the tag exclusions (within ElasticsearchQueryExecutor):