lucisearch
The SQLite/DuckDB of search — an embeddable, in-process search engine written in Rust.
No cluster to manage. No HTTP layer. No JVM. Open a file and search.
Crate name vs. import name: this library publishes to crates.io as
lucisearch(the bareluciname was already taken), but the crate itself isluci— addlucisearchand writeuse luci::…. Same story on PyPI: installlucisearch, importluci.
Features
- Full-text search with BM25 scoring, analyzers, phrase queries
- Vector search with HNSW, int8 quantization, pre-filtering
- Hybrid search with Reciprocal Rank Fusion
- Aggregations — terms, avg, sum, min, max, stats, range, histogram, cardinality, percentiles
- Geospatial — geo_distance, geo_bounding_box, geo_shape (intersects, within, disjoint, …)
- Nested documents with block-join queries and inner_hits
- Single-file storage — one
.lucifile, no directory sprawl - Lazy result materialization — only compute source, highlight, explain on access
Quick Start
[]
= "0.8"
use Index;
use SearchExpression;
use json;
let schema = json!;
let mut index = create?;
index.bulk?;
// Queries are ES-compatible JSON.
let expr = from_json?;
let results = index.search?;
for hit in results.iter
Field Types
| Type | Status |
|---|---|
text |
Supported |
keyword |
Supported |
integer, long, float, double |
Supported |
boolean |
Supported |
date |
Supported |
dense_vector |
Supported (cosine, L2, dot product, int8 quantization) |
geo_point |
Supported |
geo_shape |
Supported (polygon, multipolygon, all spatial relations) |
nested |
Supported |
Python
Also available as a Python package — pip install lucisearch (import
luci) — with the same ES-compatible dict API plus a typed,
Pydantic-validated query builder.
License
MIT