lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tsang <saturn...@gmail.com>
Subject Re: hit count within categories
Date Sun, 31 Jul 2005 17:28:41 GMT
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 <markharw00d@yahoo.co.uk> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message