I have collection having below data structure
{
"Shop": "123",
"date": "28-05-2015",
"Points": {
"a": "1",
"b": "2",
"c": "3"
}
}
Here shop and date has unique indexes and no id is there except _id , So if I want to update only b's value and if the record matching(based on account and date ) is not there than should create new record having same structure with b's value. The most important part is its bulk operation means I need to create/update record per day for all the shops and these record will create for every shop per day .So while update a point if record is not there than create it else update the existing record .I am using spring . I tried using update with upsert true but it's not updating rather creating a new record with only updated value .And what is best way to update multiple shop with given updated points .