我已经使用文档示例中给出的标签字段配置了我的副本集:
{
"_id" : "rs0",
"version" : 2,
"members" : [
{
"_id" : 0,
"host" : "mongodb0.example.net:27017",
"tags" : {
"dc": "east",
"use": "production"
}
},
{
"_id" : 1,
"host" : "mongodb1.example.net:27017",
"tags" : {
"dc": "east",
"use": "reporting"
}
},
{
"_id" : 2,
"host" : "mongodb2.example.net:27017",
"tags" : {
"use": "production"
}
}
]
}
现在我的问题是,如果我发送带有“最近”、“primarypreferred”之类的读取问题的读取查询,它是否能够自动选择此标签,或者我应该将“dc”名称与我的查找查询一起传递。如果有人可以帮助我关于同样的。