Class TermsFilter
Constructs a filter for docs matching any of the terms added to this class.
Unlike a RangeFilter this can be used for filtering on multiple terms that are not necessarily in
a sequence. An example might be a collection of primary keys from a database query result or perhaps
a choice of "category" labels picked by the end user. As a filter, this is much faster than the
equivalent query (a Lucene.
Inherited Members
Namespace: Lucene.Net.Queries
Assembly: Lucene.Net.Queries.dll
Syntax
public sealed class TermsFilter : Filter
Constructors
TermsFilter(params Term[])
Creates a new Terms
Declaration
public TermsFilter(params Term[] terms)
Parameters
Type | Name | Description |
---|---|---|
Term[] | terms |
TermsFilter(IList<Term>)
Creates a new Terms
Declaration
public TermsFilter(IList<Term> terms)
Parameters
Type | Name | Description |
---|---|---|
IList<Term> | terms |
TermsFilter(string, params BytesRef[])
Creates a new Terms
Declaration
public TermsFilter(string field, params BytesRef[] terms)
Parameters
Type | Name | Description |
---|---|---|
string | field | |
Bytes |
terms |
TermsFilter(string, IList<BytesRef>)
Creates a new Terms
Declaration
public TermsFilter(string field, IList<BytesRef> terms)
Parameters
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetDocIdSet(AtomicReaderContext, IBits)
Creates a Lucene.null
can be
returned if no documents are accepted by this Lucene.
Declaration
public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
context | a Lucene. |
IBits | acceptDocs | Lucene. |
Returns
Type | Description |
---|---|
Doc |
A Lucene. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |