Class MatchAllPredicateOptionsStepImpl
- java.lang.Object
-
- org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
-
- org.hibernate.search.engine.search.predicate.dsl.impl.MatchAllPredicateOptionsStepImpl
-
- All Implemented Interfaces:
MatchAllPredicateOptionsStep<MatchAllPredicateOptionsStep<?>>,PredicateFinalStep,PredicateScoreStep<MatchAllPredicateOptionsStep<?>>
public final class MatchAllPredicateOptionsStepImpl extends AbstractPredicateFinalStep implements MatchAllPredicateOptionsStep<MatchAllPredicateOptionsStep<?>>
-
-
Field Summary
-
Fields inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
dslContext
-
-
Constructor Summary
Constructors Constructor Description MatchAllPredicateOptionsStepImpl(SearchPredicateDslContext<?> dslContext, SearchPredicateFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchAllPredicateOptionsStep<?>boost(float boost)Boost the weight of the predicate in score computation.protected SearchPredicatebuild()MatchAllPredicateOptionsStep<?>constantScore()Force the score of the predicate to a single constant, identical for all documents.MatchAllPredicateOptionsStep<?>except(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)Add a "must not" clause to be defined by the given function.MatchAllPredicateOptionsStep<?>except(SearchPredicate searchPredicate)Add a "must not" clause based on a previously-builtSearchPredicate,-
Methods inherited from class org.hibernate.search.engine.search.predicate.dsl.spi.AbstractPredicateFinalStep
toPredicate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.MatchAllPredicateOptionsStep
except
-
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
-
-
-
-
Constructor Detail
-
MatchAllPredicateOptionsStepImpl
public MatchAllPredicateOptionsStepImpl(SearchPredicateDslContext<?> dslContext, SearchPredicateFactory factory)
-
-
Method Detail
-
boost
public MatchAllPredicateOptionsStep<?> boost(float boost)
Description copied from interface:PredicateScoreStepBoost the weight of the predicate in score computation.- Specified by:
boostin interfacePredicateScoreStep<MatchAllPredicateOptionsStep<?>>- Parameters:
boost- The boost factor. Higher than 1 increases the weight in score computation, between 0 and 1 lowers the weight. Lower than 0 is for experts only.- Returns:
this, for method chaining.
-
constantScore
public MatchAllPredicateOptionsStep<?> constantScore()
Description copied from interface:PredicateScoreStepForce the score of the predicate to a single constant, identical for all documents.By default, the score will be
1.0f, butboosts, if any, will still be applied to the predicate.- Specified by:
constantScorein interfacePredicateScoreStep<MatchAllPredicateOptionsStep<?>>- Returns:
this, for method chaining.
-
except
public MatchAllPredicateOptionsStep<?> except(SearchPredicate searchPredicate)
Description copied from interface:MatchAllPredicateOptionsStepAdd a "must not" clause based on a previously-builtSearchPredicate,Documents matching the "must not" clause won't match the "match all" predicate.
- Specified by:
exceptin interfaceMatchAllPredicateOptionsStep<MatchAllPredicateOptionsStep<?>>- Parameters:
searchPredicate- The predicate that must not match.- Returns:
this, for method chaining.
-
except
public MatchAllPredicateOptionsStep<?> except(Function<? super SearchPredicateFactory,? extends PredicateFinalStep> clauseContributor)
Description copied from interface:MatchAllPredicateOptionsStepAdd 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.
- Specified by:
exceptin interfaceMatchAllPredicateOptionsStep<MatchAllPredicateOptionsStep<?>>- 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.
-
build
protected SearchPredicate build()
- Specified by:
buildin classAbstractPredicateFinalStep
-
-