v0.13.0 Full-text search inside graph queries, from Cypher →

Your OpenSearch indices are already a graph.

YANG-DB maps an ontology onto the indices you already have and answers relationship questions in Cypher, GraphQL or SPARQL. You don't run a second database or a sync pipeline, and no data is copied out.

Span Service Trace
MATCH (:Span)-[:ChildOf]->(:Span)
4
query front-ends: Cypher, GraphQL, SPARQL and the native V1
0
copies of your data: queries read the indices in place
52%
line coverage from unit and integration tests, measured in CI
61%
fewer OpenSearch operations in 0.10 than in 0.9.1
~1,300
tests, integration suites included, on Java 21
Mapping assistant

Name your indices. Get a graph.

You don't write the mapping by hand. The assistant reads your index mappings and a few aggregations, proposes entities and the links between them with the evidence for each, checks the result against your data, and registers it.

Interactive · new in 0.12 · recorded samples or your engine

Map your indices

Name the OpenSearch indices you already have. The mapping assistant suggests one graph across them, with the evidence for every entity and link, checks it against your data, recommends index and query changes, and registers it. Nothing in your indices changes.

  • Watch it build: read, detect, link, derive, name, stage by stage.
  • Experiment: answer its choices, rename anything, suggest again.
  • Six recorded samples (traces, logs, flights, a shop, Dragons), or your own engine.
Try a query · traces

Pick a question and see the pattern it walks.

OpenTelemetry spans, read from the index Data Prepper writes for trace analytics, with no copy and no reshaping. The trace view shows one trace at a time; these patterns ask across every trace at once. Each one runs in CI against OpenSearch on every pull request.

The traces ontology. Service and Trace have no index of their own: they are values of the spans' serviceName and traceId fields.

