You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ian Vink <ia...@gmail.com> on 2008/12/05 03:59:18 UTC
TopDocs
I have this search which returns TopDocs
TopDocs topDocs = searcher.Search(query, bookFilter, maxDocsToFind);
How do I get the document object for the ScoreDoc?
foreach (ScoreDoc scoreDoc in topDocs.scoreDocs)
{
?????? Document myDoc = GetTheDocument(scoreDoc.doc); ??????
}
Re: TopDocs
Posted by John Wang <jo...@gmail.com>.
searcher.doc(scoreDoc.doc);
On Thu, Dec 4, 2008 at 6:59 PM, Ian Vink <ia...@gmail.com> wrote:
> I have this search which returns TopDocs
> TopDocs topDocs = searcher.Search(query, bookFilter, maxDocsToFind);
>
>
> How do I get the document object for the ScoreDoc?
>
> foreach (ScoreDoc scoreDoc in topDocs.scoreDocs)
> {
> ?????? Document myDoc = GetTheDocument(scoreDoc.doc); ??????
> }
>