Package org.elasticsearch.index.mapper
Class RangeFieldMapper.RangeFieldType
java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.RangeFieldMapper.RangeFieldType
- 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 DateMathParserdateMathParserprotected DateFormatterdateTimeFormatterprotected RangeTyperangeType -
Constructor Summary
Constructors Constructor Description RangeFieldType(java.lang.String name, boolean indexed, boolean hasDocValues, DateFormatter formatter, java.util.Map<java.lang.String,java.lang.String> meta)RangeFieldType(java.lang.String name, DateFormatter formatter)RangeFieldType(java.lang.String name, RangeType type)RangeFieldType(java.lang.String name, RangeType type, boolean indexed, boolean hasDocValues, java.util.Map<java.lang.String,java.lang.String> meta) -
Method Summary
Modifier and Type Method Description protected DateMathParserdateMathParser()DateFormatterdateTimeFormatter()DocValueFormatdocValueFormat(java.lang.String format, java.time.ZoneId timeZone)Return aDocValueFormatthat can be used to display and parse values as returned by the fielddata API.org.apache.lucene.search.QueryexistsQuery(QueryShardContext context)IndexFieldData.BuilderfielddataBuilder(java.lang.String fullyQualifiedIndexName)Return a fielddata builder for this fieldorg.apache.lucene.search.QueryrangeQuery(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.RangeTyperangeType()org.apache.lucene.search.QuerytermQuery(java.lang.Object value, QueryShardContext context)Generates a query that will only match documents that contain the given value.java.lang.StringtypeName()Returns the name of this type, as would be specified in mapping propertiesMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, familyTypeName, fuzzyQuery, getTextSearchInfo, hasDocValues, indexAnalyzer, intervals, isAggregatable, isFieldWithinQuery, isSearchable, meta, multiPhraseQuery, name, phrasePrefixQuery, phraseQuery, pointReaderIfPossible, prefixQuery, regexpQuery, setBoost, setEagerGlobalOrdinals, setIndexAnalyzer, spanPrefixQuery, termsQuery, updateMeta, valueForDisplay, wildcardQuery
-
Field Details
-
Constructor Details
-
RangeFieldType
public RangeFieldType(java.lang.String name, RangeType type, boolean indexed, boolean hasDocValues, java.util.Map<java.lang.String,java.lang.String> meta) -
RangeFieldType
-
RangeFieldType
public RangeFieldType(java.lang.String name, boolean indexed, boolean hasDocValues, DateFormatter formatter, java.util.Map<java.lang.String,java.lang.String> meta) -
RangeFieldType
-
-
Method Details
-
rangeType
-
fielddataBuilder
Description copied from class:MappedFieldTypeReturn a fielddata builder for this field- Overrides:
fielddataBuilderin classMappedFieldType- Parameters:
fullyQualifiedIndexName- the name of the index this field-data is build for
-
typeName
public java.lang.String typeName()Description copied from class:MappedFieldTypeReturns the name of this type, as would be specified in mapping properties- Specified by:
typeNamein classMappedFieldType
-
dateTimeFormatter
-
dateMathParser
-
existsQuery
- Specified by:
existsQueryin classMappedFieldType
-
docValueFormat
Description copied from class:MappedFieldTypeReturn aDocValueFormatthat can be used to display and parse values as returned by the fielddata API. The default implementation returns aDocValueFormat.RAW.- Overrides:
docValueFormatin classMappedFieldType
-
termQuery
Description copied from class:MappedFieldTypeGenerates a query that will only match documents that contain the given value. The default implementation returns aTermQueryover the value bytes, boosted byMappedFieldType.boost().- Specified by:
termQueryin 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:MappedFieldTypeFactory method for range queries.- Overrides:
rangeQueryin classMappedFieldTyperelation- the relation, nulls should be interpreted like INTERSECTS
-