Class CompletionFieldMapper.CompletionFieldType

    • Constructor Detail

      • CompletionFieldType

        public CompletionFieldType()
    • Method Detail

      • setPreserveSep

        public void setPreserveSep​(boolean preserveSep)
      • setPreservePositionIncrements

        public void setPreservePositionIncrements​(boolean preservePositionIncrements)
      • setContextMappings

        public void setContextMappings​(ContextMappings contextMappings)
      • hasContextMappings

        public boolean hasContextMappings()
        Returns:
        true if there are one or more context mappings defined for this field type
      • getContextMappings

        public ContextMappings getContextMappings()
        Returns:
        associated context mappings for this field type
      • preserveSep

        public boolean preserveSep()
      • preservePositionIncrements

        public boolean preservePositionIncrements()
      • postingsFormat

        public static org.apache.lucene.codecs.PostingsFormat postingsFormat()
        Returns:
        postings format to use for this field-type
      • prefixQuery

        public org.apache.lucene.search.suggest.document.CompletionQuery prefixQuery​(java.lang.Object value)
        Completion prefix query
      • regexpQuery

        public org.apache.lucene.search.suggest.document.CompletionQuery regexpQuery​(java.lang.Object value,
                                                                                     int flags,
                                                                                     int maxDeterminizedStates)
        Completion prefix regular expression query
      • fuzzyQuery

        public org.apache.lucene.search.suggest.document.CompletionQuery fuzzyQuery​(java.lang.String value,
                                                                                    Fuzziness fuzziness,
                                                                                    int nonFuzzyPrefixLength,
                                                                                    int minFuzzyPrefixLength,
                                                                                    int maxExpansions,
                                                                                    boolean transpositions,
                                                                                    boolean unicodeAware)
        Completion prefix fuzzy query
      • 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
      • checkCompatibility

        public void checkCompatibility​(MappedFieldType fieldType,
                                       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
      • 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