Interface MatchAllPredicateOptionsStep<S extends MatchAllPredicateOptionsStep<?>>

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

public interface MatchAllPredicateOptionsStep<S extends MatchAllPredicateOptionsStep<?>> extends PredicateFinalStep, PredicateScoreStep<S>
The initial and final step in "match all" predicate definition, where optional parameters can be set.
  • Method Details

    • except

      S except(SearchPredicate searchPredicate)
      Add a "must not" clause based on a previously-built SearchPredicate,

      Documents matching the "must not" clause won't match the "match all" predicate.

      Parameters:
      searchPredicate - The predicate that must not match.
      Returns:
      this, for method chaining.
    • except

      default S except(PredicateFinalStep dslFinalStep)
      Add a "must not" clause based on an almost-built SearchPredicate.

      Documents matching the "must not" clause won't match the "match all" predicate.

      Parameters:
      dslFinalStep - A final step in the predicate DSL allowing the retrieval of a SearchPredicate.
      Returns:
      this, for method chaining.
    • except

      S except(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
      Add a "must not" clause to be defined by the given function.

      Best used with lambda expressions.

      Documents matching the "must not" clause won't match the "match all" predicate.

      Parameters:
      clauseContributor - A function that will use the factory passed in parameter to create a predicate, returning the final step in the predicate DSL. Should generally be a lambda expression.
      Returns:
      this, for method chaining.