Facet count includes duplicates with distinct = true

With distinct set to true, I see I have duplicates:

The total records are shown and the total hits are deduplicated.

But here is an unexpected behavior:

The facet count that does not reflect the deduplication.

Does distinct not work with faceting? I need both!

I would love to know if there is a solution to this, or if it has been acknowledged as a bug!

facetingAfterDistinct did the trick. It’s in the doc under faceting - maybe add a ref under distinct