You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by Leonardo Azize Martins <la...@gmail.com> on 2010/04/30 00:01:42 UTC

Doubts about TopDocs and Maintain index updated

Hello,

In the current version Hits object is Obsolete. How to use TopDocs? How can
I get Document from it?
How is the best way to use QueryParser?

What is the best way to maintain an index updated?
I would like to create an index from a database table.

I will create the first time index, but when the current registries will be
updated, how to update the created index?

Regards,
Leo

Re: Doubts about TopDocs and Maintain index updated

Posted by Robert Jordan <ro...@gmx.net>.
On 30.04.2010 00:01, Leonardo Azize Martins wrote:
> Hello,
>
> In the current version Hits object is Obsolete. How to use TopDocs? How can
> I get Document from it?

TopDocs td = searcher.Search (....);

foreach (ScoreDoc sd in td.scoreDocs) {
	Document doc = searcher.Doc(sd.doc);
}

Robert