Class Query
The abstract base class for queries.
Instantiable subclasses are:
- TermQuery
- BooleanQuery
- WildcardQuery
- PhraseQuery
- PrefixQuery
- MultiPhraseQuery
- FuzzyQuery
- RegexpQuery
- TermRangeQuery
- NumericRangeQuery
- ConstantScoreQuery
- DisjunctionMaxQuery
- MatchAllDocsQuery
See also the family of Span Queries (Lucene.Net.Search.Spans) and additional queries available in the Queries module
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class Query : object
Properties
Name | Description |
---|---|
Boost | Gets or Sets the boost for this query clause. Documents matching this clause will (in addition to the normal weightings) have their score multiplied by Boost. The boost is 1.0 by default. |
Methods
Name | Description |
---|---|
Clone() | Returns a clone of this query. |
CreateWeight(IndexSearcher) | Expert: Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries, which re-write to themselves. |
Equals(Object) | |
ExtractTerms(ISet<Term>) | Expert: adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten (Rewrite(IndexReader)) form. |
GetHashCode() | |
Rewrite(IndexReader) | Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys. |
ToString() | Prints a query to a string. |
ToString(String) | Prints a query to a string, with |