I also had similar problem. It was essentially a 'group by'-like requirement. I used both get(fieldName) and getTermFreqVector(...), it seemed that get(fieldName) on a page of results (say, 10 results per page) was faster than getTermFreqVector() for me.
ray, On 7/29/05, mark harwood <[EMAIL PROTECTED]> wrote: > > Is there a faster way to access the total hits > > count?? > > The solution I outlined could be adapted to work > across multiple indexes - you'd just have to aggregate > the totals. > > If going from all category terms to matching doc ids > is slow you could do it the other way going from > matching doc ids to terms. > > You can feasibly do this by : > a) IndexReader.document(hitDocId).get("category") > or > b) > IndexReader.getTermFreqVector(hitDocId,"category").getTerms() > > Unfortunately a) reads ALL fields for a doc off the > disk and is probably very slow. b) would be quicker > but would require you to index with TermFreqVector > support. > I'm not sure if b) would be faster than the term to > docids approach I originally suggested - you'd have to > try it and see how it performs on your data. > > Cheers, > Mark > > > > > ___________________________________________________________ > How much free photo storage do you get? Store your holiday > snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]