Show / Hide Table of Contents

    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 BooleanQuery with many "should" TermQuerys)

    Inheritance
    System.Object
    Filter
    TermsFilter
    Inherited Members
    Lucene.Net.Search.Filter.NewAnonymous(Func<, , >)
    Namespace: Lucene.Net.Queries
    Assembly: Lucene.Net.Queries.dll
    Syntax
    public sealed class TermsFilter : Filter

    Constructors

    | Improve this Doc View Source

    TermsFilter(IList<Term>)

    Creates a new TermsFilter from the given list. The list can contain duplicate terms and multiple fields.

    Declaration
    public TermsFilter(IList<Term> terms)
    Parameters
    Type Name Description
    IList<Term> terms
    | Improve this Doc View Source

    TermsFilter(Term[])

    Creates a new TermsFilter from the given array. The array can contain duplicate terms and multiple fields.

    Declaration
    public TermsFilter(params Term[] terms)
    Parameters
    Type Name Description
    Term[] terms
    | Improve this Doc View Source

    TermsFilter(String, IList<BytesRef>)

    Creates a new TermsFilter from the given BytesRef list for a single field.

    Declaration
    public TermsFilter(string field, IList<BytesRef> terms)
    Parameters
    Type Name Description
    System.String field
    IList<BytesRef> terms
    | Improve this Doc View Source

    TermsFilter(String, BytesRef[])

    Creates a new TermsFilter from the given BytesRef array for a single field.

    Declaration
    public TermsFilter(string field, params BytesRef[] terms)
    Parameters
    Type Name Description
    System.String field
    BytesRef[] terms

    Methods

    | 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
    | Improve this Doc View Source

    GetDocIdSet(AtomicReaderContext, IBits)

    Declaration
    public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
    Parameters
    Type Name Description
    AtomicReaderContext context
    IBits acceptDocs
    Returns
    Type Description
    DocIdSet
    Overrides
    Filter.GetDocIdSet(AtomicReaderContext, IBits)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)