It's only available in Solr and it's based on UnInvertedField <http://lucene.apache.org/solr/api/org/apache/solr/request/UnInvertedField.html>. Lucene 3.4.0 should have it<https://issues.apache.org/jira/browse/LUCENE-3003>implemented too.
I ran a small index in Solr and it does the job by showing among the results the faceted results. Thank you Erik for that.To run more tests yourself using the out-of-the-box setup like Erik said: *grab a compatible version of Solr and just plug your index into Solr's data directory (and you will have to add your field "content" to Solr's schema.xml and adjust the primary-key-field accordingly) and just give it a try. After starting Solr (there's a ready-to-use web app delivered in a Jetty servlet container in your Solr download), you would get your results by calling this URL (from your browser or by the curl command line program): http://localhost:8983/solr/select/?q=<query>&facet=true&** facet.field=content*