1.查詢時間範圍,且模糊匹配message列中含“鋒”字符串的記錄
db.server.find(
{
"time":{"$gt":ISODate("2023-01-05T11:36:50+08:00"),"$lt":ISODate("2023-01-06T00:00:00+08:00")},
"message":/鋒/
}
)
.projection({})
.sort({time:-1})