Interface MatchPredicateOptionsStep<S extends MatchPredicateOptionsStep<?>>
- Type Parameters:
S
- The "self" type (the actual exposed type of this step).
- All Superinterfaces:
CommonMinimumShouldMatchOptionsStep<S>
,PredicateFinalStep
,PredicateScoreStep<S>
-
Method Summary
Modifier and TypeMethodDescriptionDefine 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.fuzzy
(int maxEditDistance, int exactPrefixLength) Enable fuzziness for this match predicate; only works for text fields.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.CommonMinimumShouldMatchOptionsStep
minimumShouldMatch, minimumShouldMatch, minimumShouldMatchNumber, minimumShouldMatchPercent
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
-
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
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
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
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.
-