lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Schwartz" <t...@simpleobjects.com>
Subject RE: Need a way to set a result limit on a particular field
Date Wed, 15 Jun 2005 00:11:46 GMT
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
tony@simpleobjects.com


-----Original Message-----
From: Jay Hill [mailto:jayallenhill@gmail.com] 
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: 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