-
afterDistinct
computes the facet counts of a specific attribute afterdistinct
has been applied. This only affects a single attribute. -
facetingAfterDistinct
affects all attributes and it's applied to all facets of the query. -
facetingAfterDistinct
can only be set at query time. You can’t add it as a default setting of the index, whileafterDistinct
can be set in yourattributesForFaceting
-
afterDistinct
should only be used on attributes that are shared between all records with a common distinct key. Using it on attributes that have different values within a distinct group will lead to missing facet values & inconsistent facet counts. - Only use
facetingAfterDistinct=true
if all the facets queried fit theafterDistinct
criterion of shared facet values within each group. - It may be advisable to hide facet counts of facets not using
afterDistinct
to avoid inconsistent counts across facets (some counting groups & others counting individual records)