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
Modifier and Type Method Description voidcheckCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts)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()static booleanhasGaps(org.apache.lucene.analysis.TokenStream stream)inthashCode()protected org.apache.lucene.util.BytesRefindexedValueForSearch(java.lang.Object value)Returns the indexed value used to construct search "values".org.apache.lucene.queries.intervals.IntervalsSourceintervals(java.lang.String text, int maxGaps, boolean ordered, NamedAnalyzer analyzer, boolean prefix)Create anIntervalsSourceto be used for proximity queriesorg.apache.lucene.search.QuerymultiPhraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements)org.apache.lucene.search.QueryphrasePrefixQuery(org.apache.lucene.analysis.TokenStream stream, int slop, int maxExpansions)org.apache.lucene.search.QueryphraseQuery(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.spans.SpanQueryspanPrefixQuery(java.lang.String value, org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod method, QueryShardContext context)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.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, 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, getAttributes, indexOptions, omitNorms, pointDataDimensionCount, pointIndexDimensionCount, pointNumBytes, putAttribute, 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:
clonein classMappedFieldType
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classMappedFieldType
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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
-
spanPrefixQuery
public org.apache.lucene.search.spans.SpanQuery spanPrefixQuery(java.lang.String value, org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod method, QueryShardContext context)- Overrides:
spanPrefixQueryin classMappedFieldType
-
existsQuery
public org.apache.lucene.search.Query existsQuery(QueryShardContext context)
- Specified by:
existsQueryin classMappedFieldType
-
intervals
public org.apache.lucene.queries.intervals.IntervalsSource intervals(java.lang.String text, int maxGaps, boolean ordered, NamedAnalyzer analyzer, boolean prefix) throws java.io.IOExceptionDescription copied from class:MappedFieldTypeCreate anIntervalsSourceto be used for proximity queries- Overrides:
intervalsin classMappedFieldType- Throws:
java.io.IOException
-
phraseQuery
public org.apache.lucene.search.Query phraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePosIncrements) throws java.io.IOException- Overrides:
phraseQueryin classMappedFieldType- Throws:
java.io.IOException
-
multiPhraseQuery
public org.apache.lucene.search.Query multiPhraseQuery(org.apache.lucene.analysis.TokenStream stream, int slop, boolean enablePositionIncrements) throws java.io.IOException- Overrides:
multiPhraseQueryin classMappedFieldType- Throws:
java.io.IOException
-
phrasePrefixQuery
public org.apache.lucene.search.Query phrasePrefixQuery(org.apache.lucene.analysis.TokenStream stream, int slop, int maxExpansions) throws java.io.IOException- Overrides:
phrasePrefixQueryin classMappedFieldType- Throws:
java.io.IOException
-
hasGaps
public static boolean hasGaps(org.apache.lucene.analysis.TokenStream stream) throws java.io.IOException- 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
-
checkCompatibility
public void checkCompatibility(MappedFieldType other, java.util.List<java.lang.String> conflicts)
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
-
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: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
-
-