在documentdb中使用日语字符串进行搜索

时间:2020-03-17 06:47:00

标签: python pymongo aws-documentdb

我正在尝试搜索包含日语字符的名字和姓氏的集合。即使集合中有数据,以某种方式也不会返回任何结果。

这是我现在拥有的代码,不会产生任何结果。

rgx = re.compile(f".*ひらがな.*", re.IGNORECASE)

query = [
    {
        "$match": {
            "$or": {
                {"firstname": rgx},
                {"lastname": rgx}
            }
        }
    }
]

members = db.users.aggregate(query)

对此有任何想法吗?

DocumentDB实现了MongoDB v3.6 API。但是根据docscursor.collation()仍然不被支持。

0 个答案:

没有答案