在mongodb记录是这样的
{ "_id" : ObjectId("5191fc1206610430cd000004"), "ancestry" : null, "name" : "root" }
{ "_id" : ObjectId("5191fc1306610430cd000005"), "ancestry" : null, "name" : "root1"}
{ "_id" : ObjectId("5191fc2706610430cd000006"), "ancestry" : null, "name" : "root2"}
{ "_id" : ObjectId("5191fc2806610430cd000007"), "ancestry" : null, "name" : "root3"}
我想改变这样的记录顺序
{ "_id" : ObjectId("5191fc2706610430cd000006"), "ancestry" : null, "name" : "root2"}
{ "_id" : ObjectId("5191fc1206610430cd000004"), "ancestry" : null, "name" : "root" }
{ "_id" : ObjectId("5191fc1306610430cd000005"), "ancestry" : null, "name" : "root1"}
{ "_id" : ObjectId("5191fc2806610430cd000007"), "ancestry" : null, "name" : "root3"}
我有以下信息节点要移动
{ "_id" : ObjectId("5191fc2706610430cd000006"), "ancestry" : null, "name" : "root2"}
在哪个节点之前移动
{ "_id" : ObjectId("5191fc1206610430cd000004"), "ancestry" : null, "name" : "root" }
我怎样才能做到这一点??