Hi Lucene Developer community, I may have hit a Lucene issue and I would like clarification if this is indeed a bug.
Steps: 1. Enable index sorting for the index 2. Add document with id=1 and yVal=Long.MaxValue 3. Delete document with id, followed by add document with same id with yVal=45. 4. Flush index. 5. Search for documents with yVal=Long.MaxValue. Deleted document is returned as part of results. Here is the concise sample code that reproduces bug: https://gist.github.com/vishramachandran/4a8443fb67ad74b2f597a58ec0913411 The issue does not reproduce if index sorting is disabled in the code. I checked with Tomas F. Lobbe on this issue and he was able to concur with me that this may be a bug - but we wanted to check with the group before filing one. Thanks Vish.