As per the title, I’m getting strange stats results when using a refinement widget.
Using latest instantsearch.js v2.2.0.
Strangely, the top most refinement item and bottom-most refinement item show the proper number. Everything in between produces erroneous results.
Here’s a basic Codepen to reproduce:
Click the top-most refinement item (2016) and the stats widget will match the count in the refinement, as expected.
Click the next refinement item (2015) and the stats widget provides a wrong number.
A quick search through Github Issues didn’t produce anything, so thought I’d start here in case it has something to do with my index itself and not Instantsearch.
A couple of other tidbits of info in case they’re helpful:
Clearing cache does not resolve, but it does change the erroneous values slightly. You can open up the pen in additional browser windows and receive different results for the same refinement.
The index contains 3m+ records. Last time I updated/synced the full dataset it showed an operations count greater than the total record count. I’m not too worried about the operations count (probably an error in my sync script), but thought I’d share in case something screwy is going on with the index’s metadata.
Issue can be reproduced in the Algolia dashboard