Accessing the inverse index

If you run a terms aggregation on the field (having enabled field data) then this will enumerate all the terms that were indexed. Then you can run a query for each term to find out which documents hold each term. From this it's not too hard to work out which terms are in each document. Is this what you mean?