C# 클래스 Lucene.Net.Search.Searcher

An abstract base class for search implementations. Implements the main search methods.

Note that you can only access Hits from a Searcher as long as it is not yet closed, otherwise an IOException will be thrown.

상속: Lucene.Net.Search.Searchable
파일 보기 프로젝트 열기: synhershko/lucene.net 1 사용 예제들

공개 메소드들

메소드 설명
CreateWeight ( Query query ) : Weight

creates a weight for query

Dispose ( ) : void
Doc ( int i ) : Lucene.Net.Documents.Document
Doc ( int docid, FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
DocFreq ( Lucene.Net.Index.Term term ) : int
DocFreqs ( Lucene.Net.Index.Term terms ) : int[]
Explain ( Query query, int doc ) : Explanation

Returns an Explanation that describes how doc scored against query.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

Explain ( Weight weight, int doc ) : Explanation
Rewrite ( Query query ) : Query
Search ( Query query, Filter filter, int n ) : Lucene.Net.Search.TopDocs

Finds the top n hits for query, applying filter if non-null.

Search ( Query query, int n ) : Lucene.Net.Search.TopDocs

Finds the top n hits for query.

Search ( Weight weight, Filter filter, int n ) : Lucene.Net.Search.TopDocs
Search ( Query query, Filter filter, int n, Lucene.Net.Search.Sort sort ) : Lucene.Net.Search.TopFieldDocs

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

NOTE: this does not compute scores by default; use IndexSearcher.SetDefaultFieldSortScoring(bool,bool) to enable scoring.

Search ( Weight weight, Filter filter, int n, Lucene.Net.Search.Sort sort ) : Lucene.Net.Search.TopFieldDocs
Search ( Query query, Collector results ) : void

Lower-level search API.

Collector.Collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.Search(Query, int) ) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.

Search ( Query query, Filter filter, Collector results ) : void

Lower-level search API.

Collector.Collect(int) is called for every matching document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.Search(Query, Filter, int)) is usually more efficient, as it skips non-high-scoring hits.

Search ( Weight weight, Filter filter, Collector results ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
Searcher ( ) : System

비공개 메소드들

메소드 설명
Close ( ) : void
InitBlock ( ) : void

메소드 상세

CreateWeight() 공개 메소드

creates a weight for query
public CreateWeight ( Query query ) : Weight
query Query
리턴 Weight

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 추상적인 메소드

protected abstract Dispose ( bool disposing ) : void
disposing bool
리턴 void

Doc() 공개 추상적인 메소드

public abstract Doc ( int i ) : Lucene.Net.Documents.Document
i int
리턴 Lucene.Net.Documents.Document

Doc() 공개 추상적인 메소드

public abstract Doc ( int docid, FieldSelector fieldSelector ) : Lucene.Net.Documents.Document
docid int
fieldSelector FieldSelector
리턴 Lucene.Net.Documents.Document

DocFreq() 공개 추상적인 메소드

public abstract DocFreq ( Lucene.Net.Index.Term term ) : int
term Lucene.Net.Index.Term
리턴 int

DocFreqs() 공개 메소드

public DocFreqs ( Lucene.Net.Index.Term terms ) : int[]
terms Lucene.Net.Index.Term
리턴 int[]

Explain() 공개 메소드

Returns an Explanation that describes how doc scored against query.

This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

public Explain ( Query query, int doc ) : Explanation
query Query
doc int
리턴 Explanation

Explain() 공개 추상적인 메소드

public abstract Explain ( Weight weight, int doc ) : Explanation
weight Weight
doc int
리턴 Explanation

Rewrite() 공개 추상적인 메소드

public abstract Rewrite ( Query query ) : Query
query Query
리턴 Query

Search() 공개 메소드

Finds the top n hits for query, applying filter if non-null.
public Search ( Query query, Filter filter, int n ) : Lucene.Net.Search.TopDocs
query Query
filter Filter
n int
리턴 Lucene.Net.Search.TopDocs

Search() 공개 메소드

Finds the top n hits for query.
public Search ( Query query, int n ) : Lucene.Net.Search.TopDocs
query Query
n int
리턴 Lucene.Net.Search.TopDocs

Search() 공개 추상적인 메소드

public abstract Search ( Weight weight, Filter filter, int n ) : Lucene.Net.Search.TopDocs
weight Weight
filter Filter
n int
리턴 Lucene.Net.Search.TopDocs

Search() 공개 메소드

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

NOTE: this does not compute scores by default; use IndexSearcher.SetDefaultFieldSortScoring(bool,bool) to enable scoring.

public Search ( Query query, Filter filter, int n, Lucene.Net.Search.Sort sort ) : Lucene.Net.Search.TopFieldDocs
query Query
filter Filter
n int
sort Lucene.Net.Search.Sort
리턴 Lucene.Net.Search.TopFieldDocs

Search() 공개 추상적인 메소드

public abstract Search ( Weight weight, Filter filter, int n, Lucene.Net.Search.Sort sort ) : Lucene.Net.Search.TopFieldDocs
weight Weight
filter Filter
n int
sort Lucene.Net.Search.Sort
리턴 Lucene.Net.Search.TopFieldDocs

Search() 공개 메소드

Lower-level search API.

Collector.Collect(int) is called for every matching document.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.Search(Query, int) ) is usually more efficient, as it skips non-high-scoring hits.

Note: The score passed to this method is a raw score. In other words, the score will not necessarily be a float whose value is between 0 and 1.

public Search ( Query query, Collector results ) : void
query Query
results Collector
리턴 void

Search() 공개 메소드

Lower-level search API.

Collector.Collect(int) is called for every matching document.
Collector-based access to remote indexes is discouraged.

Applications should only use this if they need all of the matching documents. The high-level search API (Searcher.Search(Query, Filter, int)) is usually more efficient, as it skips non-high-scoring hits.

public Search ( Query query, Filter filter, Collector results ) : void
query Query to match documents ///
filter Filter if non-null, used to permit documents to be collected. ///
results Collector to receive hits ///
리턴 void

Search() 공개 추상적인 메소드

public abstract Search ( Weight weight, Filter filter, Collector results ) : void
weight Weight
filter Filter
results Collector
리턴 void

Searcher() 보호된 메소드

protected Searcher ( ) : System
리턴 System