mongodb

update

'$set': {
"options":{
"A":"choice A stands for",
"B":"choice B stands for",
"C":"choice C stands for",
"D":"choice D stands for",
}
}

 

find

 $and:[{html:/答案/},{html:/回复/}]
$or:[{html:/答案/},{title:/测试/}]

find words contains both elements "text" and "here" or either of them:

db.things.find( { words: { $all: [ "text", "here" ] } } );

or

db.things.find( { words: { $in: [ "text", "here" ] } } );
posted @ 2013-04-02 15:14  邓维  阅读(144)  评论(0编辑  收藏  举报