首页 > 技术文章 > pymongo聚合搜索 'OperationFailure: unknown top level operator'错误

moneymaster 2021-06-10 03:58 原文

用聚合搜索,按照mongoDB官方的文档,使用$not和$regetMatch出现'OperationFailure: unknown top level operator'错误,找不到原因

解决:换一种搜索方式,$not换成$nor,$regetMatch换成re.compile

 

推荐阅读