lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Seltzer" <>
Subject Faceting, Sort and DocIDSet
Date Fri, 17 Apr 2009 15:23:37 GMT
I'm sorry If this question touches on too many things at once, but I'm
having problems putting some ideas together - hopefully someone can
I have a set of indexes, each index contains a month's worth of
Articles. I need to be able to search the index (sorting by date) and
then apply access-filters based on the Article Source. I'm also trying
to get result counts for each Article Source.

So to perform the search I can execute this:

TopFieldDocs results =, accessFilter,
100, new Sort("DateField"));

But I don't think that I can use TopDocs if I want to get Article Source
counts. I think I have to use a HitCollector and then create a result
BitSet that I can compare to my pre-cached Article Source BitSets. But
if I use a HitCollector I have no idea how to sort by a field.

So my questions: 
1) How do I use a HitCollector and sort by a field? 
2) Is using BitSets the wrong way to quickly generate facet counts? I've
read about DocIDSets, but I'm not sure how to use them in the same way.
(I'm basing my faceting technique on Sujit Pal's article



David Seltzer
Systems Architect
203.254.3600 x222

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message