Skip to main content

FUZZY_MATCH_SIMILARITY_THRESHOLD

Constant FUZZY_MATCH_SIMILARITY_THRESHOLD 

Source
pub const FUZZY_MATCH_SIMILARITY_THRESHOLD: f32 = 0.7;
Expand description

Trigram distance floor for search_for_user_details_by_email and search_for_user_details_fuzzy_match (pg_trgm’s <<-> returns 0 for an identical string, larger for a less similar one). Loose enough that a real typo still matches.