I have 13 documents of type ‘user’ however, when I query in 2 pages of 8 one of the results is omitted while another is duplicated in both pages.
SELECT meta().id AS id
,nickName
FROM TestClient_account AS x WHERE x.type=‘user’ ORDER BY LOWER(nickName
) LIMIT 8 OFFSET 0
[
{
"id": "u/33",
"nickName": null
},
{
"id": "u/88881",
"nickName": null
},
{
"id": "u/88882",
"nickName": null
},
{
"id": "u/88883",
"nickName": null
},
{
"id": "u/88884",
"nickName": null
},
{
"id": "u/88885",
"nickName": null
},
{
"id": "u/88886",
"nickName": null
},
{
"id": "u/9",
"nickName": null
}
]
SELECT meta().id AS id
,nickName
FROM TestClient_account AS x WHERE x.type=‘user’ ORDER BY LOWER(nickName
) LIMIT 8 OFFSET 8
[
{
"id": "u/9",
"nickName": null
},
{
"id": "u/17",
"nickName": null
},
{
"id": "u/1234",
"nickName": "darth"
},
{
"id": "u/777",
"nickName": "luke"
},
{
"id": "u/1999999",
"nickName": "sdfsdgfdsgf"
}
]
The document with ID u/9 appears in both pages while the document with ID u/25 (and a null nickName) doesn’t appear in either page. The query is correct if there’s no LIMIT/OFFSET or LIMIT 13 OFFSET 0.