NovaCraft.FullTextSearch
1.0.0
dotnet add package NovaCraft.FullTextSearch --version 1.0.0
NuGet\Install-Package NovaCraft.FullTextSearch -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NovaCraft.FullTextSearch" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NovaCraft.FullTextSearch" Version="1.0.0" />
<PackageReference Include="NovaCraft.FullTextSearch" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NovaCraft.FullTextSearch --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NovaCraft.FullTextSearch, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NovaCraft.FullTextSearch@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NovaCraft.FullTextSearch&version=1.0.0
#tool nuget:?package=NovaCraft.FullTextSearch&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NovaCraft Full-Text Search
NovaCraft Full-Text Search is a lightweight .NET package that enables full-text search functionality for your applications, similar to Azure AI Search, using Lucene.Net as the underlying engine. It allows indexing of database tables and provides fast search capabilities with support for AND, OR, wildcard, and fuzzy searches.
Features
- Full-text search over multiple columns and tables.
- AND / OR query support.
- Wildcard search (prefix, suffix, and contains).
- Fuzzy search for approximate matching.
- Incremental and asynchronous indexing.
- Track indexed row counts.
- Configurable columns and tables.
- Cross-platform .NET support.
- Simple API, no external dependencies except Lucene.Net.
Table of Contents
- Features
- Installation
- Usage
- Configuration
- Best Practices
- Security Considerations
- Next Version / Roadmap
- License
Installation
Install the NuGet package:
dotnet add package NovaCraft.FullTextSearch
Usage
1. Configure Search
using NovaCraft.FullTextSearch;
using NovaCraft.FullTextSearch.Models;
var engine = new SearchEngine();
// Add search configuration
engine.AddSearchConfig(new SearchConfig
{
Name = "Products",
Columns = new List<ColumnMapping>
{
new ColumnMapping { Table = "highValueProducts", Column = "Name" },
new ColumnMapping { Table = "highValueProducts", Column = "Value" },
new ColumnMapping { Table = "highValueProducts", Column = "Skid" }
}
});
2. Index Data
// Synchronous
engine.IndexData("highValueProducts", new Dictionary<string, object>
{
{ "Name", "Product1" },
{ "Value", 100 },
{ "Skid", "SK123" }
});
// Asynchronous batch indexing
engine.IndexDataAsync("highValueProducts", listOfRows);
Track indexed row counts:
int indexedCount = engine.GetIndexedCount("Products");
Console.WriteLine($"Indexed rows: {indexedCount}");
3. Index Data
Supports AND / OR operators, wildcards, and fuzzy searches:
var results = engine.Find("Products", "Product AND 100");
foreach (var row in results)
{
foreach (var kvp in row)
Console.WriteLine($"{kvp.Key}: {kvp.Value}");
}
Specify maximum number of results:
var results = engine.Find("Products", "Product", maxResults: 500);
Configuration
1. SearchConfig
public class SearchConfig
{
public string Name { get; set; }
public List<ColumnMapping> Columns { get; set; }
}
2. ColumnMapping
public class ColumnMapping
{
public string Table { get; set; }
public string Column { get; set; }
}
Best Practices
- Use asynchronous indexing for large datasets.
- Limit search results with
maxResultsto improve performance. - Avoid indexing extremely large columns with unbounded text.
- Persist and reuse the index directory to avoid re-indexing.
- Monitor
GetIndexedCount()to track indexing progress.
Security Considerations
- Sanitize input from external sources.
- Use parameterized queries when fetching data.
- Avoid exposing the raw Lucene index path.
- Run indexing with a restricted service account.
Next Version / Roadmap
- Fuzzy search improvements.
- Highlighting matched terms in results.
- Multi-language support.
- Search scoring and ranking improvements.
License
MIT License. Free for personal and commercial use.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Lucene.Net (>= 4.8.0-beta00016)
- Lucene.Net.Analysis.Common (>= 4.8.0-beta00016)
- Lucene.Net.QueryParser (>= 4.8.0-beta00016)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 697 | 11/19/2025 |