我使用专用的IBM cloudant数据库:
当我通过Cloudant查询检索值时,有时我会使用相同的_id
和_rev
获得多个结果。
我认为_id
和_rev
是唯一值。
我发布以下内容
"selector": {
"$and": [
{
"v": {
"$eq": 1932
}
},
{
"p": {
"$eq": "#204000102"
}
},
{
"t": {
"$lt": 1460980793,
"$gte": 1460980693
}
}
]
},
"fields": [
"_id",
"_rev",
"v",
"p",
"t",
"m",
"w"
],
"limit": 200
}
到此网址:https://user_id-bluemix.cloudant.com/status/_find
当我查看回复时,我看到_id
8873c90f5dbd58c58e1a7d3b9d306d09
使用相同的_id
和_rev
返回了两次。
响应:
{
"docs": [
{
"_id": "9d13cffbcba60d15eeb703d0f449004d",
"_rev": "2-41e4a578dda0e3a40cb244f13f07d842",
"v": "1932",
"p": "#204000102",
"t": 1460980698,
"m": 995,
"w": true
},
{
"_id": "758ec066454846301bf2a8362fd815e4",
"_rev": "2-87c95fb7b043bb8d59740b9777e86bbe",
"v": "1932",
"p": "#204000102",
"t": 1460980764,
"m": 994,
"w": true
},
{
"_id": "8873c90f5dbd58c58e1a7d3b9d306d09",
"_rev": "2-d979563cf6a6088dbdff64e95da14b96",
"v": "1932",
"p": "#204000102",
"t": 1460980693,
"m": 994,
"w": true
},
{
"_id": "758ec066454846301bf2a8362fd815e4",
"_rev": "2-87c95fb7b043bb8d59740b9777e86bbe",
"v": "1932",
"p": "#204000102",
"t": 1460980764,
"m": 994,
"w": true
},
{
"_id": "8873c90f5dbd58c58e1a7d3b9d306d09",
"_rev": "2-d979563cf6a6088dbdff64e95da14b96",
"v": "1932",
"p": "#204000102",
"t": 1460980693,
"m": 994,
"w": true
}
],
"bookmark": "g1AAAAG1eJzLYWBgYMtgTmFQSklKzi9KdUhJMtMryE_WzcnPMzAw1EvOyS9NScwr0ctLLckBqmVKZEiS____f1YGk5uDcvh-BaBYEoNkVSiqGYZ4zUgC67KHGyN69wHYGJmDh0lxSpIDSFc83BhTNwawMRJFIiS5JgGkqx5uTOJ6iGukWu6R4po8FpDtB4AU0KT7EKNW_4W4SCyVgxQXQYx6ADEK6qpIwwZIUO9_lAUAiVOIPw"
}
有人可以向我解释,为什么Cloudant使用相同的_id
和_rev
发送多个结果?