Show / Hide Table of Contents

    Class NumericRangeFilterBuilder

    Creates a . The table below specifies the required attributes and the defaults if optional attributes are omitted. For more detail on what each of the attributes actually do, consult the documentation for :

    Attribute nameValuesRequiredDefault
    fieldNameStringYesN/A
    lowerTermSpecified by typeYesN/A
    upperTermSpecified by typeYesN/A
    typeint, long, float, doubleNoint
    includeLowertrue, falseNotrue
    includeUppertrue, falseNotrue
    precisionStepintNo4

    If an error occurs parsing the supplied lowerTerm or upperTerm into the numeric type specified by type, then the error will be silently ignored and the resulting filter will not match any documents.

    Inheritance
    System.Object
    NumericRangeFilterBuilder
    Implements
    IFilterBuilder
    Namespace: Lucene.Net.QueryParsers.Xml.Builders
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class NumericRangeFilterBuilder : object, IFilterBuilder

    Methods

    | Improve this Doc View Source

    GetFilter(XmlElement)

    Declaration
    public virtual Filter GetFilter(XmlElement e)
    Parameters
    Type Name Description
    XmlElement e
    Returns
    Type Description
    Filter
    | Improve this Doc View Source

    SetStrictMode(Boolean)

    Specifies how this NumericRangeFilterBuilder will handle errors.

    If this is set to true, GetFilter(XmlElement) will throw a ParserException if it is unable to parse the lowerTerm or upperTerm into the appropriate numeric type. If this is set to false, then this exception will be silently ignored and the resulting filter will not match any documents.

    Defaults to false.

    Declaration
    public void SetStrictMode(bool strictMode)
    Parameters
    Type Name Description
    System.Boolean strictMode

    Implements

    IFilterBuilder
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)