lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: getting the maximum Hits doc
Date Fri, 05 Jan 2007 10:12:23 GMT
Maybe your MySearcher is doing something different than the "Hits  
IndexSearcher.search()" method?


On Jan 4, 2007, at 3:38 PM, Dennis Kubes wrote:

> Hits should be sorted according to score.  Getting the first  
> document should give you the one with the highest score.
>
> Dennis
>
> Nils Höller wrote:
>> Hi,
>> this is a short beginner question:
>> I am searching for something in my program
>> Hits hits = MySearcher.search(queryStr, searchRes.indexPath); Now  
>> I only want the Document with the highest score.
>> Is there a better way, then iterating through all hits?
>> The Hits objects seems to be not sorted.
>> Thanks for your help
>> Nils
>> ---------------------------------------------------------------------
>> 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


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