Package org.elasticsearch.index.mapper
Class RangeFieldMapper.RangeFieldType
java.lang.Object
org.apache.lucene.document.FieldType
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.RangeFieldMapper.RangeFieldType
- All Implemented Interfaces:
org.apache.lucene.index.IndexableFieldType
- Enclosing class:
- RangeFieldMapper
public static final class RangeFieldMapper.RangeFieldType extends MappedFieldType
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.Relation
-
Field Summary
Fields Modifier and Type Field Description protected DateMathParser
dateMathParser
protected DateFormatter
dateTimeFormatter
protected RangeType
rangeType
-
Method Summary
Modifier and Type Method Description MappedFieldType
clone()
protected DateMathParser
dateMathParser()
DateFormatter
dateTimeFormatter()
DocValueFormat
docValueFormat(java.lang.String format, java.time.ZoneId timeZone)
Return aDocValueFormat
that can be used to display and parse values as returned by the fielddata API.boolean
equals(java.lang.Object o)
org.apache.lucene.search.Query
existsQuery(QueryShardContext context)
IndexFieldData.Builder
fielddataBuilder(java.lang.String fullyQualifiedIndexName)
Return a fielddata builder for this fieldValuesSourceType
getValuesSourceType()
Returns theValuesSourceType
which supports this field type.int
hashCode()
org.apache.lucene.search.Query
rangeQuery(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, java.time.ZoneId timeZone, DateMathParser parser, QueryShardContext context)
Factory method for range queries.RangeType
rangeType()
void
setDateTimeFormatter(DateFormatter dateTimeFormatter)
org.apache.lucene.search.Query
termQuery(java.lang.Object value, QueryShardContext context)
Generates a query that will only match documents that contain the given value.java.lang.String
typeName()
Returns the name of this type, as would be specified in mapping propertiesMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, checkCompatibility, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, fuzzyQuery, hasDocValues, indexAnalyzer, intervals, isAggregatable, isFieldWithinQuery, isSearchable, meta, multiPhraseQuery, name, nullValue, nullValueAsString, phrasePrefixQuery, phraseQuery, prefixQuery, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, setBoost, setEagerGlobalOrdinals, setHasDocValues, setIndexAnalyzer, setMeta, setName, setNullValue, setSearchAnalyzer, setSearchQuoteAnalyzer, setSimilarity, similarity, spanPrefixQuery, termsQuery, valueForDisplay, wildcardQuery
Methods inherited from class org.apache.lucene.document.FieldType
checkIfFrozen, docValuesType, freeze, getAttributes, indexOptions, omitNorms, pointDimensionCount, pointIndexDimensionCount, pointNumBytes, putAttribute, setDimensions, setDimensions, setDocValuesType, setIndexOptions, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
-
Field Details
-
Method Details
-
rangeType
-
clone
- Specified by:
clone
in classMappedFieldType
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classMappedFieldType
-
hashCode
public int hashCode()- Overrides:
hashCode
in classMappedFieldType
-
fielddataBuilder
Description copied from class:MappedFieldType
Return a fielddata builder for this field- Overrides:
fielddataBuilder
in classMappedFieldType
- Parameters:
fullyQualifiedIndexName
- the name of the index this field-data is build for
-
getValuesSourceType
Description copied from class:MappedFieldType
Returns theValuesSourceType
which supports this field type. This is tightly coupled to field data and aggregations support, so any implementation that returns a value fromMappedFieldType.fielddataBuilder(java.lang.String)
should also return a value from here.- Overrides:
getValuesSourceType
in classMappedFieldType
- Returns:
- The appropriate
ValuesSourceType
for this field type.
-
typeName
public java.lang.String typeName()Description copied from class:MappedFieldType
Returns the name of this type, as would be specified in mapping properties- Specified by:
typeName
in classMappedFieldType
-
dateTimeFormatter
-
setDateTimeFormatter
-
dateMathParser
-
existsQuery
- Specified by:
existsQuery
in classMappedFieldType
-
docValueFormat
Description copied from class:MappedFieldType
Return aDocValueFormat
that can be used to display and parse values as returned by the fielddata API. The default implementation returns aDocValueFormat.RAW
.- Overrides:
docValueFormat
in classMappedFieldType
-
termQuery
Description copied from class:MappedFieldType
Generates a query that will only match documents that contain the given value. The default implementation returns aTermQuery
over the value bytes, boosted byMappedFieldType.boost()
.- Specified by:
termQuery
in classMappedFieldType
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, java.time.ZoneId timeZone, DateMathParser parser, QueryShardContext context)Description copied from class:MappedFieldType
Factory method for range queries.- Overrides:
rangeQuery
in classMappedFieldType
relation
- the relation, nulls should be interpreted like INTERSECTS
-