Fuzzy matching allows users to find results even with misspellings, typos, or slight variations in spelling using configurable Levenshtein distance.
How It Works
Fuzzy matching uses the Levenshtein distance algorithm to find words that are similar to the search term, even if not exactly spelled.
Levenshtein Distance: Number of character insertions, deletions, or substitutions needed to transform one word into another.
Example:
- Search: "computr"
- Matches: "computer" (distance: 1 – one character difference)
Configuration
Enabling Fuzzy Matching
- Go to Settings → Lumenare Search → Search Quality Settings
- Find Fuzzy Matching section
- Check "Enable Fuzzy Matching"
- Set Fuzzy Match Threshold (1-5)
- Click Save Changes
Note: Fuzzy matching works immediately – no reindexing required.
Threshold Settings
Threshold 1 (Strict):
- Allows 1 character difference
- Example: "computr" → "computer"
- Best for: Precision, avoiding false matches
Threshold 2 (Moderate – Recommended):
- Allows 2 character differences
- Example: "computr" → "computer", "compter" → "computer"
- Best for: Balanced typo tolerance
Threshold 3 (Permissive):
- Allows 3 character differences
- Example: "compter" → "computer"
- Best for: High typo tolerance
Threshold 4-5 (Very Permissive):
- Allows 4-5 character differences
- Example: "compter" → "computer"
- Best for: Very forgiving, but may return less relevant results
Use Cases
Typo Tolerance
Common Typos:
- "computr" → "computer"
- "WordPres" → "WordPress"
- "securty" → "security"
Why: Users make typos, especially on mobile devices.
Spelling Variations
Variations:
- "organize" vs "organise"
- "color" vs "colour"
- "center" vs "centre"
Why: Different spelling conventions (US vs UK).
Partial Matches
Partial:
- "WordPres" → "WordPress"
- "secur" → "security"
Why: Users may type partial words.
Best Practices
Choosing Threshold
Start with 2:
- Good balance
- Handles most typos
- Maintains relevance
Adjust based on:
- Content type
- User behavior
- Relevance requirements
- Performance needs
Testing
After enabling:
- Test with common typos
- Verify relevance maintained
- Check for false matches
- Adjust threshold if needed
Performance Considerations
Impact:
- More resource-intensive than exact matching
- Higher threshold = more processing
- Consider disabling for very large sites if not needed
Optimization:
- Use lower threshold if possible
- Monitor query performance
- Disable if not needed
Examples
Example 1: Basic Typo
Search: "computr"
Threshold: 2
Matches: "computer" (distance: 1)
Result: Finds content despite typo
Example 2: Multiple Typos
Search: "WordPres"
Threshold: 2
Matches: "WordPress" (distance: 1)
Result: Finds WordPress content
Example 3: Spelling Variation
Search: "organise"
Threshold: 2
Matches: "organize" (distance: 1)
Result: Finds content with either spelling
Impact on Search
Positive Effects
User Experience:
- Finds results despite typos
- More forgiving search
- Better mobile experience
- Reduces zero-result queries
Accessibility:
- Helps users with spelling difficulties
- Accommodates different skill levels
- More inclusive search
Considerations
Relevance:
- May match slightly irrelevant terms
- Higher threshold = less precision
- Test to ensure relevance maintained
Performance:
- More resource-intensive
- Higher threshold = slower queries
- Consider for large sites
Troubleshooting
Fuzzy Matching Not Working
Check:
- Fuzzy matching is enabled
- Threshold is set correctly
- No JavaScript errors
- Test with known typos
Solutions:
- Enable fuzzy matching
- Set appropriate threshold
- Fix JavaScript errors
- Test with content that should match
Too Many False Matches
Symptoms:
- Irrelevant results appearing
- Threshold too high
Solutions:
- Lower threshold (try 1 instead of 2-3)
- Review matched terms
- Test with different threshold values
- Consider disabling if not needed
Not Matching Obvious Typos
Symptoms:
- Common typos not matching
- Threshold too low
Solutions:
- Increase threshold (try 2-3)
- Test with specific typos
- Review threshold setting
- Verify fuzzy matching enabled
Advanced Tips
Combining with Synonyms
Use Together:
- Synonyms for equivalent terms
- Fuzzy matching for typos
- Both improve search coverage
Example:
- Synonym: "car, automobile"
- Fuzzy: "automobil" → "automobile"
- Combined: Better coverage
Content-Specific Settings
Technical Content:
- Lower threshold (1-2)
- Precision important
- Avoid false matches
General Content:
- Moderate threshold (2)
- Balance tolerance and relevance
- Good default
User-Generated Content:
- Higher threshold (2-3)
- More typos expected
- More forgiving