Instead of having the file attached... http://svn.tailsweep.com/opensource/solr-contrib/trunk/src/main/java/org/apache/solr/handler/component/
The facet counts is something else, it groups the counts based on the field supplied does it not? Perhaps facet.query (like you pointed out) can be used, I overlooked that. Never got an answer on the mailinglist so I implemented it instead
Well the "blogs" is not a value it is a field of it's own.
We call it feedId and is a pointer to a row in the DB.
<field name="feedId" type="integer" indexed="true" stored="true" required="true" omitNorms="true" />
What I have accomplished is this:
select count(distinct feedId) from FeedItem where ...somexpression...
One doc is in in this case a FeedItem and each belongs to Feed (many-to-one). If this already can be accomplished in SOLR, my bad. Please tell me how.
Trove have two licenses GPL and ASL. I can use the ASL version if it helps. I only use Trove due to the efficiency, plain hashmaps can be used of course if it is a showstopper.