,"tags":["mongodb","python","pymongo"],"date":datetime.datetime.utcnow()}
In [132]: posts=db.posts
In...': datetime.datetime(2015, 3, 19, 14, 7, 14, 572000),
u'tags': [u'mongodb', u'python', u'pymongo'],... u'author': u'Mike',
u'date': datetime.datetime(2015, 3, 19, 14, 7, 14, 572000),
u'tags': [u'mongodb...2
10.范围查询
In [183]: d=datetime.datetime(2009,11,12,12)
In [184]: for post in posts.find({"date":{"$..., u'_id': ObjectId('550b87d47a50907021e3473b'), u'author': u'Mike'}
11.索引
使用索引可以加快查询速度,缩小查询范围。