Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class NumericQueryNode

    This query node represents a field query that holds a numeric value. It is similar to FieldQueryNode, however the Value returns an object representing a .NET numeric type.

    Inheritance
    object
    QueryNode
    NumericQueryNode
    Implements
    IFieldValuePairQueryNode<Number>
    IFieldableNode
    IValueQueryNode<Number>
    IQueryNode
    Inherited Members
    QueryNode.PLAINTEXT_FIELD_NAME
    QueryNode.Allocate()
    QueryNode.Add(IQueryNode)
    QueryNode.Add(IList<IQueryNode>)
    QueryNode.IsLeaf
    QueryNode.Set(IList<IQueryNode>)
    QueryNode.CloneTree()
    QueryNode.Clone()
    QueryNode.GetChildren()
    QueryNode.SetTag(string, object)
    QueryNode.UnsetTag(string)
    QueryNode.ContainsTag(string)
    QueryNode.GetTag(string)
    QueryNode.TryGetTag(string, out object)
    QueryNode.Parent
    QueryNode.IsRoot
    QueryNode.m_toQueryStringIgnoreFields
    QueryNode.IsDefaultField(string)
    QueryNode.TagMap
    QueryNode.RemoveChildren(IQueryNode)
    QueryNode.RemoveFromParent()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Nodes
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class NumericQueryNode : QueryNode, IFieldValuePairQueryNode<Number>, IFieldableNode, IValueQueryNode<Number>, IQueryNode

    Constructors

    NumericQueryNode(string, Number, NumberFormat)

    Creates a NumericQueryNode object using the given field, object (representing a .NET numeric type) value and Lucene.Net.Util.NumberFormat used to convert the value to string.

    Declaration
    public NumericQueryNode(string field, Number value, NumberFormat numberFormat)
    Parameters
    Type Name Description
    string field

    the field associated with this query node

    Number value

    the value hold by this node

    NumberFormat numberFormat

    the Lucene.Net.Util.NumberFormat used to convert the value to string

    See Also
    NumericConfig

    Properties

    Field

    Gets or Sets the field associated with this node.

    Declaration
    public virtual string Field { get; set; }
    Property Value
    Type Description
    string
    See Also
    NumericConfig

    NumberFormat

    Gets or Sets the Lucene.Net.Util.NumberFormat used to convert the value to string.

    Declaration
    public virtual NumberFormat NumberFormat { get; set; }
    Property Value
    Type Description
    NumberFormat
    See Also
    NumericConfig

    Value

    Gets or Sets the numeric value as a J2N.Numerics.Number.

    Declaration
    public virtual Number Value { get; set; }
    Property Value
    Type Description
    Number
    See Also
    NumericConfig

    Methods

    GetTermEscaped(IEscapeQuerySyntax)

    This method is used to get the value converted to string and escaped using the given IEscapeQuerySyntax.

    Declaration
    protected string GetTermEscaped(IEscapeQuerySyntax escaper)
    Parameters
    Type Name Description
    IEscapeQuerySyntax escaper

    The IEscapeQuerySyntax used to escape the value string

    Returns
    Type Description
    string

    The value converted to string and escaped

    See Also
    NumericConfig

    ToQueryString(IEscapeQuerySyntax)

    convert to a query string understood by the query parser

    Declaration
    public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
    Parameters
    Type Name Description
    IEscapeQuerySyntax escapeSyntaxParser
    Returns
    Type Description
    string
    Overrides
    QueryNode.ToQueryString(IEscapeQuerySyntax)
    See Also
    NumericConfig

    ToString()

    Every implementation of this class should return pseudo xml like this:

    For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    QueryNode.ToString()
    See Also
    ToString()

    Implements

    IFieldValuePairQueryNode<T>
    IFieldableNode
    IValueQueryNode<T>
    IQueryNode

    See Also

    NumericConfig
    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.