DMMRSuggestionEngine 0.1.7

dotnet add package DMMRSuggestionEngine --version 0.1.7
                    
NuGet\Install-Package DMMRSuggestionEngine -Version 0.1.7
                    
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="DMMRSuggestionEngine" Version="0.1.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DMMRSuggestionEngine" Version="0.1.7" />
                    
Directory.Packages.props
<PackageReference Include="DMMRSuggestionEngine" />
                    
Project file
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 DMMRSuggestionEngine --version 0.1.7
                    
#r "nuget: DMMRSuggestionEngine, 0.1.7"
                    
#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 DMMRSuggestionEngine@0.1.7
                    
#: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=DMMRSuggestionEngine&version=0.1.7
                    
Install as a Cake Addin
#tool nuget:?package=DMMRSuggestionEngine&version=0.1.7
                    
Install as a Cake Tool

DMMR Suggestion Engine

NuGet .NET License

A high-performance fuzzy search and hybrid suggestion engine for .NET.

DMMR Suggestion Engine combines BK-Tree indexing, N-Gram search, hybrid OpenSearch integration, similarity metrics, and an extensible filter pipeline to deliver fast, relevant, and customizable search suggestions.

Designed for:

  • Product Search
  • Autocomplete
  • Search Suggestions
  • Typo Correction
  • Recommendation Systems
  • Hybrid Search
  • AI Search Pipelines

Installation

dotnet add package DMMRSuggestionEngine

Features

  • ✅ BK-Tree fuzzy search
  • ✅ Character N-Gram indexing
  • ✅ Typo-tolerant search
  • ✅ Weighted ranking
  • ✅ Built-in LRU cache
  • ✅ Generic type-safe API
  • ✅ Hybrid OpenSearch search
  • ✅ ReadOnlySpan optimized algorithms
  • ✅ Low memory allocations
  • ✅ Extensible filter pipeline
  • ✅ Async APIs
  • ✅ .NET 9

Quick Start

using DMMRSuggestionEngine;

var engine = new DMMRSuggestionEngine<(int Id, string Name, float Weight)>();

engine.LoadData(
    new[]
    {
        (1, "iPhone 16 Pro Max", 100f),
        (2, "Samsung Galaxy S25 Ultra", 80f),
        (3, "Motorola Edge 60", 50f)
    },
    x => x.Name,
    x => x.Weight);

var results = engine.Suggest("iphon");

The built-in N-Gram index complements BK-Tree search by handling queries such as:

Query Result
Pro Max iPhone 16 Pro Max
Galaxy Samsung Samsung Galaxy S25 Ultra
Motorola E Motorola Edge 60

Configuration:

engine.NgramConfig.Enabled = true;
engine.NgramConfig.N = 3;
engine.NgramConfig.MinScore = 0.2f;

Hybrid OpenSearch

using DMMRSuggestionEngine.OpenSearch;
using OpenSearch.Client;

var client = new OpenSearchClient(
    new ConnectionSettings(
        new Uri("http://localhost:9200")));

var hybrid = new DMMROHybridSearchService(
    client,
    "products");

var results = await hybrid.HybridSearchAsync(
    "iphone",
    embedding);

Features:

  • Local + Distributed Search
  • Async Search
  • CancellationToken support
  • Vector Search
  • OpenSearch Integration

Filter Pipeline (v0.1.7)

Hybrid search supports an extensible post-processing pipeline.

Multiple filters can be chained to refine search results.

using DMMRSuggestionEngine.OpenSearch.Filters;

service.AddFilter(new MinWeightFilter(50));

service.AddFilter(new CosineSimilarityFilter(0.40f));

service.AddFilter(new AbortIfEmptyFilter());

var results = await service.HybridSearchAsync(
    "laptop",
    embedding);

Built-in filters:

Filter Purpose
CosineSimilarityFilter Minimum cosine similarity
MinWeightFilter Minimum item weight
AbortIfEmptyFilter Stops the pipeline if no results remain
DelegateFilter Lambda-based custom filter

Create Your Own Filters

The pipeline is fully extensible.

Simply implement IPostFilter.

public class MyFilter : IPostFilter
{
    public List<SuggestionDocument> Apply(
        List<SuggestionDocument> results,
        SearchContext context,
        out bool continueProcessing)
    {
        continueProcessing = true;

        // Custom business rules

        return results;
    }
}

Register it:

service.AddFilter(new MyFilter());

This makes it easy to implement:

  • Inventory filtering
  • Category filtering
  • Region restrictions
  • Customer segmentation
  • Logging
  • Metrics
  • Business rules
  • Deduplication
  • Any custom post-processing

Performance

Designed for:

  • Low latency
  • Low allocations
  • High throughput
  • Large datasets

Typical search latency:

Dataset Median
1,000 items ~0.05 ms
10,000 items ~0.08 ms
100,000 items ~0.10 ms

Main Components

  • BK-Tree
  • Character N-Gram Index
  • Levenshtein Distance
  • Cosine Similarity
  • Pearson Correlation
  • Jaccard Similarity
  • Euclidean Distance
  • Manhattan Distance
  • LRU Cache
  • OpenSearch Hybrid Search
  • Filter Pipeline

Why DMMR?

Unlike traditional fuzzy search libraries, DMMR combines multiple search strategies into a single engine:

  • Fast typo correction
  • Partial phrase matching
  • Hybrid local/distributed search
  • Vector similarity
  • Extensible post-processing pipeline
  • Performance-oriented implementation
  • Minimal allocations
  • Generic API

License

MIT


Author

Alessandro Silveira

Software Architect • DevOps Tech Leader • Performance-Oriented Systems Engineer

GitHub:

https://github.com/rootmese

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.

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
0.1.7 118 8/2/2026
0.1.6 109 8/2/2026
0.1.5 123 6/20/2026
0.1.4 110 6/10/2026
0.1.3 115 6/8/2026
0.1.2 120 6/8/2026