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.
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
Driverinterface using Go'snet/httpclient:POST /{index}/_searchrequests, supporting two call patterns (raw JSON string, or index + query map from JS). Returns hit count fromhits.hitslength, aggregation buckets, orhits.total.valuePOST /_bulkusing NDJSON format_bulkindex operations with_idset from key columnsHTTP client uses a 15-minute timeout. TLS verification is optionally skippable for development.