Interface MatchPredicateOptionsStep<S extends MatchPredicateOptionsStep<?>>
-
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
PredicateFinalStep
,PredicateScoreStep<S>
public interface MatchPredicateOptionsStep<S extends MatchPredicateOptionsStep<?>> extends PredicateFinalStep, PredicateScoreStep<S>
The final step in a "match" predicate definition, where optional parameters can be set.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description S
analyzer(String analyzerName)
Define an analyzer to use at query time to interpret the value to match.default S
fuzzy()
Enable fuzziness for this match predicate; only works for text fields.default S
fuzzy(int maxEditDistance)
Enable fuzziness for this match predicate; only works for text fields.S
fuzzy(int maxEditDistance, int exactPrefixLength)
Enable fuzziness for this match predicate; only works for text fields.S
skipAnalysis()
Any analyzer and normalizer defined on any field will be ignored to interpret the value to match.-
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 Detail
-
fuzzy
default S fuzzy()
Enable fuzziness for this match predicate; only works for text fields.Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
- Returns:
this
, for method chaining.- See Also:
fuzzy(int, int)
-
fuzzy
default S fuzzy(int maxEditDistance)
Enable fuzziness for this match predicate; only works for text fields.Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
- Parameters:
maxEditDistance
- The maximum value of the edit distance, which defines how permissive the fuzzy predicate will be.- Returns:
this
, for method chaining.- See Also:
fuzzy(int, int)
-
fuzzy
S fuzzy(int maxEditDistance, int exactPrefixLength)
Enable fuzziness for this match predicate; only works for text fields.Fuzziness allows to match documents that do not contain the value to match, but a close value, for example with one letter that differs.
- Parameters:
maxEditDistance
- The maximum value of the edit distance, which defines how permissive the fuzzy predicate will be.Roughly speaking, the edit distance is the number of changes between two terms: switching characters, removing them, ...
If zero, then fuzziness is completely disabled. The other accepted values,
1
and2
, are increasingly fuzzy.exactPrefixLength
- Length of the prefix that has to match exactly, i.e. for which fuzziness will not be allowed.A non-zero value is recommended if the index contains a large amount of distinct terms.
- Returns:
this
, for method chaining.
-
analyzer
S analyzer(String analyzerName)
Define an analyzer to use at query time to interpret the value to match.If this method is not called, the analyzer defined on the field will be used.
- Parameters:
analyzerName
- The name of the analyzer to use in the query for this predicate.- Returns:
this
, for method chaining.
-
skipAnalysis
S skipAnalysis()
Any analyzer and normalizer defined on any field will be ignored to interpret the value to match.- Returns:
this
, for method chaining.
-
-