Package org.elasticsearch.index.mapper
Enum Class NumberFieldMapper.NumberType
<NumberFieldMapper.NumberType>
org.elasticsearch.index.mapper.NumberFieldMapper.NumberType
- All Implemented Interfaces:
,
<
- Enclosing class:
- NumberFieldMapper
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.
< extends <>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescription>
fieldName, Script script, ScriptCompiler compiler)
abstract <org.apache.lucene.document.Field>
name, value, boolean indexed, boolean docValued, boolean stored)
static org.apache.lucene.search.Query
lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, <,,org.apache.lucene.search.Query> builder)
static boolean
number)
Returns true if the object is a number and has a decimal partstatic org.apache.lucene.search.Query
lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, <,,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
value)
Converts an Object to a double by checking it against known types firststatic long
value, boolean coerce)
Converts an Object to along
by checking it against known types and checking its range.abstract
value, boolean coerce)
abstract
parse(org.elasticsearch.common.xcontent.XContentParser parser, boolean coerce)
abstract
parsePoint(byte[] value)
parser()
abstract org.apache.lucene.search.Query
field, lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, boolean hasDocValues, SearchExecutionContext context)
abstract org.apache.lucene.search.Query
field, value)
abstract org.apache.lucene.search.Query
field, <?> values)
typeName()
Get the associated type name.static NumberFieldMapper.NumberType
name)
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.Methods inherited from class java.lang.
, , , , , , , , , ,
Methods inherited from class java.lang.
, , , , ,
-
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
public static 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:
- if this enum class has no constant with the specified name
- if the argument is null
-
typeName
public final typeName()Get the associated type name. -
numericType
Get the associated numeric type -
parser
-
termQuery
public abstract org.apache.lucene.search.Query termQuery( field, value) -
termsQuery
public abstract org.apache.lucene.search.Query termsQuery( field, <?> values) -
rangeQuery
public abstract org.apache.lucene.search.Query rangeQuery( field, lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, boolean hasDocValues, SearchExecutionContext context) -
parse
public abstract parse(org.elasticsearch.common.xcontent.XContentParser parser, boolean coerce) throws- Throws:
-
parse
public abstract parse( value, boolean coerce) -
parsePoint
public abstract parsePoint(byte[] value) -
createFields
public abstract <org.apache.lucene.document.Field> createFields( name, value, boolean indexed, boolean docValued, boolean stored) -
compile
-
hasDecimalPart
public static boolean hasDecimalPart( number)Returns true if the object is a number and has a decimal part -
objectToDouble
public static double objectToDouble( value)Converts an Object to a double by checking it against known types first -
objectToLong
public static long objectToLong( value, boolean coerce)Converts an Object to along
by checking it against known types and checking its range. -
doubleRangeQuery
public static org.apache.lucene.search.Query doubleRangeQuery( lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, <,,org.apache.lucene.search.Query> builder) -
longRangeQuery
public static org.apache.lucene.search.Query longRangeQuery( lowerTerm, upperTerm, boolean includeLower, boolean includeUpper, <,,org.apache.lucene.search.Query> builder)Processes query bounds intolong
s and delegates the providedbuilder
to build a range query.
-