I have a collection of documents that goes like this:
{
name: "Whatever 1".
distances: [
{name: "first distance", distance: 3000},
{name: "another distance", distance: 8000},
]
},
{
name: "Whatever 2".
distances: []
},
{
name: "Whatever 3".
distances: [
{name: null, distance: 6000},
]
},
{
name: "Whatever 4".
distances: [
{name: "hello", distance: 100000},
]
},
I need to get all the documents that contains a distance in a given range.
Example: If I query for distance greater than 5000 and smaller than 9000, I want to get documents "Whatever 1" and "Whatever 3"
How can I do this?