I think this would be useful. it could e.g. be exposed via SortedSetDocValuesReaderState and so on.
4.5 release -> bulk close
Commit 1502699 from Robert Muir
[ https://svn.apache.org/r1502699 ]
LUCENE-5094: add ramBytesUsed to OrdinalMap
Commit 1502697 from Robert Muir
[ https://svn.apache.org/r1502697 ]
+1 Patch looks good!
here's the patch. its just summing across the ramBytesUsed of its packed ints structures.