Hi,
I don't understand if I'm doing something wrong or if it is the
expected behaviour.
My problem is when a document is updated the collectionStatistics
returns counts as if a new document is added in the index, even after
a call to IndexWriter.commit and to
SearcherManager.maybeRefreshBlocking.
I *guess* it's due to the fact that the update is implemented as remove and
reinsert the document. Deletes in Lucene are lazy: the deleted document is just
flagged as deleted in a bitmap and then removed from the index only when
segments are merged. Did you check IndexSearcher.collectionStatist