LeanCorpus.SourceGen
1.1.0
dotnet add package LeanCorpus.SourceGen --version 1.1.0
NuGet\Install-Package LeanCorpus.SourceGen -Version 1.1.0
<PackageReference Include="LeanCorpus.SourceGen" Version="1.1.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="LeanCorpus.SourceGen" Version="1.1.0" />
<PackageReference Include="LeanCorpus.SourceGen"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add LeanCorpus.SourceGen --version 1.1.0
#r "nuget: LeanCorpus.SourceGen, 1.1.0"
#:package LeanCorpus.SourceGen@1.1.0
#addin nuget:?package=LeanCorpus.SourceGen&version=1.1.0
#tool nuget:?package=LeanCorpus.SourceGen&version=1.1.0
Rowles.LeanCorpus
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
- 0 dependencies, AOT compatible, includes LINQ, default compressors (Deflate or Brotli)
Optional libraries
Typed mapping source generator
Zstandard stored field compression
LZ4 stored field compression
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.
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)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.