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()protectedTextFieldType(TextFieldMapper.TextFieldType ref)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts, boolean strict)Checks for any conflicts between this field type and other.TextFieldMapper.TextFieldTypeclone()booleanequals(java.lang.Object o)org.apache.lucene.search.QueryexistsQuery(QueryShardContext context)booleanfielddata()IndexFieldData.BuilderfielddataBuilder(java.lang.String fullyQualifiedIndexName)Return a fielddata builder for this fielddoublefielddataMaxFrequency()doublefielddataMinFrequency()intfielddataMinSegmentSize()org.elasticsearch.index.mapper.TextFieldMapper.PrefixFieldTypegetPrefixFieldType()inthashCode()protected org.apache.lucene.util.BytesRefindexedValueForSearch(java.lang.Object value)Returns the indexed value used to construct search "values".org.apache.lucene.search.QuerymultiPhraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements)org.apache.lucene.search.QuerynullValueQuery()org.apache.lucene.search.QueryphraseQuery(java.lang.String field, org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePosIncrements)org.apache.lucene.search.QueryprefixQuery(java.lang.String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)voidsetFielddata(boolean fielddata)voidsetFielddataMaxFrequency(double fielddataMaxFrequency)voidsetFielddataMinFrequency(double fielddataMinFrequency)voidsetFielddataMinSegmentSize(int fielddataMinSegmentSize)org.apache.lucene.search.QuerytermQuery(java.lang.Object value, QueryShardContext context)Generates a query that will only match documents that contain the given value.java.lang.StringtypeName()Returns the name of this type, as would be specified in mapping properties-
Methods inherited from class org.apache.lucene.document.FieldType
checkIfFrozen, docValuesType, freeze, indexOptions, omitNorms, pointDimensionCount, pointNumBytes, setDimensions, setDocValuesType, setIndexOptions, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
-
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 java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class org.elasticsearch.index.mapper.SimpleMappedFieldType
rangeQuery
-
Methods inherited from class org.elasticsearch.index.mapper.StringFieldType
fuzzyQuery, rangeQuery, regexpQuery, termsQuery
-
-
-
-
Constructor Detail
-
TextFieldType
public TextFieldType()
-
TextFieldType
protected TextFieldType(TextFieldMapper.TextFieldType ref)
-
-
Method Detail
-
clone
public TextFieldMapper.TextFieldType clone()
- Specified by:
clonein classMappedFieldType
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classMappedFieldType
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMappedFieldType
-
checkCompatibility
public void checkCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts, boolean strict)
Description copied from class:MappedFieldTypeChecks 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:
checkCompatibilityin 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:MappedFieldTypeReturns the name of this type, as would be specified in mapping properties- Specified by:
typeNamein classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(java.lang.String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)- Overrides:
prefixQueryin classStringFieldType
-
existsQuery
public org.apache.lucene.search.Query existsQuery(QueryShardContext context)
- Specified by:
existsQueryin classMappedFieldType
-
nullValueQuery
public org.apache.lucene.search.Query nullValueQuery()
- Overrides:
nullValueQueryin 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:
phraseQueryin 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:
multiPhraseQueryin classStringFieldType- Throws:
java.io.IOException
-
fielddataBuilder
public IndexFieldData.Builder fielddataBuilder(java.lang.String fullyQualifiedIndexName)
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 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 astermQuery(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:MappedFieldTypeGenerates a query that will only match documents that contain the given value. The default implementation returns aTermQueryover the value bytes, boosted byMappedFieldType.boost().- Specified by:
termQueryin classMappedFieldType
-
-