Interface QueryStringPredicateOptionsStep<S extends QueryStringPredicateOptionsStep<?>>

Type Parameters:
S - The "self" type (the actual exposed type of this step).
All Superinterfaces:
CommonQueryStringPredicateOptionsStep<S>, PredicateFinalStep, PredicateScoreStep<S>

public interface QueryStringPredicateOptionsStep<S extends QueryStringPredicateOptionsStep<?>> extends CommonQueryStringPredicateOptionsStep<S>
The final step in a "query string" predicate definition, where optional parameters can be set.
  • Method Details

    • allowLeadingWildcard

      S allowLeadingWildcard(boolean allowLeadingWildcard)
      Specifies whether * and ? are allowed as first characters of a search term.

      Default is true.

      Parameters:
      allowLeadingWildcard - Whether wildcard characters are allowed at the start of the query string.
      Returns:
      this, for method chaining.
    • enablePositionIncrements

      S enablePositionIncrements(boolean enablePositionIncrements)
      When set to true, resulting queries are aware of position increments.

      This setting is useful when the removal of stop words leaves an unwanted “gap” between terms.

      Default is true.

      Parameters:
      enablePositionIncrements - Whether position increments are enabled.
      Returns:
      this, for method chaining.
    • phraseSlop

      S phraseSlop(Integer phraseSlop)
      Sets the slop, which defines how permissive the phrase predicate (created when parsing the query string) will be.

      If zero (the default), then the predicate will only match the exact phrase given (after analysis). Higher values are increasingly permissive, allowing unexpected words or words that switched position.

      The slop represents the number of edit operations that can be applied to the phrase to match, where each edit operation moves one word by one position. See the details on the phrase predicate slop parameter, for more information about it.

      Default is 0.

      Parameters:
      phraseSlop - The slop value.
      Returns:
      this, for method chaining.
    • rewriteMethod

      S rewriteMethod(RewriteMethod rewriteMethod)
      Determines how backend's query parser rewrites and scores multi-term queries.

      Default is RewriteMethod.CONSTANT_SCORE.

      Parameters:
      rewriteMethod - The rewrite method to apply.
      Returns:
      this, for method chaining.
      See Also:
    • rewriteMethod

      S rewriteMethod(RewriteMethod rewriteMethod, int n)
      Determines how backend's query parser rewrites and scores multi-term queries.

      Default is RewriteMethod.CONSTANT_SCORE.

      Parameters:
      rewriteMethod - The rewrite method to apply.
      n - The parameter required by a rewrite method.
      Returns:
      this, for method chaining.
      See Also: