lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <emailg...@yahoo.co.in>
Subject Re: querying without hits
Date Tue, 14 Oct 2008 08:50:43 GMT
Hello David,

Use TopDocs or TopFieldDocs to collect only required hits.

----
TopDocs topDocs  = searcher.search(query,10)
int docID = topDocs.scoreDocs[index].doc;
Document doc = searcher.doc(docID);
----

Regards
Ganesh


----- Original Message ----- 
From: "David Massart" <dmassart@acm.org>
To: <java-user@lucene.apache.org>
Sent: Tuesday, October 14, 2008 12:14 PM
Subject: querying without hits


> Dear all,
> Could one of you point me to an example of code for querying without using
> the deprecated class Hits ?
>
> Thank you,
>
> David
> 

Send instant messages to your online friends http://in.messenger.yahoo.com 

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