A better strategy for this would be to create a docID based on the value of these three fields. For example, for this document -
{
"company" : "sony",
"size" : "10X",
"name" : "Kakhee pants",
"color" : "red"
}
Make docID as sony + Kakhee_pants + red And then select the size and color of the attribute array.
{
"company": "sony",
"name": "Kakhee pants",
"color": "red",
"attributes": [
{
"size": "10X",
"color": "red"
}
]
}
, , upsert
, , , .