Defining ranges for priceRanges widget

How are price ranges defined? Looks like they are computed on the fly, based on results, but the algo is quite obscure.
Is it possible to define a fixed set of ranges once and for all?
I am actually using the range widget to sort out responses by date ranges!


Hi @henri.gouraud, indeed the price range ranges are computed on the fly for now.

Which InstantSearch flavour are you using today? Let me know so I can guide you into how to create a fixed set of prices.

I am using the “latest” off from your web site

link rel=“stylesheet” href=“


Hi @henri.gouraud, here’s a proof of concept of a custom price range widget with fixed ranges:

Let me know how it goes.

Looks fine, but I also see value at defining the ranges on the fly based on hit statistics (I assume).
How about displaying the number of hits per range? That would be very valuable!!

Thanks for your support,

You’re definitely right this would be a good addition. But today Algolia has no way to do so, as for integers we only provide statistics and not distribution.

Thanks for the feedback, we’ll take it into account when deciding of new features.