I have this document model below. I want to query by attributes with name and value (I know the name and value of attribute eg. {"name": "Renk", "value": "Kirmizi"}
). All I need is the document. I dont need index of variant or attribute, just document's itself. My purpose is not to get attributes or variants. I am querying across all documents. I hope you don't understand me wrong
{
"_id" : ObjectId("5febdbf5d71b7ca4eef06cc5"),
"variants" : [
{
"id" : "xtb2E3PVNitmh5xhuRAFNd",
"attributes" : [
{
"name" : "Renk",
"value" : "Kirmizi"
},
{
"name" : "Beden",
"value" : "36"
},
{
"name" : "Yaka Tipi",
"value" : "V Yaka"
}
]
},
{
"id" : "aP6CDPsgVLxTLgY5D6bTm9",
"attributes" : [
{
"name" : "Renk",
"value" : "Kirmizi"
},
{
"name" : "Beden",
"value" : "38"
},
{
"name" : "Yaka Tipi",
"value" : "V Yaka"
}
]
},
{
"id" : "b3mLCJXe6ae8HhNAY8dCPW",
"attributes" : [
{
"name" : "Renk",
"value" : "Mavi"
},
{
"name" : "Beden",
"value" : "38"
},
{
"name" : "Yaka Tipi",
"value" : "V Yaka"
}
]
},
{
"id" : "hYrANxJTbXmEYDUjtFpEKT",
"attributes" : [
{
"name" : "Renk",
"value" : "Mavi"
},
{
"name" : "Beden",
"value" : "36"
},
{
"name" : "Yaka Tipi",
"value" : "V Yaka"
}
]
}
],
"updatedDate" : NumberLong(1609292789)
}
Any ideas? Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…