Interface KnnPredicateOptionsStep
- All Superinterfaces:
PredicateFinalStep
,PredicateScoreStep<KnnPredicateOptionsStep>
public interface KnnPredicateOptionsStep
extends PredicateScoreStep<KnnPredicateOptionsStep>, PredicateFinalStep
The final step in a "knn" predicate definition, where optional parameters can be set.
-
Method Summary
Modifier and TypeMethodDescriptionfilter
(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) default KnnPredicateOptionsStep
filter
(PredicateFinalStep searchPredicate) filter
(SearchPredicate searchPredicate) requiredMinimumScore
(float score) requiredMinimumSimilarity
(float similarity) Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep
toPredicate
Methods inherited from interface org.hibernate.search.engine.search.predicate.dsl.PredicateScoreStep
boost, constantScore
-
Method Details
-
filter
-
filter
-
filter
KnnPredicateOptionsStep filter(Function<? super SearchPredicateFactory, ? extends PredicateFinalStep> clauseContributor) -
requiredMinimumSimilarity
- Parameters:
similarity
- A similarity limit: documents with vectors distance to which, according to the configured similarity function, is further than this limit will be filtered out from the results.- Returns:
this
, for method chaining.
-
requiredMinimumScore
- Parameters:
score
- The minimum sore limit: documents with vectors for which the similarity score is lower than the limit will be filtered out from the results.This is an alternative to the
requiredMinimumSimilarity(float)
where the score is used for filtering instead of the similarity. For the knn predicate the score and similarity are derived from each other.- Returns:
this
, for method chaining.
-