Hello,
i'm querying an aggregation for the minimum and maximum price in an index, like this:
"aggregations": {
"PriceMin": {
"min": {"field": "PriceProduct"}
},
"PriceMax": {
"max": {"field": "PriceProduct"}
}
}
However, i'd like to get the corresponding documents, i.e. the document that contains the min price, and also the one that contains the max price. If several documents apply it doesn't matter if i get all of them or just a single one.
Is there a good solution for that?