Enum Class NumberFieldMapper.NumberType

java.lang.Object
java.lang.Enum<NumberFieldMapper.NumberType>
org.elasticsearch.index.mapper.NumberFieldMapper.NumberType
All Implemented Interfaces:
Serializable, Comparable<NumberFieldMapper.NumberType>, Constable
Enclosing class:
NumberFieldMapper

public static enum NumberFieldMapper.NumberType extends Enum<NumberFieldMapper.NumberType>
  • Enum Constant Details

  • Method Details

    • values

      public static NumberFieldMapper.NumberType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static NumberFieldMapper.NumberType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • typeName

      public final String typeName()
      Get the associated type name.
    • numericType

      public final IndexNumericFieldData.NumericType numericType()
      Get the associated numeric type
    • parser

      public final FieldMapper.TypeParser parser()
    • termQuery

      public abstract org.apache.lucene.search.Query termQuery(String field, Object value)
    • termsQuery

      public abstract org.apache.lucene.search.Query termsQuery(String field, Collection<?> values)
    • rangeQuery

      public abstract org.apache.lucene.search.Query rangeQuery(String field, Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, boolean hasDocValues, SearchExecutionContext context)
    • parse

      public abstract Number parse(org.elasticsearch.common.xcontent.XContentParser parser, boolean coerce) throws IOException
      Throws:
      IOException
    • parse

      public abstract Number parse(Object value, boolean coerce)
    • parsePoint

      public abstract Number parsePoint(byte[] value)
    • createFields

      public abstract List<org.apache.lucene.document.Field> createFields(String name, Number value, boolean indexed, boolean docValued, boolean stored)
    • compile

      public FieldValues<Number> compile(String fieldName, Script script, ScriptCompiler compiler)
    • hasDecimalPart

      public static boolean hasDecimalPart(Object number)
      Returns true if the object is a number and has a decimal part
    • objectToDouble

      public static double objectToDouble(Object value)
      Converts an Object to a double by checking it against known types first
    • objectToLong

      public static long objectToLong(Object value, boolean coerce)
      Converts an Object to a long by checking it against known types and checking its range.
    • doubleRangeQuery

      public static org.apache.lucene.search.Query doubleRangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, BiFunction<Double,Double,org.apache.lucene.search.Query> builder)
    • longRangeQuery

      public static org.apache.lucene.search.Query longRangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, BiFunction<Long,Long,org.apache.lucene.search.Query> builder)
      Processes query bounds into longs and delegates the provided builder to build a range query.