Facet count includes duplicates

I am working on a way to remove duplicates (actually, to prevent them being added) but until then, and for anyone facing the same problems, I would like to share the following.

First, I guess I have duplicates when I open my dashboard and see the results of an empty search:

The total records are shown and the total hits are deduplicated. I do think it would be nice to have a “remove duplicates” function - because who needs the duplicates, right? - but that’s another story.

Here, however, is what looks like a bug:

It looks like the facet count (that I must show to my users) does not reflect the deduplication.

On the positive side, it helps point me to the source of the duplicates :slight_smile: