org.apache.lucene.index.IndexableFieldType
public static final class DateFieldMapper.DateFieldType extends MappedFieldType
MappedFieldType.Relation
Modifier and Type | Field | Description |
---|---|---|
protected DateMathParser |
dateMathParser |
|
protected FormatDateTimeFormatter |
dateTimeFormatter |
Modifier and Type | Method | Description |
---|---|---|
void |
checkCompatibility(MappedFieldType fieldType,
java.util.List<java.lang.String> conflicts,
boolean strict) |
Checks for any conflicts between this field type and other.
|
MappedFieldType |
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) |
|
org.apache.lucene.search.Query |
existsQuery(QueryShardContext context) |
|
IndexFieldData.Builder |
fielddataBuilder(java.lang.String fullyQualifiedIndexName) |
Return a fielddata builder for this field
|
int |
hashCode() |
|
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. |
long |
parseToMilliseconds(java.lang.Object value,
boolean roundUp,
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,
ShapeRelation relation,
org.joda.time.DateTimeZone timeZone,
DateMathParser forcedDateParser,
QueryShardContext context) |
Factory method for range queries.
|
void |
setDateTimeFormatter(FormatDateTimeFormatter 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 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.
|
checkIfFrozen, docValuesType, freeze, indexOptions, omitNorms, pointDimensionCount, pointNumBytes, setDimensions, setDocValuesType, setIndexOptions, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
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, similarity, termsQuery
protected FormatDateTimeFormatter dateTimeFormatter
protected DateMathParser dateMathParser
public MappedFieldType clone()
clone
in class MappedFieldType
public boolean equals(java.lang.Object o)
equals
in class MappedFieldType
public int hashCode()
hashCode
in class MappedFieldType
public java.lang.String typeName()
MappedFieldType
typeName
in class MappedFieldType
public void checkCompatibility(MappedFieldType fieldType, java.util.List<java.lang.String> conflicts, boolean strict)
MappedFieldType
checkCompatibility
in class MappedFieldType
public FormatDateTimeFormatter dateTimeFormatter()
public void setDateTimeFormatter(FormatDateTimeFormatter dateTimeFormatter)
protected DateMathParser dateMathParser()
public org.apache.lucene.search.Query existsQuery(QueryShardContext context)
existsQuery
in class MappedFieldType
public org.apache.lucene.search.Query termQuery(java.lang.Object value, @Nullable QueryShardContext context)
MappedFieldType
TermQuery
over the value bytes,
boosted by MappedFieldType.boost()
.termQuery
in class MappedFieldType
public org.apache.lucene.search.Query rangeQuery(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper, ShapeRelation relation, @Nullable org.joda.time.DateTimeZone timeZone, @Nullable DateMathParser forcedDateParser, QueryShardContext context)
MappedFieldType
rangeQuery
in class MappedFieldType
relation
- the relation, nulls should be interpreted like INTERSECTSpublic long parseToMilliseconds(java.lang.Object value, boolean roundUp, @Nullable org.joda.time.DateTimeZone zone, @Nullable DateMathParser forcedDateParser, QueryRewriteContext 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
MappedFieldType
IndexReader
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 MappedFieldType
java.io.IOException
public IndexFieldData.Builder fielddataBuilder(java.lang.String fullyQualifiedIndexName)
MappedFieldType
fielddataBuilder
in class MappedFieldType
fullyQualifiedIndexName
- the name of the index this field-data is build forpublic java.lang.Object valueForDisplay(java.lang.Object value)
MappedFieldType
valueForDisplay
in class MappedFieldType
public DocValueFormat docValueFormat(@Nullable java.lang.String format, org.joda.time.DateTimeZone timeZone)
MappedFieldType
DocValueFormat
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 MappedFieldType