Package org.elasticsearch.index.mapper
Class TextFieldMapper.TextFieldType
- java.lang.Object
-
- org.apache.lucene.document.FieldType
-
- org.elasticsearch.index.mapper.MappedFieldType
-
- org.elasticsearch.index.mapper.SimpleMappedFieldType
-
- org.elasticsearch.index.mapper.StringFieldType
-
- org.elasticsearch.index.mapper.TextFieldMapper.TextFieldType
-
- All Implemented Interfaces:
org.apache.lucene.index.IndexableFieldType
- Enclosing class:
- TextFieldMapper
public static final class TextFieldMapper.TextFieldType extends StringFieldType
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.Relation
-
-
Constructor Summary
Constructors Modifier Constructor Description TextFieldType()
protected
TextFieldType(TextFieldMapper.TextFieldType ref)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts, boolean strict)
Checks for any conflicts between this field type and other.TextFieldMapper.TextFieldType
clone()
boolean
equals(java.lang.Object o)
org.apache.lucene.search.Query
existsQuery(QueryShardContext context)
boolean
fielddata()
IndexFieldData.Builder
fielddataBuilder(java.lang.String fullyQualifiedIndexName)
Return a fielddata builder for this fielddouble
fielddataMaxFrequency()
double
fielddataMinFrequency()
int
fielddataMinSegmentSize()
org.elasticsearch.index.mapper.TextFieldMapper.PrefixFieldType
getPrefixFieldType()
int
hashCode()
protected org.apache.lucene.util.BytesRef
indexedValueForSearch(java.lang.Object value)
Returns the indexed value used to construct search "values".org.apache.lucene.search.Query
multiPhraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements)
org.apache.lucene.search.Query
nullValueQuery()
org.apache.lucene.search.Query
phraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePosIncrements)
org.apache.lucene.search.Query
prefixQuery(java.lang.String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)
void
setFielddata(boolean fielddata)
void
setFielddataMaxFrequency(double fielddataMaxFrequency)
void
setFielddataMinFrequency(double fielddataMinFrequency)
void
setFielddataMinSegmentSize(int fielddataMinSegmentSize)
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-
Methods inherited from class org.elasticsearch.index.mapper.StringFieldType
fuzzyQuery, rangeQuery, regexpQuery, termsQuery, wildcardQuery
-
Methods inherited from class org.elasticsearch.index.mapper.SimpleMappedFieldType
rangeQuery
-
Methods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, docValueFormat, eagerGlobalOrdinals, extractTerm, failIfNoDocValues, failIfNotIndexed, hasDocValues, indexAnalyzer, isAggregatable, isFieldWithinQuery, isSearchable, name, nullValue, nullValueAsString, queryStringTermQuery, searchAnalyzer, searchQuoteAnalyzer, setBoost, setEagerGlobalOrdinals, setHasDocValues, setIndexAnalyzer, setName, setNullValue, setSearchAnalyzer, setSearchQuoteAnalyzer, setSimilarity, similarity, valueForDisplay
-
Methods inherited from class org.apache.lucene.document.FieldType
checkIfFrozen, docValuesType, freeze, indexOptions, omitNorms, pointDataDimensionCount, pointIndexDimensionCount, pointNumBytes, setDimensions, setDimensions, setDocValuesType, setIndexOptions, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
-
-
-
-
Constructor Detail
-
TextFieldType
public TextFieldType()
-
TextFieldType
protected TextFieldType(TextFieldMapper.TextFieldType ref)
-
-
Method Detail
-
clone
public TextFieldMapper.TextFieldType clone()
- Specified by:
clone
in classMappedFieldType
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classMappedFieldType
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classMappedFieldType
-
checkCompatibility
public void checkCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts, boolean strict)
Description copied from class:MappedFieldType
Checks for any conflicts between this field type and other. If strict is true, all properties must be equal. Otherwise, only properties which must never change in an index are checked.- Overrides:
checkCompatibility
in classMappedFieldType
-
fielddata
public boolean fielddata()
-
setFielddata
public void setFielddata(boolean fielddata)
-
fielddataMinFrequency
public double fielddataMinFrequency()
-
setFielddataMinFrequency
public void setFielddataMinFrequency(double fielddataMinFrequency)
-
fielddataMaxFrequency
public double fielddataMaxFrequency()
-
setFielddataMaxFrequency
public void setFielddataMaxFrequency(double fielddataMaxFrequency)
-
fielddataMinSegmentSize
public int fielddataMinSegmentSize()
-
setFielddataMinSegmentSize
public void setFielddataMinSegmentSize(int fielddataMinSegmentSize)
-
getPrefixFieldType
public org.elasticsearch.index.mapper.TextFieldMapper.PrefixFieldType getPrefixFieldType()
-
typeName
public java.lang.String typeName()
Description copied from class:MappedFieldType
Returns the name of this type, as would be specified in mapping properties- Specified by:
typeName
in classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(java.lang.String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)
- Overrides:
prefixQuery
in classStringFieldType
-
existsQuery
public org.apache.lucene.search.Query existsQuery(QueryShardContext context)
- Specified by:
existsQuery
in classMappedFieldType
-
nullValueQuery
public org.apache.lucene.search.Query nullValueQuery()
- Overrides:
nullValueQuery
in classMappedFieldType
-
phraseQuery
public org.apache.lucene.search.Query phraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePosIncrements) throws java.io.IOException
- Overrides:
phraseQuery
in classStringFieldType
- Throws:
java.io.IOException
-
multiPhraseQuery
public org.apache.lucene.search.Query multiPhraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements) throws java.io.IOException
- Overrides:
multiPhraseQuery
in classStringFieldType
- Throws:
java.io.IOException
-
fielddataBuilder
public IndexFieldData.Builder fielddataBuilder(java.lang.String fullyQualifiedIndexName)
Description copied from class:MappedFieldType
Return a fielddata builder for this field- Overrides:
fielddataBuilder
in classMappedFieldType
- Parameters:
fullyQualifiedIndexName
- the name of the index this field-data is build for
-
indexedValueForSearch
protected org.apache.lucene.util.BytesRef indexedValueForSearch(java.lang.Object value)
Returns the indexed value used to construct search "values". This method is used for the default implementations of most query factory methods such asMappedFieldType.termQuery(java.lang.Object, org.elasticsearch.index.query.QueryShardContext)
.
-
termQuery
public org.apache.lucene.search.Query termQuery(java.lang.Object value, QueryShardContext context)
Description copied from class:MappedFieldType
Generates a query that will only match documents that contain the given value. The default implementation returns aTermQuery
over the value bytes, boosted byMappedFieldType.boost()
.- Specified by:
termQuery
in classMappedFieldType
-
-