Update fuzzy search threshold in MarketPage for improved typo tolerance
- Adjusted the typo tolerance threshold in the fuzzy search options from 0.6 to 0.4, allowing for more flexible matching of product names and descriptions. - This change enhances the search experience by accommodating a wider range of user input variations, improving product discoverability.
This commit is contained in:
parent
5d55dfe9d1
commit
06d4cc4d4a
1 changed files with 1 additions and 1 deletions
|
|
@ -283,7 +283,7 @@ const searchOptions: FuzzySearchOptions<Product> = {
|
|||
{ name: 'description', weight: 0.3 }, // Description provides context
|
||||
{ name: 'categories', weight: 0.4 } // Categories help with discovery
|
||||
],
|
||||
threshold: 0.6, // More tolerant of typos (0.0 = perfect match, 1.0 = match anything)
|
||||
threshold: 0.4, // More tolerant of typos (0.0 = perfect match, 1.0 = match anything)
|
||||
ignoreLocation: true, // Don't care about where in the string the match is
|
||||
findAllMatches: true, // Find all matches, not just the first
|
||||
minMatchCharLength: 2, // Minimum length of a matched character sequence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue