Description
N1QL returns duplicate results for one entry
example query:
SELECT `Extent1`.* FROM `binyat` as `Extent1`
|
WHERE ((`Extent1`.`docType` = 'StockRevisionLine') |
AND (`Extent1`.`stockRevisionId` = '15b4ef08-1bfb-4294-b154-d15535a1ce10') |
AND (`Extent1`.`id` = '0911ad98-a24b-402b-bd0a-ad3e03e0075e')) |
and its results:
[
|
{
|
"date": "2018-04-12T14:30:52.2843225+05:00", |
"docType": "StockRevisionLine", |
"id": "0911ad98-a24b-402b-bd0a-ad3e03e0075e", |
...
|
},
|
{
|
"date": "2018-04-12T14:30:52.2843225+05:00", |
"docType": "StockRevisionLine", |
"id": "0911ad98-a24b-402b-bd0a-ad3e03e0075e", |
...
|
}
|
]
|
If I query by key, I get only one result.
After I deleted this document, N1QL still returns one result, but querying by key returns no result.
This started to happen on several documents.
I think this is some how related to replication, where conflicted and deleted documents still kept somewhere, and GSI scans them also.
Please let me know if additional information is needed to investigate this issue.