Get the latest tech news

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


Simple, index-free full-text search for JavaScript - thesephist/libsearch

It doesn't deliver the wide array of features that come with libraries like FlexSearch and lunr.js, but is a big step above text.indexOf(query) > -1, and is fast enough to be usable for searching thousands of documents on every keystroke in my experience. Modern JavaScript engines ship with highly optimized regular expression engines, and libsearch takes advantage of this for fast, index-free text search by transforming query strings into regular expression filters at search time. But when building prototypes and simple web apps, I often didn't want to incur the complexity of having a separate "indexing" step to get a "good enough" search solution.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of javascript

javascript

Photo of text search

text search

Photo of Libsearch

Libsearch

Related news:

News photo

Boardgame.io: an engine for creating turn-based games using JavaScript

News photo

Show HN: @smoores/epub, a JavaScript library for working with EPUB publications

News photo

Just Say No to JavaScript