我正在尝试搜索包含日语字符的名字和姓氏的集合。即使集合中有数据,以某种方式也不会返回任何结果。
这是我现在拥有的代码,不会产生任何结果。
rgx = re.compile(f".*ひらがな.*", re.IGNORECASE)
query = [
{
"$match": {
"$or": {
{"firstname": rgx},
{"lastname": rgx}
}
}
}
]
members = db.users.aggregate(query)
对此有任何想法吗?
DocumentDB实现了MongoDB v3.6 API。但是根据docs,cursor.collation()
仍然不被支持。