Class TermQuery
A Query that matches documents containing a term. this may be combined with other terms with a BooleanQuery.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
[Serializable]
public class TermQuery : Query
Constructors
| Improve this Doc View SourceTermQuery(Term)
Constructs a query for the term t
.
Declaration
public TermQuery(Term t)
Parameters
Type | Name | Description |
---|---|---|
Term | t |
TermQuery(Term, TermContext)
Expert: constructs a TermQuery that will use the provided docFreq instead of looking up the docFreq against the searcher.
Declaration
public TermQuery(Term t, TermContext states)
Parameters
Type | Name | Description |
---|---|---|
Term | t | |
TermContext | states |
TermQuery(Term, Int32)
Expert: constructs a TermQuery that will use the
provided docFreq
instead of looking up the docFreq
against the searcher.
Declaration
public TermQuery(Term t, int docFreq)
Parameters
Type | Name | Description |
---|---|---|
Term | t | |
System.Int32 | docFreq |
Properties
| Improve this Doc View SourceTerm
Returns the term of this query.
Declaration
public virtual Term Term { get; }
Property Value
Type | Description |
---|---|
Term |
Methods
| Improve this Doc View SourceCreateWeight(IndexSearcher)
Declaration
public override Weight CreateWeight(IndexSearcher searcher)
Parameters
Type | Name | Description |
---|---|---|
IndexSearcher | searcher |
Returns
Type | Description |
---|---|
Weight |
Overrides
| Improve this Doc View SourceEquals(Object)
Returns true
if o
is equal to this.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
System.Object | o |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceExtractTerms(ISet<Term>)
Declaration
public override void ExtractTerms(ISet<Term> terms)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ISet<Term> | terms |
Overrides
| Improve this Doc View SourceGetHashCode()
Returns a hash code value for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
| Improve this Doc View SourceToString(String)
Prints a user-readable version of this query.
Declaration
public override string ToString(string field)
Parameters
Type | Name | Description |
---|---|---|
System.String | field |
Returns
Type | Description |
---|---|
System.String |