Fork me on GitHub
  • API

    Show / Hide Table of Contents

    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
    object
    Filter
    BooleanFilter
    Implements
    IEnumerable<FilterClause>
    IEnumerable
    Inherited Members
    Filter.NewAnonymous(Func<AtomicReaderContext, IBits, DocIdSet>)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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
    object.Equals(object)

    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
    Lucene.Net.Search.Filter.GetDocIdSet(Lucene.Net.Index.AtomicReaderContext, Lucene.Net.Util.IBits)

    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
    object.GetHashCode()

    ToString()

    Prints a user-readable version of this Lucene.Net.Search.Filter.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IEnumerable<T>
    IEnumerable
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.