对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

Mongo.getReadPrefTagSet()(mongosh方法)

Mongo.getReadPrefTagSet()
返回:

为 连接对象设置的当前Mongo() 读取偏好(read preference) 标签集。

See Read Preference for an introduction to read preferences and tag sets in MongoDB. Use getReadPrefTagSet() to return the current read preference tag set, as in the following example:

db.getMongo().getReadPrefTagSet()

使用以下操作返回并打印当前读取偏好(read preference)标签集:

printjson(db.getMongo().getReadPrefTagSet());

此方法可用于以下环境中托管的部署:

  • MongoDB Atlas:用于云中 MongoDB 部署的完全托管服务
给本页内容打分

在此页面上