I have a query that can return documents that represent different types of 
things (e.g. books, movies, coupons, etc)

There is a  "object_type" keyword on each document, so I can tell that a 
document is a coupon or a book etc...

The problem is that I need to display a count of each item type that was found. 
 
For example,  your searched returned: 67 coupons, 54 movies, 28 books...

While I can loop through each document and increment some sort of counter by 
document type, sometimes I have over a 2000 documents, and this would mean that 
the query would be executed internally by lucene 20 times (for every 100 
records).

I am looking at the HitCollector, but since I would need to still get each and 
every document (to figure out if it's a coupon vs. a book), I am not sure if 
there would be any benefits.  Would using a HitCollector cause the query to be 
run only 1x vs. 20 for 2000 documents?  Would that be the only benefit?

I would be interested in hearing what others think about this problem and how 
to best implement this functionality with lucene.

Thank you.
Phillip









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to