C# Class Lucene.Net.Search.MultiTermQuery

Inheritance: Query
ファイルを表示 Open project: synhershko/lucene.net Class Usage Examples

Public Properties

Property Type Description
CONSTANT_SCORE_AUTO_REWRITE_DEFAULT RewriteMethod
CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE RewriteMethod
CONSTANT_SCORE_FILTER_REWRITE RewriteMethod
SCORING_BOOLEAN_QUERY_REWRITE RewriteMethod

Protected Properties

Property Type Description
internalRewriteMethod RewriteMethod

Public Methods

Method Description
ClearTotalNumberOfTerms ( ) : void

Expert: Resets the counting of unique terms. Do this before executing the query/filter.

Equals ( System obj ) : bool
GetHashCode ( ) : int
Rewrite ( Lucene.Net.Index.IndexReader reader ) : Query

Protected Methods

Method Description
GetEnum ( Lucene.Net.Index.IndexReader reader ) : Lucene.Net.Search.FilteredTermEnum

Construct the enumeration to be used, expanding the pattern term.

IncTotalNumberOfTerms ( int inc ) : void
MultiTermQuery ( ) : System

Constructs a query matching terms that cannot be represented with a single Term.

Method Details

ClearTotalNumberOfTerms() public method

Expert: Resets the counting of unique terms. Do this before executing the query/filter.
public ClearTotalNumberOfTerms ( ) : void
return void

Equals() public method

public Equals ( System obj ) : bool
obj System
return bool

GetEnum() protected abstract method

Construct the enumeration to be used, expanding the pattern term.
protected abstract GetEnum ( Lucene.Net.Index.IndexReader reader ) : Lucene.Net.Search.FilteredTermEnum
reader Lucene.Net.Index.IndexReader
return Lucene.Net.Search.FilteredTermEnum

GetHashCode() public method

public GetHashCode ( ) : int
return int

IncTotalNumberOfTerms() protected method

protected IncTotalNumberOfTerms ( int inc ) : void
inc int
return void

MultiTermQuery() protected method

Constructs a query matching terms that cannot be represented with a single Term.
protected MultiTermQuery ( ) : System
return System

Rewrite() public method

public Rewrite ( Lucene.Net.Index.IndexReader reader ) : Query
reader Lucene.Net.Index.IndexReader
return Query

Property Details

CONSTANT_SCORE_AUTO_REWRITE_DEFAULT public_oe static_oe property

Read-only default instance of ConstantScoreAutoRewrite , with ConstantScoreAutoRewrite.SetTermCountCutoff set to ConstantScoreAutoRewrite.DEFAULT_TERM_COUNT_CUTOFF and ConstantScoreAutoRewrite.SetDocCountPercent set to ConstantScoreAutoRewrite.DEFAULT_DOC_COUNT_PERCENT . Note that you cannot alter the configuration of this instance; you'll need to create a private instance instead.
public static RewriteMethod,Lucene.Net.Search CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
return RewriteMethod

CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE public_oe static_oe property

Like SCORING_BOOLEAN_QUERY_REWRITE except scores are not computed. Instead, each matching document receives a constant score equal to the query's boost.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.GetMaxClauseCount.

public static RewriteMethod,Lucene.Net.Search CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE
return RewriteMethod

CONSTANT_SCORE_FILTER_REWRITE public_oe static_oe property

A rewrite method that first creates a private Filter, by visiting each term in sequence and marking all docs for that term. Matching documents are assigned a constant score equal to the query's boost.

This method is faster than the BooleanQuery rewrite methods when the number of matched terms or matched documents is non-trivial. Also, it will never hit an errant BooleanQuery.TooManyClauses exception.

public static RewriteMethod,Lucene.Net.Search CONSTANT_SCORE_FILTER_REWRITE
return RewriteMethod

SCORING_BOOLEAN_QUERY_REWRITE public_oe static_oe property

A rewrite method that first translates each term into Occur.SHOULD clause in a BooleanQuery, and keeps the scores as computed by the query. Note that typically such scores are meaningless to the user, and require non-trivial CPU to compute, so it's almost always better to use CONSTANT_SCORE_AUTO_REWRITE_DEFAULT instead.

NOTE: This rewrite method will hit BooleanQuery.TooManyClauses if the number of terms exceeds BooleanQuery.GetMaxClauseCount.

public static RewriteMethod,Lucene.Net.Search SCORING_BOOLEAN_QUERY_REWRITE
return RewriteMethod

internalRewriteMethod protected_oe property

protected RewriteMethod,Lucene.Net.Search internalRewriteMethod
return RewriteMethod