Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exclude deleted documents when extracting stored fields (#46)
When reading stored fields, `loadDocument` calls `IndexReader.storedFields().document(id, ...)` to get back the stored fields for a given document. However, Lucene doesn't automatically check that the requested document is still live: > NOTE: for performance reasons, this method does not check if the > requested document is deleted, and therefore asking for a deleted > document may yield unspecified results. Usually this is not > required, however you can test if the doc is deleted by checking the > Bits returned from > MultiBits.getLiveDocs(org.apache.lucene.index.IndexReader). This can lead to browse headings appearing that don't actually link to anything. Adds a check against the live docs bitset, as described in the documentation above.
- Loading branch information