mongodb 建立索引总是说没有createindex 方法

index = self.xiaoMiQuanCollection.createIndex({"unique_charcter": 1, "name": 'hashed'}, {"unique": True})
res = self.xiaoMiQuanCollection.find(index)

TypeError: 'Collection' object is not callable. If you meant to call the 'createIndex' method on a 'Collection' object it is failing because no such method exists.

我写ensureIndex 也不对,求指教### 题目描述


慕神8447489
浏览 2537回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python