lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <>
Subject Re: Terms given a filter?
Date Thu, 15 Sep 2005 09:39:55 GMT
This sounds like another "group by" totalling

See the generic "group by" totalling code I posted

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.


To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

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

View raw message