Finding the min and max value for a float/double field

Hi,

What would the best way to get the MAX/MIN values for a specific field in a
search?

For instance, I'm indexing products, and they have an amount field, and when
I search for anything, I want to get the MAX/MIN amount for all the results,
so I can show a slider where the user can filter again the results based on
a range [MIN..MAX] of the amount.

Example: I search for "iPhone", and I get 12456 results. I'd like to get
also which is the MIN and the MAX amount for those results; let's say it's
$200 and $900, respectively.

Thanks.

Hi Enrique

What would the best way to get the MAX/MIN values for a specific field
in a search?

clint

Thanks, everything's so easy in ES :slight_smile:

On Mon, Feb 14, 2011 at 4:23 PM, Clinton Gormley clinton@iannounce.co.ukwrote:

Hi Enrique

What would the best way to get the MAX/MIN values for a specific field
in a search?

Elasticsearch Platform — Find real-time answers at scale | Elastic

clint