Easiest way I know of without parsing any of the index files is to take the 
size of the fdx file in bytes and divide by 8. This will give you the exact 
number of documents before 4.0, and a close approximation in 4.0.

Though, the fdx file might not be on disk if you haven't committed.

-Michael

-----Original Message-----
From: Shawn Heisey [mailto:s...@elyograg.org] 
Sent: Monday, October 15, 2012 9:21 PM
To: solr-user@lucene.apache.org
Subject: How many documents in each Lucene segment?

Is there any way to easily determine how many documents exist in a 
Lucene index segment?  Ideally I want to check the document counts in 
segments on an index that is being built by a large MySQL dataimport, 
before the dataimport completes.  If that's not possible, I can take 
steps to do a smaller import and make sure the changes are committed.

Thanks,
Shawn

Reply via email to