Cosmos Mongo API “In” Array expression issue

↘锁芯ラ 提交于 2020-01-11 04:11:26

问题


Are there issues with the IN expression? We are having issues where it doesn't find the results we are asking for even though it exists?

{ "SerialNumber": "V8073023", "_t": "DeviceEventDataEvent", "EventType": NumberInt(4), "isDeleted": { $in: [false,null] }, "EventNumber": 122 } Returns the document correctly, however when using IN

{ "SerialNumber": "V8073023", "_t": "DeviceEventDataEvent", "EventType": NumberInt(4), "isDeleted": { $in: [false,null] }, "EventNumber": { $in: [122] } } No data is returned.


回答1:


I tried to reproduce your issue on my side but failed. Please refer to my details.

My sample documents in my cosmos db:

{
        "id" : "1",
        "CustomerId" : 1,
        "Orders" : [
            "a",
            "b",
            "c"
        ]
},
{
        "id" : "2",
        "CustomerId" : 2,
        "Orders" : [
            "e",
            "f",
            "g"
        ]
}

Query 1:

Query 2:

My db was built in the region East Asia.If you have any difference with me, you could edit it.




回答2:


Microsoft got back to me, issue their side. Thanks to everyone involved for still assisting.

Thank you David for reporting this! I investigated the issue, it’s a bug on our side manifesting under a combination of conditions. I already have made a fix for it and will check it in by end of week (then it’s up to our deployment cycle to propagate the fix to all datacenters around the world). Let me know if you have queries that don’t work and are blocking you. Best regards, Orestis



来源:https://stackoverflow.com/questions/49770028/cosmos-mongo-api-in-array-expression-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!