Luke may have it at least for a quick check: https://github.com/dmitrykey/luke (part of last/next? version of Lucene now).
Regards, Alex. On Mon, 26 Aug 2019 at 16:20, Bram Van Dam <bram.van...@intix.eu> wrote: > > Possibly somewhat unusual question: I'm looking for a way to query the > number of *lucene documents* from within Solr. This can be different > from the number of Solr documents (because of unmerged deletes/updates/ > etc). > > As a bit of background; we recently found this lovely little error > message in a Solr log, and we'd like to get a bit of an early warning > system going :-) > > > Too many documents, composite IndexReaders cannot exceed 2147483647 > > If no way currently exists, I'm not adverse to hacking one in, but I > could use a few pointers in the general direction. > > As an alternative strategy, I guess I could use Lucene to walk through > each index segment and add the segment info maxDoc values. But I'm not > sure if that would be a good idea. > > Thanks a bunch, > > - Bram