从Cloudant查询返回多个相等的_id和_revs

时间:2016-04-18 12:54:42

标签: cloudant

我使用专用的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发送多个结果?

0 个答案:

没有答案