Re:Show HN: Mantic.sh – Search 480k files in 0.46s without e...
by warthog on Tuesday January 06, 2026 @04:02PM
(#46518676)
Can you explain how you achieve this in more detail? Did not see any in-detail explanation in the readme in repo
[ Parent
| on HN ]
Re:Show HN: Mantic.sh – Search 480k files in 0.46s without e...
by marcoaapfortes on Tuesday January 06, 2026 @04:13PM
(#46518843)
Fair point the README focuses more on benchmarks than implementation here's the short version:
1. Use `git ls-files` instead of walking the filesystem (huge speed win - dropped Chromium 59GB scan from 6.6s to 0.46s) 2. Parse each file path into components (folders, filename, extension) 3. Score each file based on how query terms match path components, weighted by position and depth 4. Return top N matches sorted by score
The core insight: /services/stripe/webhook.handler.ts already encodes the semantic relationship between "stripe" and "webhook" through its structure. No need to read file contents or generate embeddings.
I should add an architecture doc to the repo, thanks for the nudge.