Package org.elasticsearch.index.mapper
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptioncompile(String fieldName, Script script, ScriptCompiler compiler)
abstract List<org.apache.lucene.document.Field>
createFields(String name, Number value, boolean indexed, boolean docValued, boolean stored)
static org.apache.lucene.search.Query
doubleRangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, BiFunction<Double,Double,org.apache.lucene.search.Query> builder)
static boolean
hasDecimalPart(Object number)
Returns true if the object is a number and has a decimal partstatic 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 intolong
s and delegates the providedbuilder
to build a range query.Get the associated numeric typestatic double
objectToDouble(Object value)
Converts an Object to a double by checking it against known types firststatic long
objectToLong(Object value, boolean coerce)
Converts an Object to along
by checking it against known types and checking its range.abstract Number
abstract Number
parse(org.elasticsearch.common.xcontent.XContentParser parser, boolean coerce)
abstract Number
parsePoint(byte[] value)
parser()
abstract org.apache.lucene.search.Query
rangeQuery(String field, Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, boolean hasDocValues, SearchExecutionContext context)
abstract org.apache.lucene.search.Query
abstract org.apache.lucene.search.Query
termsQuery(String field, Collection<?> values)
typeName()
Get the associated type name.static NumberFieldMapper.NumberType
Returns the enum constant of this class with the specified name.static NumberFieldMapper.NumberType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HALF_FLOAT
-
FLOAT
-
DOUBLE
-
BYTE
-
SHORT
-
INTEGER
-
LONG
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
typeName
Get the associated type name. -
numericType
Get the associated numeric type -
parser
-
termQuery
-
termsQuery
-
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
-
parsePoint
-
createFields
-
compile
-
hasDecimalPart
Returns true if the object is a number and has a decimal part -
objectToDouble
Converts an Object to a double by checking it against known types first -
objectToLong
Converts an Object to along
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 intolong
s and delegates the providedbuilder
to build a range query.
-