Query returns duplicates

I’m experiencing duplicate results in some of my queries. In some instances it looks like old versions of records are returned along with the latest version.

It is not possible. Please provide the query and data


here is an image showing the query and results.

2 results returned with identical ID. One of these records is a “ghost” record.


You’re right - found source code that added trailing space to doc id when saving…this created the illusion that there was ghost copy when in fact there were 2 distinct docs with one having a trailing space in its key.