I have a collection with two documents:
{
"type":"s",
"disp":[
{
"quantity":1,
"date":20141109
},
{
"quantity":1,
"date":20141110
}
]
},
{
"type":"d",
"disp":[
{
"quantity":1,
"date":20141109
},
{
"quantity":0,
"date":20141110
}
]
}
I have to make a query (with one or more dates) to retrieve a document where all the given dates have a quantity greater than 0.
So if I search for a date 20141109 then I have to retrieve both but searching for 20141110 or both dates 20141109 and 20141110 should return only type "s" as it's the only with a quantity bigger than 0 for every dates used as parameters
P.S. sorry for my English, it's not my first language