英文:
Azure cosmosDB(mongoDB), how to disable the automatic indexing in a collection in GO lang or via Shell
问题
我尝试通过mongo shell和我的GO代码手动删除DocumentDBDefaultIndex,但它仍然存在。我不想保留那些默认索引,因为它们会占用不必要的空间;实际上,我只需要一些_id、unique和text索引。
英文:
I tried to delete the DocumentDBDefaultIndex manually through mongo shell and also through my GO code but it still exists. I don't want to have those default indexes lying around which would consume unnecessary space; I actually only need some _id, unique and text indexes.
答案1
得分: 2
似乎Mongo Wire Protocol不支持更改索引策略的功能。如@DavidMakogon所说,请参考文档Azure Cosmos DB如何索引数据?
在Azure门户上更改索引策略的设置,如下图所示,或使用REST API 替换集合
。
希望对您有所帮助。
英文:
It seems that mongo wire protocol does not support the feature of indexing policy change. As @DavidMakogon said, please refer to the document How does Azure Cosmos DB index data?
to change the settings of indexing policy on Azure portal as the figure below, or using REST API Replace a Collection
.
Hope it helps.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论