Ananke.Postgres
0.9.1
dotnet add package Ananke.Postgres --version 0.9.1
NuGet\Install-Package Ananke.Postgres -Version 0.9.1
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="Ananke.Postgres" Version="0.9.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ananke.Postgres" Version="0.9.1" />
<PackageReference Include="Ananke.Postgres" />
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 Ananke.Postgres --version 0.9.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ananke.Postgres, 0.9.1"
#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 Ananke.Postgres@0.9.1
#: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=Ananke.Postgres&version=0.9.1
#tool nuget:?package=Ananke.Postgres&version=0.9.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ananke.Postgres
PostgreSQL provider for Ananke: PostgresKnowledgeStore (IKnowledgeStore) and PostgresKnowledgeCatalog
(IKnowledgeCatalog), on pgvector for embedding search and Postgres full-text search for keywords. Experimental
(ANNKEEXP004).
Install
dotnet add package Ananke.Postgres
Needs Postgres with the pgvector extension available. Quickest way:
docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres pgvector/pgvector:pg17
Quick start
#pragma warning disable ANNKEEXP004
using Ananke.Orchestration.Knowledge;
using Ananke.Postgres;
using Npgsql;
await using var dataSource = NpgsqlDataSource.Create("Host=localhost;Username=postgres;Password=postgres");
var store = new PostgresKnowledgeStore(dataSource, embedder, new PostgresKnowledgeOptions { Table = "docs_chunks" });
await store.UpsertAsync([new KnowledgeDocument { Id = "0001#0", Text = "Core.Identity is built on OpenIddict" }]);
var dense = await store.SearchAsync("token server library");
var keywords = await store.SearchAsync("OpenIddict", new SearchOptions { Mode = SearchMode.Sparse });
var both = await store.SearchAsync("Which library is Core.Identity built on?", new SearchOptions { Mode = SearchMode.Hybrid });
- Search modes.
Denseranks by cosine distance (HNSW index).Sparsematches any of the query's words in a generatedtsvectorcolumn (GIN index), ranked byts_rank_cd.Hybridfuses both by reciprocal rank. - Metadata is
jsonb; aKnowledgeFiltermatches rows whose metadata contains every key and value given. - Deletes remove rows.
DeleteAsyncwith an empty filter empties the table. - One embedder per table. The table is stamped with the embedder's
Identityand vector length inananke_embedders; a store whose embedder differs is refused, naming both. - Created on first use: the
vectorextension, the table and its indexes. The role needs the rights to create them, or they must already exist.
Options
| Option | Default | What it does |
|---|---|---|
Table |
ananke_knowledge (ananke_catalog for the catalog) |
The table, optionally schema-qualified; lower-case letters, digits, underscores |
TextSearchConfiguration |
simple |
How keyword search reads text: simple keeps words as they are; english stems them |
Dimensions |
from the embedder | The vectors' length, when the embedder's identity doesn't say |
| Product | Versions 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.
-
net10.0
- Ananke.Abstractions (>= 0.9.1)
- Ananke.Orchestration.Knowledge (>= 0.9.1)
- Npgsql (>= 10.0.3)
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.9.1 | 93 | 11/3/2026 |