Field Stats

The stats.field parameter allows you to display the maximum and minimum values of any numeric field in your data set for a user query. With this parameter, you can get all the documents matching a query and display the minimum and maximum values of specific attributes such as price, sale_price, length, width, reviews, and so on.


Price range element with maximum and minimum values

Note: This parameter is supported for single-valued numeric attributes only.


"response": ...
"facet_counts:" ...

Use case

The stats.field parameter can be used to display the price range (max-min) in the UI as a price slider. When the user performs a search query, the maximum and minimum price of the queried product is displayed with stats.field. This parameter can also be used for other numeric attributes such as review, length, width, and so on.