Class BooleanFilter
A container Filter that allows Boolean composition of Filters. Filters are allocated into one of three logical constructs; SHOULD, MUST NOT, MUST The results Filter BitSet is constructed as follows: SHOULD Filters are OR'd together The resulting Filter is NOT'd with the NOT Filters The resulting Filter is AND'd with the MUST Filters
Implements
IEnumerable<FilterClause>
Inherited Members
Lucene.Net.Search.Filter.NewAnonymous(Func<, , >)
Namespace: Lucene.Net.Queries
Assembly: Lucene.Net.Queries.dll
Syntax
public class BooleanFilter : Filter, IEnumerable<FilterClause>
Properties
| Improve this Doc View SourceClauses
Gets the list of clauses
Declaration
public virtual IList<FilterClause> Clauses { get; }
Property Value
Type | Description |
---|---|
IList<FilterClause> |
Methods
| Improve this Doc View SourceAdd(FilterClause)
Adds a new FilterClause to the Boolean Filter container
Declaration
public virtual void Add(FilterClause filterClause)
Parameters
Type | Name | Description |
---|---|---|
FilterClause | filterClause | A FilterClause object containing a Filter and an Occur parameter |
Add(Filter, Occur)
Declaration
public void Add(Filter filter, Occur occur)
Parameters
Type | Name | Description |
---|---|---|
Filter | filter | |
Occur | occur |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetDocIdSet(AtomicReaderContext, IBits)
Returns the a 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
| Improve this Doc View SourceGetEnumerator()
Returns an iterator on the clauses in this query. It implements the
for (FilterClause clause : booleanFilter) {}
Declaration
public IEnumerator<FilterClause> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<FilterClause> |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
ToString()
Prints a user-readable version of this Filter.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Implements
IEnumerable<>