Make a RangeFilter that visits only docs in your time period, then run a search w/ a custom HitCollector that looks at the source of each doc and tallies up the results? For performance, you'll probably need to load the source using FieldCache (FieldCache.DEFAULT.getStrings(...)).
Or, use Solr's faceted search, or http://www.browseengine.com, or some other facets impl, to tally up the sources. Mike On Tue, Apr 21, 2009 at 6:52 PM, Preetham Kajekar <preet...@cisco.com> wrote: > > Hi, > I have a lucene index which has 20 mil documents. Each document has a > timestamp field and a source field. I am interested in finding the top n > sources for a given hour (based on the timestamp). I know we can get the top > n sources fields easily using the IndexReader API, but was wondering if I > can get that top n for a certain period of time ? > > Thx, > ~preetham > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org