Generally the best approach for restricting what results a person sees is with a Filter ... if you do this, then you can get a BitSet from the Filter which tells you everything they are allowed to see, if you then also build a BitSet for each of the Terms you wantto "browse" by (again: a Filter can help you with this), the size of the intersection of those two BitSets will give you the number you want.
this is frequenctly refered to as "facet counts" "faceted searching" and "category counts" ... you might find more info in the archives using those search terms. : Date: Mon, 5 Jun 2006 22:40:58 -0700 (PDT) : From: muraalee <[EMAIL PROTECTED]> : Reply-To: java-user@lucene.apache.org : To: java-user@lucene.apache.org : Subject: Browse Functionality : : : Hi , : I am looking at exposing a "Browse" like functionality using lucene. Assume : this scenario, a user Browses a Field ( Untokenized one like Book Title ) : and he sees a list of "terms" [Book titles ] and their associated doc Hits ( : Number of articles / documents this term appears in ). I believe this can be : done bit straightforward. : : : : Here is the twist. Since all the users don't have access to all the Books, : basically i want to bind the "terms" by a Filter which ensures that they see : only the "terms" that belongs to their subscribed "books". For search, i : have modelled the above functionality using "QueryFilter", where i "OR" the : query, with the list of Books. : : : Is there an elegant way to attack this one ? Appreciate your inputs. : : thanks : ~Murali : : : -- : View this message in context: http://www.nabble.com/Browse-Functionality-t1739829.html#a4727704 : Sent from the Lucene - Java Users forum at Nabble.com. : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]