lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bamford <>
Subject Returning hits by highest score
Date Wed, 17 Dec 2008 11:36:40 GMT

In a search I am doing, there may be thousands of hits, of which I only 
want the 10 with the highest score. Will the following code do this for 
me, or will it simply return the first 10 it finds?

TopDocCollector collector = new TopDocCollector(10);, collector);

If the latter case is true (i.e. the first 10 are returned), how can I 
get it to do what I want?


- Chris

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message