Expand description
Some queries and APIs support parameters to allow inexact fuzzy matching,
using the fuzziness
parameter.
When querying text
or keyword
fields, fuzziness
is interpreted as a
Levenshtein Edit Distance
— the number of one character changes that need to be made to one string to make it the same as another string.
https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
Variants
Auto
Generates an edit distance based on the length of the term.
AUTO
should generally be the preferred value for fuzziness
.
Range(u8, u8)
Low and high distance arguments may be optionally provided
AUTO:[low],[high]
. If not specified, the default values are 3 and 6,
equivalent to AUTO:3,6
that make for lengths:
0..2
Must match exactly
3..5
One edit allowed
>5
Two edits allowed
Distance(u8)
The maximum allowed Levenshtein Edit Distance (or number of edits)
Trait Implementations
impl Copy for Fuzziness
impl StructuralPartialEq for Fuzziness
Auto Trait Implementations
impl RefUnwindSafe for Fuzziness
impl Send for Fuzziness
impl Sync for Fuzziness
impl Unpin for Fuzziness
impl UnwindSafe for Fuzziness
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more