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