pub enum Fuzziness {
Auto,
Range(u8, u8),
Distance(u8),
}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 Eq for Fuzziness
impl StructuralPartialEq for Fuzziness
Auto Trait Implementations§
impl Freeze for Fuzziness
impl RefUnwindSafe for Fuzziness
impl Send for Fuzziness
impl Sync for Fuzziness
impl Unpin for Fuzziness
impl UnwindSafe for Fuzziness
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)