重建索引reIndex

pymongo代码

mongoDb.command({"reIndex": "gameShortLink"})

mongo shell

db.gameShortLink_20210816.reIndex()

举例:

mongo_shell_reindex_1

mongo_shell_reindex_2

官网文档:

create_index collection – Collection level operations — PyMongo 3.12.0 documentation

results matching ""

    No results matching ""