Data & Storage · zero-dependency · MIT

larzsearch

Full-text search with BM25.

An inverted-index full-text search with BM25 ranking and fuzzy matching — add real search to an app or dataset without a search server.

larzscript pkg install search
View on GitHub →Learn the stack

What you get

Try it

import "search" as search
let idx = search.new()
search.add(idx, "1", "the quick brown fox")
search.add(idx, "2", "the lazy dog sleeps")
print(search.query(idx, "quick fox"))
print(search.query_fuzzy(idx, "qwick fox"))
Output
[{id: 1, score: 1.38629}]
[{id: 1, score: 1.38629}]

Why it's in the Larz Stack

larzsearch is a real Larzscript package (larzscript pkg install search) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.