Search implementation with arbitrary sorting. Finds the top
CopyC#
n
hits for
CopyC#
query
, applying
CopyC#
filter
if non-null, and sorting the hits by the criteria in
CopyC#
sort
.

NOTE: this does not compute scores by default; use {@link IndexSearcher#setDefaultFieldSortScoring} to enable scoring.

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

Syntax

C#
public virtual TopFieldDocs Search(
	Query query,
	Filter filter,
	int n,
	Sort sort
)
Visual Basic
Public Overridable Function Search ( _
	query As Query, _
	filter As Filter, _
	n As Integer, _
	sort As Sort _
) As TopFieldDocs
Visual C++
public:
virtual TopFieldDocs^ Search(
	Query^ query, 
	Filter^ filter, 
	int n, 
	Sort^ sort
)

Parameters

query
Type: Lucene.Net.Search..::..Query

[Missing <param name="query"/> documentation for "M:Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query,Lucene.Net.Search.Filter,System.Int32,Lucene.Net.Search.Sort)"]

filter
Type: Lucene.Net.Search..::..Filter

[Missing <param name="filter"/> documentation for "M:Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query,Lucene.Net.Search.Filter,System.Int32,Lucene.Net.Search.Sort)"]

n
Type: System..::..Int32

[Missing <param name="n"/> documentation for "M:Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query,Lucene.Net.Search.Filter,System.Int32,Lucene.Net.Search.Sort)"]

sort
Type: Lucene.Net.Search..::..Sort

[Missing <param name="sort"/> documentation for "M:Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query,Lucene.Net.Search.Filter,System.Int32,Lucene.Net.Search.Sort)"]

Return Value

[Missing <returns> documentation for "M:Lucene.Net.Search.Searcher.Search(Lucene.Net.Search.Query,Lucene.Net.Search.Filter,System.Int32,Lucene.Net.Search.Sort)"]

See Also