我知道 mongoDB 中的通配符文本索引可以使用以下命令在 shell 中创建:
db.collection.createIndex( { "$**": "text" } )
Run Code Online (Sandbox Code Playgroud)
并在 pymongo 中创建索引:
db[COLLECTION].create_index(index_name, index)
Run Code Online (Sandbox Code Playgroud)
我不知道如何在 pymongo 中创建通配符索引。有人可以帮忙吗?