A {@link HitCollector} implementation that collects the top-scoring documents, returning them as a {@link TopDocs}. This is used by {@link IndexSearcher} to implement {@link TopDocs}-based search.

This may be extended, overriding the collect method to, e.g., conditionally invoke

CopyC#
super()
in order to filter which documents are collected.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
[ObsoleteAttribute("Please use TopScoreDocCollector instead, which has better performance.")]
public class TopDocCollector : HitCollector
Visual Basic
<ObsoleteAttribute("Please use TopScoreDocCollector instead, which has better performance.")> _
Public Class TopDocCollector _
	Inherits HitCollector
Visual C++
[ObsoleteAttribute(L"Please use TopScoreDocCollector instead, which has better performance.")]
public ref class TopDocCollector : public HitCollector

Inheritance Hierarchy

See Also