Class BooleanFilter
A container Lucene.Net.Search.Filter that allows Boolean composition of Lucene.Net.Search.Filters. Lucene.Net.Search.Filters are allocated into one of three logical constructs; SHOULD, MUST NOT, MUST The results Lucene.Net.Search.Filter BitSet is constructed as follows: SHOULD Filters are OR'd together The resulting Lucene.Net.Search.Filter is NOT'd with the NOT Lucene.Net.Search.Filters The resulting Lucene.Net.Search.Filter is AND'd with the MUST Lucene.Net.Search.Filters
Inherited Members
Namespace: Lucene.Net.Queries
Assembly: Lucene.Net.Queries.dll
Syntax
public class BooleanFilter : Filter, IEnumerable<FilterClause>, IEnumerable
Properties
Clauses
Gets the list of clauses
Declaration
public virtual IList<FilterClause> Clauses { get; }
Property Value
Type | Description |
---|---|
IList<FilterClause> |
Methods
Add(FilterClause)
Adds a new FilterClause to the Boolean Lucene.Net.Search.Filter container
Declaration
public virtual void Add(FilterClause filterClause)
Parameters
Type | Name | Description |
---|---|---|
FilterClause | filterClause | A FilterClause object containing a Lucene.Net.Search.Filter and an Lucene.Net.Search.Occur parameter |
Add(Filter, Occur)
A container Lucene.Net.Search.Filter that allows Boolean composition of Lucene.Net.Search.Filters. Lucene.Net.Search.Filters are allocated into one of three logical constructs; SHOULD, MUST NOT, MUST The results Lucene.Net.Search.Filter BitSet is constructed as follows: SHOULD Filters are OR'd together The resulting Lucene.Net.Search.Filter is NOT'd with the NOT Lucene.Net.Search.Filters The resulting Lucene.Net.Search.Filter is AND'd with the MUST Lucene.Net.Search.Filters
Declaration
public void Add(Filter filter, Occur occur)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | |
Occur | occur |
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)
Returns the a Lucene.Net.Search.DocIdSetIterator representing the Boolean composition of the filters that have been added.
Declaration
public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context | |
IBits | acceptDocs |
Returns
Type | Description |
---|---|
DocIdSet |
Overrides
GetEnumerator()
Returns an iterator on the clauses in this query. It implements the IEnumerable<T> interface to make it possible to do:
for (FilterClause clause : booleanFilter) {}
Declaration
public IEnumerator<FilterClause> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<FilterClause> |
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()
Prints a user-readable version of this Lucene.Net.Search.Filter.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |