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
Inheritance
System.Object
Lucene.Net.Search.Filter
BooleanFilter
Implements
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Lucene.Net.Queries.dll
Syntax
public class BooleanFilter : Filter, IEnumerable<FilterClause>, IEnumerable
Properties
|
Improve this Doc
View Source
Clauses
Declaration
public virtual IList<FilterClause> Clauses { get; }
Property Value
Type |
Description |
System.Collections.Generic.IList<FilterClause> |
|
Methods
|
Improve this Doc
View Source
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
|
|
Improve this Doc
View Source
Add(Filter, Occur)
Declaration
public void Add(Filter filter, Occur occur)
Parameters
Type |
Name |
Description |
Lucene.Net.Search.Filter |
filter |
|
Lucene.Net.Search.Occur |
occur |
|
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
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 |
Lucene.Net.Index.AtomicReaderContext |
context |
|
Lucene.Net.Util.IBits |
acceptDocs |
|
Returns
Type |
Description |
Lucene.Net.Search.DocIdSet |
|
Overrides
Lucene.Net.Search.Filter.GetDocIdSet(Lucene.Net.Index.AtomicReaderContext, Lucene.Net.Util.IBits)
|
Improve this Doc
View Source
GetEnumerator()
Returns an iterator on the clauses in this query. It implements the System.Collections.Generic.IEnumerable<T> interface to
make it possible to do:
for (FilterClause clause : booleanFilter) {}
Declaration
public IEnumerator<FilterClause> GetEnumerator()
Returns
Type |
Description |
System.Collections.Generic.IEnumerator<FilterClause> |
|
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
ToString()
Prints a user-readable version of this Lucene.Net.Search.Filter.
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Explicit Interface Implementations
|
Improve this Doc
View Source
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable