Skip to content

Commit 63e7e30

Browse files
committed
Fix fuzzy search for name typos with multiple fallback strategies
- Lower Fuse.js threshold to 0.2 for much more lenient name matching - Add custom Levenshtein distance-based similarity function - Implement multiple fallback layers: Fuse.js → exact match → similarity search - Add debug logging to track search behavior - Set 60% similarity threshold for typo tolerance - Test with 'rhul' → 'Rahul' example
1 parent 8f4f9fd commit 63e7e30

5 files changed

Lines changed: 369 additions & 53 deletions

File tree

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"devdisplay": "file:",
2020
"flag": "^5.0.1",
2121
"framer-motion": "^12.23.12",
22+
"fuse.js": "^7.1.0",
2223
"html2canvas": "^1.4.1",
2324
"jspdf": "^3.0.2",
2425
"lucide-react": "^0.539.0",

public/data/7sg56.json

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
{
2-
"name": "Sourish Ghosh",
3-
"location": "Chennai",
4-
"bio": "Creating the unimaginable one step at a time",
5-
"avatar": "https://github.com/7sg56.png",
6-
"portfolio": "https://sourish-ghosh.vercel.app",
7-
"skills": ["Next.js", "TypeScript", "three.js", "Supabase", "Tailwind CSS", "Shadcn UI", "Express.js", "MongoDB", "Redis"],
8-
"social": {
9-
"GitHub": "https://github.com/7sg56",
10-
"Twitter": "https://x.com/sourishghosh777",
11-
"LinkedIn": "https://www.linkedin.com/in/7sg56",
12-
"Email": "sghosh.ile.7@gmail.com"
13-
}
14-
}
2+
"name": "Sourish Ghosh",
3+
"location": "Chennai",
4+
"bio": "Creating the unimaginable one step at a time",
5+
"avatar": "https://github.com/7sg56.png",
6+
"portfolio": "https://sourish-ghosh.vercel.app",
7+
"skills": [
8+
"Next.js",
9+
"TypeScript",
10+
"three.js",
11+
"Supabase",
12+
"Tailwind CSS",
13+
"Shadcn UI",
14+
"Express.js",
15+
"MongoDB",
16+
"Redis"
17+
],
18+
"social": {
19+
"GitHub": "https://github.com/7sg56",
20+
"Twitter": "https://x.com/sourishghosh777",
21+
"LinkedIn": "https://www.linkedin.com/in/7sg56",
22+
"Email": "sghosh.ile.7@gmail.com"
23+
}
24+
}

0 commit comments

Comments
 (0)