Class ConstantFieldType

java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.ConstantFieldType
Direct Known Subclasses:
TypeFieldMapper.TypeFieldType, TypeFieldType

public abstract class ConstantFieldType extends MappedFieldType
A MappedFieldType that has the same value for all documents. Factory methods for queries are called at rewrite time so they should be cheap. In particular they should not read data from disk or perform a network call. Furthermore they may only return a MatchAllDocsQuery or a MatchNoDocsQuery.