Dynamic buckets ranges?

Hi all

I have a list a properties with zip code, square meter, number of rooms, sale price... in ES and with an input I want to build a query to get the optimal price range for a new property which depend of course of all the criteria. My aim is to get a minimal result (count) and the lower avg price based on equivalents in database.

I want to get if possible the optimal buckets range of criteria to get this avg lower price.

I don't want to make multi queries in order to get this price. Do you know if it's possible to build a query with new property as input and get in result the optimal buckets range as result?

For example the new property may be like that:

square meter : 150
number of rooms : 7
square meter of the land: 200
zip code: 59000
type: house

I want to query the database for all houses located at less 600 meter of the new property and make an analyse of the result in order to get the criteria to get the lower price possible. For example:

square meter between : 100 and 200
number of room between: 5 and 8
...

Thanks for your help on this

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.