Class KeywordFieldMapper.KeywordFieldType

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

    public static final class KeywordFieldMapper.KeywordFieldType
    extends StringFieldType
    • Method Detail

      • checkCompatibility

        public void checkCompatibility​(MappedFieldType otherFT,
                                       java.util.List<java.lang.String> conflicts)
        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
      • 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
      • setNormalizer

        public void setNormalizer​(NamedAnalyzer normalizer)
      • splitQueriesOnWhitespace

        public boolean splitQueriesOnWhitespace()
      • setSplitQueriesOnWhitespace

        public void setSplitQueriesOnWhitespace​(boolean splitQueriesOnWhitespace)
      • 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
      • valueForDisplay

        public java.lang.Object valueForDisplay​(java.lang.Object value)
        Description copied from class: MappedFieldType
        Given a value that comes from the stored fields API, convert it to the expected type. For instance a date field would store dates as longs and format it back to a string in this method.
        Overrides:
        valueForDisplay in class MappedFieldType
      • 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