You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Steven Bower <sm...@alcyon.net> on 2014/01/06 23:11:32 UTC

Index sizes

I was looking at the code for getIndexSize() on the ReplicationHandler to
get at the size of the index on disk. From what I can tell, because this
does directory.listAll() to get all the files in the directory, the size on
disk includes not only what is searchable at the moment but potentially
also files that are being created by background merges/etc.. I am wondering
if there is an API that would give me the size of the "currently
searchable" index files (doubt this exists, but maybe)..

If not what is the most appropriate way to get a list of the segments/files
that are currently in use by the active searcher such that I could then ask
the directory implementation for the size of all those files?

For a more complete picture of what I'm trying to accomplish, I am looking
at building a quota/monitoring component that will trigger when index size
on disk gets above a certain size. I don't want to trigger if index is
doing a merge and ephemerally uses disk for that process. If anyone has any
suggestions/recommendations here too I'd be interested..

Thanks,

steve