Shared support for Koan search-engine vector connectors (Elasticsearch / OpenSearch, both built on Apache Lucene): the single source of truth for translating the unified Filter AST into the search-engine query DSL.
Install
| Product | Versions |
|---|---|
| .NET |
README
Koan.Data.SearchEngine
Shared support for the search-engine vector connectors — Koan.Data.Connector.ElasticSearch and
Koan.Data.Connector.OpenSearch. Both engines are built on Apache Lucene and speak the same query
DSL, so the metadata-filter translation lives here once instead of being duplicated per adapter. The
package is named for the engine category (the same convention as Koan.Data.Relational), so the
dependency reads clearly without Lucene-internals knowledge.
SearchEngineFilterTranslator— the single source of truth for translating the unifiedFilterAST into the Elasticsearch/OpenSearch query DSL, plus the oneVectorFilterCapabilitiesconstant both adapters expose.
Capabilities
- Translate the unified
FilterAST → the search-engine query DSL (term/terms/range/wildcard/bool/exists). - One operator-aware
VectorFilterCapabilitiesvalue shared by both adapters. - Null-inclusive negation (
Ne/Nin/HasNone) via Lucenebool/must_not.
Usage
Each connector calls the shared translator, passing its own engine label so a not-supported error names the right adapter:
var query = SearchEngineFilterTranslator.TranslateWhereClause(
options.Filter, metadataField, engine: "Elasticsearch");
Notes:
- The
enginelabel only personalizes not-supported exception messages; the translation is identical. - The repositories stay separate (their REST/transport wiring differs); only the translation and the capability constant are shared.
References
- Vector pathway + filter model:
~/decisions/DATA-0097-vector-pathway-parity.md - Embedding↔vector seam (§10.4, the ES/OS shared base):
~/decisions/AI-0036-embedding-vector-seam.md
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.