lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Index Size in bytes
Date Thu, 19 Dec 2013 00:34:32 GMT
Use Directory.listAll to get all files, then visit each one and call
Directory.fileLength, and sum those up?

Note that this gives you total size of all commit points, which may be
over-counting on Windows in cases where IndexWriter has removed old
commit points but IndexReaders still have the files open.

Mike McCandless

On Wed, Dec 18, 2013 at 5:16 PM, Siraj Haider <> wrote:
> How can I get the size of the whole index in bytes?
> regards
> -Siraj
> (212) 306-0154
> ________________________________
> This electronic mail message and any attachments may contain information which is privileged,
sensitive and/or otherwise exempt from disclosure under applicable law. The information is
intended only for the use of the individual or entity named as the addressee above. If you
are not the intended recipient, you are hereby notified that any disclosure, copying, distribution
(electronic or otherwise) or forwarding of, or the taking of any action in reliance on, the
contents of this transmission is strictly prohibited. If you have received this electronic
transmission in error, please notify us by telephone, facsimile, or e-mail as noted above
to arrange for the return of any electronic mail or attachments. Thank You.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message