Class TextFieldMapper.TextFieldType

  • All Implemented Interfaces:
    org.apache.lucene.index.IndexableFieldType
    Enclosing class:
    TextFieldMapper

    public static final class TextFieldMapper.TextFieldType
    extends StringFieldType
    • Method Detail

      • 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 class MappedFieldType
      • 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 class MappedFieldType
      • prefixQuery

        public org.apache.lucene.search.Query prefixQuery​(java.lang.String value,
                                                          org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
                                                          QueryShardContext context)
        Overrides:
        prefixQuery in class StringFieldType
      • spanPrefixQuery

        public org.apache.lucene.search.spans.SpanQuery spanPrefixQuery​(java.lang.String value,
                                                                        org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod method,
                                                                        QueryShardContext context)
        Overrides:
        spanPrefixQuery in class MappedFieldType
      • phraseQuery

        public org.apache.lucene.search.Query phraseQuery​(org.apache.lucene.analysis.TokenStream stream,
                                                          int slop,
                                                          boolean enablePosIncrements)
                                                   throws java.io.IOException
        Overrides:
        phraseQuery in class StringFieldType
        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:
        multiPhraseQuery in class StringFieldType
        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:
        phrasePrefixQuery in class StringFieldType
        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 class MappedFieldType
        Parameters:
        fullyQualifiedIndexName - the name of the index this field-data is build for
      • 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 a TermQuery over the value bytes, boosted by MappedFieldType.boost().
        Specified by:
        termQuery in class MappedFieldType