I'm building LeanLucene, a low-allocation alternative to Lucene.NET for indexing and search
Over the last few months I've been building LeanLucene, a modern alternative to Lucene.NET. It targets .NET 10 & 11, and has one external de
NuGet Gallery | LeanLucene 1.1.1
Over the last few months I've been building LeanLucene, a modern alternative to Lucene.NET. It targets .NET 10 & 11, and has one external dependency (NativeCompressions for LZ4 and Zstandard), everything else is BCL and modern C#. Benchmarks are looking good at the moment, with nearly all being > 50% better, and > 99% better in some.
So far I've implemented
- Segment-centric indexing as immutable segments flushed to disk, background merges, atomic
segments_Ncommits - Memory-mapped reads with a
MMapDirectory - BM25 scoring by default (TF-IDF available); BlockMaxWAND for early termination across segments
- BKD trees for numeric range queries; HNSW graphs for KNN vector search
- Full analysis pipeline. Stemmers for 12 languages, N-gram/edge N-gram/CJK bigram tokenisers, synonym graph, accent folding
- Query parser supports
field:term, phrases, slop, fuzzy, prefix, wildcard,+/-, grouping, and boosts. Ex.+title:lean "full text"~2 fuzzy~1 prefix* field^2.0 - Facets, histograms, field collapsing, highlights, DidYouMean suggestions
- Block-join indexing for parent/child documents
- Geo queries (bounding box, distance)
- Schema validation, deletion policies, point-in-time snapshots
- Optional OpenTelemetry traces + metrics, slow query log, search analytics
- ASP.NET Minimal API example (multi-collection HTTP search service)