Let's say we have Incremented Value(ref) in the document which need to be incremented based on another field(shopId)
{
"ref": 12,
"shopId":1
},
{
"ref": 13,
"shopId":1
},
{
"ref": 1,
"shopId":2
},
{
"ref": 2,
"shopId":2
},
{
"ref": 14,
"shopId":1
}
What kind of approach can we have? ( the two properties are compound index)
Let's say we have Incremented Value(ref) in the document which need to be incremented based on another field(shopId)
{ "ref": 12, "shopId":1 }, { "ref": 13, "shopId":1 }, { "ref": 1, "shopId":2 }, { "ref": 2, "shopId":2 }, { "ref": 14, "shopId":1 }What kind of approach can we have? ( the two properties are compound index)