mongodb 对非string类型的数据进行模糊搜索
db.t_user_info.find({
"$expr": {
"$regexMatch": {
"input": {"$toString": "$_id"},
"regex": /10268/
}
}
})
mongodb 对非string类型的数据进行模糊搜索
db.t_user_info.find({
"$expr": {
"$regexMatch": {
"input": {"$toString": "$_id"},
"regex": /10268/
}
}
})