Problems with min max values on Range Slider

I have an application using instantsearch.js where the hits are sorted by unix timestamps associated with each entry in the database. It has a range slider which is used to filter the hits by a date range. The application worked great until about a month ago when the max and min on the range slider did not reflect the max and min inside the database.

I recreated the issue on a jsfiddle here showing the range slider min max values as off:

Issue looks similar to this user:

But I didn’t see any resolution to that topic.

Any help is appreciated.

Hi there,

Thank you for the report on that issue, and the jsfiddle. In your example, the min and max values returned by the engine were wrong. When the setting “maxValuesPerFacets” is set to a small number, the computation of those stats is invalid.
We were able to find the problem in the codebase and a fix will be deployed real soon. I’ll keep you informed.


EDIT: The fix is now deployed and the main issue should be resolved.
However, I must warn you that facets stats are computed with a sample of a maximum of 1000 facets. You may still experience a little shift between the real min/max of your facets and those used in with the slider because of this approximation. Algolia was designed for speed rather than exhaustivity and this min/max range calculation is a result of that design.


thank you for your assistance!