Did you call this method before or after commit method? My wild guess would be that you can count deleted documents inside transaction only.
On Thu, Dec 8, 2022 at 12:10 AM Michael Wechner <michael.wech...@wyona.com> wrote: > Hi > > I am using Lucen 9.4.2 vector search and everything seems to work fine, > except that when I delete some documents from the index, then the method > > > https://lucene.apache.org/core/9_0_0/core/org/apache/lucene/index/IndexReader.html#numDeletedDocs() > > always returns 0, whereas I would have expected that it would return the > number of documents which I deleted from the index. > > IndexReader.numDocs() returns the correct number though. > > I guess I misunderstand the javadoc and in particular the note "*NOTE*: > This operation may run in O(maxDoc)." > > Does somebody explain in more detail what this method is doing? > > Thanks > > Michael -- *{{ **Horvoje.net <https://horvoje.net/> ~~ **VegCook.net <https://vegcook.net/>* *~~* *TheVegCat.com <https://thevegcat.com:9999/> ~~ **Cuspajz.com <https://cuspajz.com/> ~~ VintageZagreb.net <https://vintagezagreb.net/> ~~ **Sterilizacija.org <https://sterilizacija.org/> **~~* *SmijSe.com <https://smijse.com/> ~~ **HTMLutil.net <https://htmlutil.net/> ~~ HTTPinfo.net <https://httpinfo.net/> }}*