This sounds like another "group by" totalling question. See the generic "group by" totalling code I posted here: http://marc.theaimsgroup.com/?l=lucene-dev&m=111044178212335&w=2
In your example there is no quality threshold (just a filter bitset of "books in 2002") so you can replace the "scores" array in the code with a simple bitset lookup. Also, you do not need the GroupKeyFactory which can be used to adjust term values (eg truncate 20050101 date field into 2005 for grouping by year). The code works best when your group field (in your case "author") doesn't have large volumes of unique values. It is fast because it uses TermDocs rather than trying to read any stored doc values - reading stored fields by calling reader.document() is often slow because ALL doc fields are read from disk, even if you only want one of them. Not something to do in a tight loop. Cheers, Mark ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]