CypherQ1


          
    Why YANG-DB

    Ask about relationships without moving the data.

    Most OpenSearch clusters already hold connected data: orders that point at customers, logs that point at hosts, alerts that point at users. Getting from one to the other today means hand-written loops of searches, or a second database to keep in sync.

    Joins by hand

    Three hops means three searches, each one feeding ids into a terms query, plus paging, de-duplication and error handling in your application code. That code gets rewritten for every new question.

    A second database

    A separate graph store answers these questions well, but you load the data into it, keep it in sync with OpenSearch, and run, secure and pay for two systems.

    A graph layer on top

    YANG-DB describes your indices as entities and relationships, plans each query from index statistics, and runs it as searches against the cluster you already operate. You write the pattern, and the engine works out the searches.

    The full feature list, how a query runs, and how YANG-DB compares with Neptune, Neo4j and JanusGraph: YANG-DB at a glance.

    Is it for you?

    Where YANG-DB fits.

    It isn't a replacement for a native graph database. It's for when the data is already in OpenSearch and you'd rather query it there than copy it somewhere else. A side-by-side with Neptune, Neo4j and JanusGraph is in the overview.

    ● A good fit when

    • The data is already in OpenSearch and is the source of truth
    • You need multi-hop questions over it: who owns what, which accounts share a device, which hosts an alert touched
    • You want graph queries on the same cluster as your search and dashboards
    • Copying the data into a second store is too costly, too slow or not allowed

    ● Look elsewhere when

    • You need transactional writes through the query language
    • Your questions are unbounded paths or graph algorithms such as shortest path, PageRank or community detection
    • The API must enforce authentication today without a gateway in front
    • The graph doesn't otherwise belong in OpenSearch
    Quickstart

    A graph on OpenSearch, on your laptop, in a minute.

    Docker Compose starts OpenSearch 3.10.1, OpenSearch Dashboards and YANG-DB with the Dragons sample ontology. The loader and the checks need only Python 3's standard library.

    01

    Start the stack

    From a clone of the repository:

    cd docker
    YANGDB_IMAGE=ghcr.io/yang-db/yang.db \
    YANGDB_TAG=0.13.0 \
    docker compose -f docker-compose-os.yml up -d
    curl http://localhost:8888/fuse/health
    02

    Load the Dragons

    This loads about 22,000 rows and checks every documented query against them:

    python3 docker/e2e/doc_queries.py --load --reset
    03

    Ask the graph

    Or open the playground at localhost:8888/dragons/swagger and pick a query from the list.

    curl -H 'Accept: application/json' \
     'http://localhost:8888/fuse/query/cypher/run?ontology=Dragons&cypher=MATCH%20(d:Dragon)%20RETURN%20*'

    No Docker? Unpack the release distribution, set opensearch.hosts in dragon/config/application.conf to your OpenSearch 3.x cluster, and run dragon/start-fuse-service.sh (Java 21).

    Your OpenSearchYANG-DBJavaDocker image
    3.x (tested against 3.10.1)0.13.021ghcr.io/yang-db/yang.db:0.13.0
    2.190.10.111ghcr.io/yang-db/yang.db:0.10.1
    1.30.8.011distribution only

    What each release supports, by OpenSearch, Java and feature: releases and compatibility; what each one added, with links to the docs: release timeline. On Amazon OpenSearch Service: the AWS guide (runs in your VPC; a SigV4 proxy is needed until F1).

    Roadmap

    Where the project is heading.

    Each release runs on a current OpenSearch, is tested end to end in CI, and is measured against the one before. Ideas below are candidates, not commitments.

    Done

    • 0.13.0 released: full-text search and NOT in Cypher, saved results per ontology with a list / delete / expire API
    • 0.12.0 released: your existing indices as a graph, the mapping assistant, several ontologies and saved results on OpenSearch 3.x
    • OpenSearch 3.10.1 and Java 21; 2.19 data opens in place (0.11)
    • OpenSearch 2.19 over REST, replacing the 1.3 transport client (0.9)
    • End-to-end CI: every documented query runs on Docker for each PR
    • A real extension point for query languages and modules
    • Speed work: plain searches, growing bulks, less engine CPU (0.10)
    • Consistent cursors with Point in Time, opt in (0.10)
    • V1 spec published with a JSON Schema (0.10)
    • Saved results: read back page by page and aggregate (0.10.1; 0.12 on 3.x)
    • F21 Existing indices as a graph: event, derived and field mappings, no reindexing (0.12)
    • Several ontologies in one engine, each initialised, loaded and queried (0.12)
    • Interactive examples: OpenTelemetry traces, Flights (reshaped or in place) and Dragons
    • A shorter site: the mapping assistant and traces up front, details in the docs
    • Q25 One relationship type stored in several types' documents, followed from either end; the mapping assistant suggests one type for every source (0.13)
    • F34.1 Text filters: Cypher CONTAINS / STARTS WITH / ENDS WITH and V1 full-text filters correct at every position of a pattern, checked against OpenSearch (0.13)
    • F34.2 Full-text search in Cypher: search.match, match_phrase, query_string, fuzzy at any position in a pattern, checked against OpenSearch (0.13)
    • Q33 NOT in Cypher works, and a condition Cypher can't express is an error instead of being ignored (0.13)
    • Search + graph example page: 17 use cases of text search inside graph patterns, each checked against OpenSearch in CI
    • F22.3 Saved results per ontology: aggregates work for every ontology; list, delete and expire them through the API (0.13)
    • Release timeline: every release and what it added, each feature linked to its docs and examples
    • Agent playbook: measured cost per unit of work, which model does what, and a cost estimate before every task
    • A13 The visualize endpoints draw SVGs again on Java 21: Graphviz in the Docker image (0.13)
    • F32 Mapping assistant: point it at your indices, get one graph across them, checked against your data with advice, then registered; an API, a CLI and a page (0.12)
    • Smaller runtime: Groovy 2.4, rest-assured and test libraries no longer ship in the engine jar

    Ideas

    • F4 Gremlin: a parser spike is done; REST first, then the Gremlin Server protocol
    • F22.4 Graph queries over saved results
    • F12 A Python SDK from the OpenAPI spec
    • F13 Graph exploration in OpenSearch Dashboards
    • Nested objects inside event documents, as entities of their own

    Full plan: ROADMAP.md, and the release timeline. Want one of these sooner? Say so in an issue, or send a pull request.