Class PhraseQueryType

  • All Implemented Interfaces:
    Serializable

    public class PhraseQueryType
    extends QueryType
    A query type which matches the searched query phrase with some leeway with the configured slop value.
    See Also:
    Serialized Form
    • Constructor Detail

      • PhraseQueryType

        public PhraseQueryType​(Double boost,
                               int slop)
    • Method Detail

      • getTypeQueryInternal

        protected String getTypeQueryInternal​(String query)
        Description copied from class: QueryType
        Get the original query formatted to result in the desired query type.
        Specified by:
        getTypeQueryInternal in class QueryType
        Parameters:
        query - the original query
        Returns:
        query formatted for the desired query type
      • getSlop

        public int getSlop()
        The slop leeway in matching the queried phrase.

        https://lucene.apache.org/solr/guide/6_6/the-extended-dismax-query-parser.html#TheExtendedDisMaxQueryParser-Using_slop_

        Returns:
        the leeway in matching the queried phrase