Hi have a nested field with many fields and when i am querying it,it is returning all the fields even if it matches one, my query is as follows
nested": {
"path": "rooms",
"query": {
"bool": {
"must": [
{
"range": {
"rooms.single_occupancy_rate":{
"lte" : budget
}
}
},
{
"range": {
"rooms.guest_count": {
"gte": 3
}
}
}
]
}
}
}
please tell me how to retrieve only matching fields