Skip to content

jordansrowles/LeanCorpus

Repository files navigation

Rowles.LeanCorpus

Build AOT Compatible Docs Docs

A .NET-native full-text search engine. Segment-centric indexing, memory-mapped reads, and atomic commit semantics. Targets net10.0 and net11.0. The core library has no external dependencies; stored-field compression uses BCL types only. Optional extension packages add LZ4, Snappy, and Zstandard support.

Inspired by Apache Lucene.

Projects

All projects target .NET 10, and .NET 11. Versions < 10 are not supported. (LeanCorpus.SourceGen is a .NET Standard library, for obvious reasons though).

Core library

  • NuGet Version
    • 0 dependencies, AOT compatible, includes LINQ, default compressors (Deflate or Brotli)

Optional libraries

  • NuGet Version Typed mapping source generator
  • NuGet Version Zstandard stored field compression
  • NuGet Version LZ4 stored field compression
  • NuGet Version Snappy stored field compression

Native AOT

Rowles.LeanCorpus is marked AOT-compatible for net10.0 and net11.0. The core library avoids reflection-based JSON metadata and is validated by a dedicated xUnit smoke executable (which can be ran with .\scripts\aot-smoke.ps1) rather than the ASP.NET JSON API example.

This publishes src\examples\Rowles.LeanCorpus.Example.NativeAot\Rowles.LeanCorpus.Example.NativeAot.csproj for win-x64 with PublishAot=true, then runs the native executable. The smoke executable several different bits of the library that may have proved some difficulty.

A note if you're using on of the optional compression libraries, and are using native AOT: The core library has no native sidecar dependencies for compression. Optional packages (Rowles.LeanCorpus.Compression.LZ4, Rowles.LeanCorpus.Compression.Snappy, Rowles.LeanCorpus.Compression.Zstandard) may include RID-specific native binaries; AOT consumers using those packages must call their respective Register() methods at startup.

Important

While LeanLucene is AOT capable, it does not support (and does not intend to support) Blazor WASM. LeanLucene (and the other segment-centric engines) require use of the OS's filesystem to achieve its performance. It would be too much work (and a project itself) to support a dual approach with a filesystem, and the browsers limited storage.

Blazor Server/Hybrid remains supported (naturally), as long as the indexing happens server-side.

SonarQube Scan (main branch)

Quality Gate Status Lines of Code Bugs Code Smells Duplicated Lines (%) Technical Debt Vulnerabilities Reliability Rating Security Rating Maintainability Rating

About

A .NET-native full-text search engine. Segment-centric indexing, memory-mapped reads, and atomic commit semantics. Targets .NET 10+. Inspired by Apache Lucene.

Topics

Resources

License

Stars

94 stars

Watchers

7 watching

Forks

Packages

 
 
 

Contributors