For each of the bulk operations documentation appears
that "filter" in wrapping the "find"...
For Example:
{
:update_one => {
:filter => { :find => { :x => 1 }},
:update => { '$set' => { :x => 2 } },
:upsert => true } # upsert is optional and defaults to false
}
which insert produces that "find" is written as part of the document
I think that the right way should be this one
{
:update_one => {
:filter => { :x => 1 },
:update => { '$set' => { :x => 2 } },
:upsert => true } # upsert is optional and defaults to false
}
I hope it helps
- duplicates
-
RUBY-1035 Bulk Operations incorrect format
- Closed