All bool queries are evaluated on a single document.
So if you have an index like this
Products= {
Fields: { Name: string; Value: int; }[];
}
And you want to find products with field “Price” between 10 and 20, and field “Discount” between 0 and 5, you can use the following query
bool: {
must: [
{nested: { //nested query to find products with price from 10 to 20},
{nested: { //nested query to find products with Discount from 0 to 5}
]
}
It looks quite hard to follow.