TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Libsearch: Simple index-free full-text search for JavaScript

96 pointsby thesephist5 months ago

7 comments

swyx5 months ago
this is 115 lines of TS, which is pretty lightweight, but some other impt table stakes might be missing that you should be aware of.<p>see all the JS alternatives with their sizes and feature sets and perf: <a href="https:&#x2F;&#x2F;github.com&#x2F;leeoniya&#x2F;uFuzzy">https:&#x2F;&#x2F;github.com&#x2F;leeoniya&#x2F;uFuzzy</a> (scroll to bottom)<p>i went down this path a few yrs ago and ended up picking ufuzzy: <a href="https:&#x2F;&#x2F;swyxkit.netlify.app&#x2F;ufuzzy-search" rel="nofollow">https:&#x2F;&#x2F;swyxkit.netlify.app&#x2F;ufuzzy-search</a>
评论 #42539886 未加载
no_wizard5 months ago
I never realized search like this was this easy to build in a way.<p>It’s a very clever RegEx engine, essentially. Though it’s unclear to me right now how will this library handles fuzzy search (e.g. Califnia instead of California) but it’s really cool to reason about its implementation
maelito5 months ago
I&#x27;m often using Fuse in my JS apps. So many in-app searchs cannot handle typing errors, it&#x27;s frustrating.
评论 #42544829 未加载
jitl5 months ago
With FlexSearch or lunr or similar, building an index is so fast for “thousands of items” that it’s fine to do it when the user opens a search interface and forget it once they’re done.
评论 #42542642 未加载
评论 #42539686 未加载
评论 #42539840 未加载
gabrieledarrigo5 months ago
Small and simple! I love these types of programs.
Alifatisk5 months ago
What&#x27;s the benefit of index-free?
评论 #42541759 未加载
revskill5 months ago
Look like grep.