I have an issue with my data. I have a collection with documents that contain a timestamp indicating the start of this document. The documents contain some other fields and I have created an index over the start timestamp plus a boolean field and another timestamp.
When I now query the index for the oldest documents, i.e., a query of the following form:
SELECT META(my_collection).id, startDate FROM `my_bucket`._default.my_collection AS my_collection WHERE NOT attr1 AND ts2 IS NOT NULL ORDER BY startDate LIMIT 10
the query returns sorted documents as expected.
However, when I now try to retrieve the oldest document from my collection via
SELECT * FROM `my_bucket`._default.my_collection AS my_collection where meta(my_collection).id = 'MyCollection:ID-FROM-QUERY'
the document is not found in the collection.
If try to delete the documents from the collection nothing changes. The index still returns the same documents.
The problem initially looked to me as if the index was inconsistent. Therefore, I have deleted the index and created it again.
Any idea what I could do to fix this issue?