public static class LegacyDateFieldMapper.DateFieldType extends LegacyNumberFieldMapper.NumberFieldType
MappedFieldType.Relation| Modifier and Type | Field and Description |
|---|---|
protected DateMathParser |
dateMathParser |
protected FormatDateTimeFormatter |
dateTimeFormatter |
protected java.util.concurrent.TimeUnit |
timeUnit |
| Modifier | Constructor and Description |
|---|---|
|
DateFieldType() |
protected |
DateFieldType(LegacyDateFieldMapper.DateFieldType ref) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkCompatibility(MappedFieldType fieldType,
java.util.List<java.lang.String> conflicts,
boolean strict)
Checks for any conflicts between this field type and other.
|
LegacyDateFieldMapper.DateFieldType |
clone() |
protected DateMathParser |
dateMathParser() |
FormatDateTimeFormatter |
dateTimeFormatter() |
DocValueFormat |
docValueFormat(java.lang.String format,
org.joda.time.DateTimeZone timeZone)
Return a
DocValueFormat that can be used to display and parse
values as returned by the fielddata API. |
boolean |
equals(java.lang.Object o) |
IndexFieldData.Builder |
fielddataBuilder()
Return a fielddata builder for this field
|
int |
hashCode() |
org.apache.lucene.util.BytesRef |
indexedValueForSearch(java.lang.Object value)
Returns the indexed value used to construct search "values".
|
MappedFieldType.Relation |
isFieldWithinQuery(org.apache.lucene.index.IndexReader reader,
java.lang.Object from,
java.lang.Object to,
boolean includeLower,
boolean includeUpper,
org.joda.time.DateTimeZone timeZone,
DateMathParser dateParser,
QueryRewriteContext context)
Return whether all values of the given
IndexReader are within the range,
outside the range or cross the range. |
protected long |
parseStringValue(java.lang.String value) |
long |
parseToMilliseconds(java.lang.Object value,
boolean inclusive,
org.joda.time.DateTimeZone zone,
DateMathParser forcedDateParser,
QueryRewriteContext context) |
org.apache.lucene.search.Query |
rangeQuery(java.lang.Object lowerTerm,
java.lang.Object upperTerm,
boolean includeLower,
boolean includeUpper,
org.joda.time.DateTimeZone timeZone,
DateMathParser forcedDateParser,
QueryShardContext context) |
org.apache.lucene.search.Query |
rangeQuery(java.lang.Object lowerTerm,
java.lang.Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryShardContext context) |
void |
setDateTimeFormatter(FormatDateTimeFormatter dateTimeFormatter) |
void |
setTimeUnit(java.util.concurrent.TimeUnit timeUnit) |
FieldStats.Date |
stats(org.apache.lucene.index.IndexReader reader) |
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.
|
org.apache.lucene.search.Query |
termsQuery(java.util.List<?> values,
QueryShardContext context)
Build a constant-scoring query that matches all values.
|
java.util.concurrent.TimeUnit |
timeUnit() |
java.lang.String |
typeName()
Returns the name of this type, as would be specified in mapping properties
|
java.lang.Object |
valueForDisplay(java.lang.Object value)
Given a value that comes from the stored fields API, convert it to the
expected type.
|
boost, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, fuzzyQuery, hasDocValues, indexAnalyzer, isAggregatable, isSearchable, name, nullValue, nullValueAsString, nullValueQuery, prefixQuery, queryStringTermQuery, regexpQuery, searchAnalyzer, searchQuoteAnalyzer, setBoost, setEagerGlobalOrdinals, setHasDocValues, setIndexAnalyzer, setName, setNullValue, setSearchAnalyzer, setSearchQuoteAnalyzer, setSimilarity, similaritycheckIfFrozen, docValuesType, freeze, indexOptions, numericPrecisionStep, numericType, omitNorms, pointDimensionCount, pointNumBytes, setDimensions, setDocValuesType, setIndexOptions, setNumericPrecisionStep, setNumericType, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toStringprotected FormatDateTimeFormatter dateTimeFormatter
protected java.util.concurrent.TimeUnit timeUnit
protected DateMathParser dateMathParser
public DateFieldType()
protected DateFieldType(LegacyDateFieldMapper.DateFieldType ref)
public LegacyDateFieldMapper.DateFieldType clone()
clone in class LegacyNumberFieldMapper.NumberFieldTypepublic boolean equals(java.lang.Object o)
equals in class MappedFieldTypepublic int hashCode()
hashCode in class MappedFieldTypepublic java.lang.String typeName()
MappedFieldTypetypeName in class MappedFieldTypepublic void checkCompatibility(MappedFieldType fieldType, java.util.List<java.lang.String> conflicts, boolean strict)
MappedFieldTypecheckCompatibility in class LegacyNumberFieldMapper.NumberFieldTypepublic FormatDateTimeFormatter dateTimeFormatter()
public void setDateTimeFormatter(FormatDateTimeFormatter dateTimeFormatter)
public java.util.concurrent.TimeUnit timeUnit()
public void setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
protected DateMathParser dateMathParser()
protected long parseStringValue(java.lang.String value)
public org.apache.lucene.util.BytesRef indexedValueForSearch(java.lang.Object value)
termQuery(java.lang.Object, org.elasticsearch.index.query.QueryShardContext).public java.lang.Object valueForDisplay(java.lang.Object value)
MappedFieldTypevalueForDisplay in class MappedFieldTypepublic org.apache.lucene.search.Query rangeQuery(java.lang.Object lowerTerm,
java.lang.Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryShardContext context)
rangeQuery in class MappedFieldTypepublic FieldStats.Date stats(org.apache.lucene.index.IndexReader reader) throws java.io.IOException
stats in class MappedFieldTypeFieldStats instance that maps to the type of this
field or null if the provided index has no stats about the
current fieldjava.io.IOExceptionpublic org.apache.lucene.search.Query rangeQuery(java.lang.Object lowerTerm,
java.lang.Object upperTerm,
boolean includeLower,
boolean includeUpper,
@Nullable
org.joda.time.DateTimeZone timeZone,
@Nullable
DateMathParser forcedDateParser,
QueryShardContext context)
public MappedFieldType.Relation isFieldWithinQuery(org.apache.lucene.index.IndexReader reader, java.lang.Object from, java.lang.Object to, boolean includeLower, boolean includeUpper, org.joda.time.DateTimeZone timeZone, DateMathParser dateParser, QueryRewriteContext context) throws java.io.IOException
MappedFieldTypeIndexReader are within the range,
outside the range or cross the range. The default implementation returns
MappedFieldType.Relation.INTERSECTS, which is always fine to return when there is
no way to check whether values are actually within bounds.isFieldWithinQuery in class MappedFieldTypejava.io.IOExceptionpublic long parseToMilliseconds(java.lang.Object value,
boolean inclusive,
@Nullable
org.joda.time.DateTimeZone zone,
@Nullable
DateMathParser forcedDateParser,
QueryRewriteContext context)
public IndexFieldData.Builder fielddataBuilder()
MappedFieldTypefielddataBuilder in class MappedFieldTypepublic DocValueFormat docValueFormat(@Nullable java.lang.String format, org.joda.time.DateTimeZone timeZone)
MappedFieldTypeDocValueFormat that can be used to display and parse
values as returned by the fielddata API.
The default implementation returns a DocValueFormat.RAW.docValueFormat in class LegacyNumberFieldMapper.NumberFieldTypepublic org.apache.lucene.search.Query termQuery(java.lang.Object value,
QueryShardContext context)
MappedFieldTypeTermQuery over the value bytes,
boosted by MappedFieldType.boost().termQuery in class MappedFieldTypepublic org.apache.lucene.search.Query termsQuery(java.util.List<?> values,
QueryShardContext context)
MappedFieldTypeConstantScoreQuery around a BooleanQuery whose BooleanClause.Occur.SHOULD clauses
are generated with MappedFieldType.termQuery(java.lang.Object, org.elasticsearch.index.query.QueryShardContext).termsQuery in class MappedFieldType