I don't see a way to do this today.  How many different hosts are there?  If
it's small, you could execute the query that many times only grabbing the
top 3 results from each.  Otherwise, you'll have to use brute force with a
HitCollector and read the field for each doc.  Good luck!

Tony Schwartz
[EMAIL PROTECTED]


-----Original Message-----
From: Jay Hill [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 14, 2005 7:23 PM
To: java-user@lucene.apache.org
Subject: Need a way to set a result limit on a particular field

I have a need to limit my Hits returned based on one of the indexed
fields. This is a web application and we want to limit the number of
hits from any one host. We have a field named "host_id" and I'd like
to be able to limit my results to no more than three results for any
one host_id.

Any help is appreciated.

Thanks,
-Jay

---------------------------------------------------------------------
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]

Reply via email to