Shortcut to retrieving ids of facets

I am trying to identify duplicate records in an index. I've added a md5 hash to each record as it is inserted and then use a TermFacet on this field to retrieve all of the unique md5 hashes that occur more than once. This happens remarkably fast but then I must take each term/md5hash and do a query to retrieve all of the ids associated with it (which takes surprisingly long). Is there some way to get ES to return the actual ids of all the facets it is counting?

-b