Dor.Automations.MatchEngine 0.2.0

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

Dor.Automations.MatchEngine

The core of the dør Match Engine SDK: deterministic document-line matching that learns from the people who correct it. Give it the lines off a document and the candidates they could be; get back which line went where, by which strategy, at what confidence, with the evidence. When a reviewer corrects a line, the next document that words it the same way matches on its own.

The SDK runs inside your .NET host. The matching itself runs in the dør Match Engine Kernel, a container image dør supplies with your licence; the SDK talks to it over gRPC.

How to use

1. Run the kernel of the same version as these packages (0.2.0 with 0.2.0). Locally, in an Aspire AppHost, with Dor.Automations.MatchEngine.Hosting.Aspire; in production, as a container your host reaches on a private network.

2. Install the transport and a store (each brings the core):

dotnet add package Dor.Automations.MatchEngine.Grpc
dotnet add package Dor.Automations.MatchEngine.PostgreSql

3. Register it:

builder.Services.AddMatchEngine()
    .UseGrpcKernel()                         // address from MatchEngine:Kernel:Address
    .UsePostgreSql(connectionString);        // or .UseInMemoryAliasStore() for a prototype

4. Migrate at startup, like your own context: MatchEngineDbContext.Database.MigrateAsync(). The engine's tables live in their own schema, matchengine.

5. Match, and learn from corrections:

var outcome = await engine.MatchAsync(tenantId, new MatchRequest(
    ScopeId: supplierId,
    Lines: [new MatchLine(1, "ACME-1001", "hose 25 x 2000", UnitPrice: 12.5, Quantity: 10)],
    Candidates: [new MatchCandidate("10", "1001", "HOSE 25MM X 2000MM", 12.5, 10, "EA", [])]));

foreach (var line in outcome.Matches)
{
    // line.CandidateId (null when unmatched), line.Strategy, line.Confidence, line.Evidence
}

await engine.RecordCorrectionAsync(tenantId,
    new Correction(supplierId, Alias: "VENDOR-XYZ-99", ItemId: "1001", CreatedBy: reviewer));
// The next document from this tenant and scope that says "VENDOR-XYZ-99" matches item 1001 as learned_alias.

Your host owns identity: every call names the tenant it acts for.

What can go wrong

Exception Means Usually
MatchKernelUnavailableException The kernel did not answer as a kernel should 503, retry
MatchKernelIncompatibleException The kernel is older than these packages; the message says which to run 503, fix the deployment
MatchRequestRejectedException The request cannot be matched as sent: duplicate line indices, over the kernel's limits 400 with the message
ArgumentException A correction without its alias, item or author 400

The packages

Package For
Dor.Automations.MatchEngine This core: IMatchEngine, the request and result types, the ports
Dor.Automations.MatchEngine.Grpc The transport to the kernel
Dor.Automations.MatchEngine.PostgreSql Corrections, imported documents and the catalogue in PostgreSQL
Dor.Automations.MatchEngine.InMemory Corrections in memory, for tests and prototypes
Dor.Automations.MatchEngine.Hosting.Aspire The kernel in an Aspire AppHost
Dor.Automations.MatchEngine.Testing A scripted kernel and conformance cases for your own tests
Dor.Automations.MatchEngine.Jev An optional decision model that suggests on unmatched lines

Licence

Proprietary to dør. Using the SDK requires a licence agreement with dør, under which the kernel image is supplied; see the LICENSE file in the package.

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

Showing the top 5 NuGet packages that depend on Dor.Automations.MatchEngine:

Package Downloads
Dor.Automations.MatchEngine.PostgreSql

The dør Match Engine SDK's state in PostgreSQL: the alias, import and stored-document stores, with their migrations.

Dor.Automations.MatchEngine.Jev

Jev, through OpenRouter, as a decision model for the dør Match Engine SDK: suggestions on unmatched lines, never decisions.

Dor.Automations.MatchEngine.InMemory

An in-memory alias store for the dør Match Engine SDK, held to the same conformance suite as the database stores.

Dor.Automations.MatchEngine.Grpc

The dør Match Engine SDK's transport to the kernel over gRPC, with the contract revision handshake.

Dor.Automations.MatchEngine.Testing

Test support for hosts of the dør Match Engine SDK: a scripted kernel, a manual clock and the alias store conformance suite.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 68 11/26/2026