Skip to content

Audit and validate the Elasticsearch/OpenSearch shared driver #35

Description

@jamessewell

If you're an Elasticsearch or OpenSearch expert, we'd love your help reviewing our shared Elastic driver.

What this driver does

The shared Elastic driver (backends/shared/elastic/) powers two backends: Elasticsearch and OpenSearch. Each registers with different config (TLS defaults, version info field names) but they share this single HTTP-based driver.

It implements the Driver interface using Go's net/http client:

  • Exec — parses JSON as either a single object (creates an index with settings/mappings) or an array of operations (POST/PUT/DELETE with configurable endpoints, params, and bodies)
  • Query — sends POST /{index}/_search requests, supporting two call patterns (raw JSON string, or index + query map from JS). Returns hit count from hits.hits length, aggregation buckets, or hits.total.value
  • Insert — bulk indexes documents via POST /_bulk using NDJSON format
  • Update — upserts via _bulk index operations with _id set from key columns
  • CaptureConfig — fetches cluster info from the root endpoint (version, cluster name, Lucene version)

HTTP client uses a 15-minute timeout. TLS verification is optionally skippable for development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions