Package org.elasticsearch.index.mapper
Class TypeFieldType
java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.ConstantFieldType
org.elasticsearch.index.mapper.TypeFieldType
public final class TypeFieldType extends ConstantFieldType
Mediates access to the deprecated _type field
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.CollapseType, MappedFieldType.Relation -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONTENT_TYPEstatic java.lang.StringNAMEstatic java.lang.StringTYPES_V7_DEPRECATION_MESSAGE -
Method Summary
Modifier and Type Method Description org.apache.lucene.search.QueryexistsQuery(SearchExecutionContext context)IndexFieldData.BuilderfielddataBuilder(java.lang.String fullyQualifiedIndexName, java.util.function.Supplier<SearchLookup> searchLookup)Return a fielddata builder for this fieldjava.lang.StringgetType()Returns the name of the current typeprotected booleanmatches(java.lang.String pattern, boolean caseInsensitive, SearchExecutionContext context)Return whether the constant value of this field matches the providedpatternas documented inRegex.simpleMatch(java.lang.String, java.lang.String).java.lang.StringtypeName()Returns the name of this type, as would be specified in mapping propertiesValueFetchervalueFetcher(SearchExecutionContext context, java.lang.String format)Create a helper class to fetch field values during theFetchFieldsPhase.Methods inherited from class org.elasticsearch.index.mapper.ConstantFieldType
isAggregatable, isSearchable, prefixQuery, termQuery, termQueryCaseInsensitive, termsQuery, wildcardQueryMethods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, collapseType, distanceFeatureQuery, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, familyTypeName, fuzzyQuery, getTextSearchInfo, hasDocValues, intervals, isFieldWithinQuery, isStored, meta, multiPhraseQuery, name, phrasePrefixQuery, phraseQuery, pointReaderIfPossible, prefixQuery, rangeQuery, regexpQuery, setBoost, setEagerGlobalOrdinals, spanPrefixQuery, valueForDisplay, wildcardQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TYPES_V7_DEPRECATION_MESSAGE
public static final java.lang.String TYPES_V7_DEPRECATION_MESSAGE- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME- See Also:
- Constant Field Values
-
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE- See Also:
- Constant Field Values
-
-
Method Details
-
getType
public java.lang.String getType()Returns the name of the current type -
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
-
existsQuery
- Overrides:
existsQueryin classMappedFieldType
-
fielddataBuilder
public IndexFieldData.Builder fielddataBuilder(java.lang.String fullyQualifiedIndexName, java.util.function.Supplier<SearchLookup> searchLookup)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 forsearchLookup- aSearchLookupsupplier to allow for accessing other fields values in the context of runtime fields
-
valueFetcher
Description copied from class:MappedFieldTypeCreate a helper class to fetch field values during theFetchFieldsPhase.New field types must implement this method in order to support the search 'fields' option. Except for metadata fields, field types should not throw
UnsupportedOperationExceptionsince this could cause a search retrieving multiple fields (like "fields": ["*"]) to fail.- Specified by:
valueFetcherin classMappedFieldType
-
matches
protected boolean matches(java.lang.String pattern, boolean caseInsensitive, SearchExecutionContext context)Description copied from class:ConstantFieldTypeReturn whether the constant value of this field matches the providedpatternas documented inRegex.simpleMatch(java.lang.String, java.lang.String).- Specified by:
matchesin classConstantFieldType
-