An abstract {@link Query} that matches documents
containing a subset of terms provided by a {@link
FilteredTermEnum} enumeration.
This query cannot be used directly; you must subclass
it and define {@link #getEnum} to provide a {@link
FilteredTermEnum} that iterates through the terms to be
matched.
NOTE: if {@link #setRewriteMethod} is either
{@link #CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE} or {@link
#SCORING_BOOLEAN_QUERY_REWRITE}, you may encounter a
{@link BooleanQuery.TooManyClauses} exception during
searching, which happens when the number of terms to be
searched exceeds {@link
BooleanQuery#GetMaxClauseCount()}. Setting {@link
#setRewriteMethod} to {@link #CONSTANT_SCORE_FILTER_REWRITE}
prevents this.
The recommended rewrite method is {@link
#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT}: it doesn't spend CPU
computing unhelpful scores, and it tries to pick the most
performant rewrite method given the query.
Note that {@link QueryParser} produces
MultiTermQueries using {@link
#CONSTANT_SCORE_AUTO_REWRITE_DEFAULT} by default.
Namespace: Lucene.Net.SearchAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
[SerializableAttribute] public abstract class MultiTermQuery : Query |
Visual Basic |
---|
<SerializableAttribute> _ Public MustInherit Class MultiTermQuery _ Inherits Query |
Visual C++ |
---|
[SerializableAttribute] public ref class MultiTermQuery abstract : public Query |
Inheritance Hierarchy
System..::..Object
Lucene.Net.Search..::..Query
Lucene.Net.Search..::..MultiTermQuery
Lucene.Net.Search..::..FuzzyQuery
Lucene.Net.Search..::..NumericRangeQuery
Lucene.Net.Search..::..PrefixQuery
Lucene.Net.Search.Regex..::..RegexQuery
Lucene.Net.Search..::..TermRangeQuery
Lucene.Net.Search..::..WildcardQuery
Lucene.Net.Search..::..Query
Lucene.Net.Search..::..MultiTermQuery
Lucene.Net.Search..::..FuzzyQuery
Lucene.Net.Search..::..NumericRangeQuery
Lucene.Net.Search..::..PrefixQuery
Lucene.Net.Search.Regex..::..RegexQuery
Lucene.Net.Search..::..TermRangeQuery
Lucene.Net.Search..::..WildcardQuery