How elastic/go-elasticsearch works
go-elasticsearch is the official Go client for Elasticsearch. A Go application configures the client, selects a low-level or typed API operation, and sends an HTTP request to an Elasticsearch cluster; typed query builders can help assemble request bodies. The client also exposes broad API families for search, document updates, ingest, security, and cluster operations, plus documented bulk-indexing and observability capabilities. The graph groups generated endpoints by domain rather than listing every operation. Sampled request code shows transport-backed API calls; links between client setup and endpoint families follow the README’s documented usage, not inspected root wiring.
Main entry points: typedapi Typed API · elasticsearch.go Client setup · esapi Low-level APIs · ingest Ingest pipelines
Components 25
Client surface
- Client setup
elasticsearch.go - HTTP transport
- Low-level APIs
esapi - Typed API
typedapi
Search and query
- Search operations
typedapi/esql - Search applications
typedapi/searchapplication/renderquery/render_query.go - Query validation
typedapi/indices/validatequery/validate_query.go - Async ES|QL
typedapi/esql/asyncquery/async_query.go - SQL queries
typedapi/sql/query/query.go
Data and ingest
- Document updates
typedapi/core/updatebyquery/update_by_query.go - Document deletes
typedapi/core/deletebyquery/delete_by_query.go - Ingest pipelines
typedapi/ingest - Logstash pipelines
typedapi/logstash - Pipeline models
typedapi/types/ingestpipeline.go - Pipeline builders
typedapi/esdsl/ingestpipeline.go - Bulk indexing
_examples/bulk/indexer.go
Cluster and security
- Task listings
typedapi/cat/tasks/tasks.go - Snapshot analysis
typedapi/snapshot/repositoryanalyze/repository_analyze.go - Security APIs
typedapi/security/queryapikeys/query_api_keys.go - Watch queries
typedapi/watcher/querywatches/query_watches.go
Client capabilities
- Query builders
typedapi/esdsl - Observability hooks
_examples/instrumentation - Interceptors
_examples/interceptor
Other components
- Go application
- Elasticsearch
Connections 25
- Go application → Client setup: configures
- Go application → Low-level APIs: uses
- Go application → Typed API: uses
- Client setup → HTTP transport: configures
- Low-level APIs → Elasticsearch: sends requests
- Typed API → Elasticsearch: sends requests
typedapi/ingest/putpipeline/put_pipeline.go - Typed API → Search operations: exposes
typedapi/esql/asyncquery/async_query.go - Typed API → Search applications: exposes
typedapi/searchapplication/renderquery/render_query.go - Typed API → Query validation: exposes
typedapi/indices/validatequery/validate_query.go - Typed API → Async ES|QL: exposes
typedapi/esql/asyncquery/async_query.go - Typed API → SQL queries: exposes
typedapi/sql/query/query.go - Typed API → Document updates: exposes
typedapi/core/updatebyquery/update_by_query.go - Typed API → Document deletes: exposes
typedapi/core/deletebyquery/delete_by_query.go - Typed API → Ingest pipelines: exposes
typedapi/ingest/getpipeline/get_pipeline.go - Typed API → Logstash pipelines: exposes
typedapi/logstash/getpipeline/get_pipeline.go - Typed API → Task listings: exposes
typedapi/cat/tasks/tasks.go - Typed API → Snapshot analysis: exposes
typedapi/snapshot/repositoryanalyze/repository_analyze.go - Typed API → Security APIs: exposes
typedapi/security/queryapikeys/query_api_keys.go - Typed API → Watch queries: exposes
typedapi/watcher/querywatches/query_watches.go - Ingest pipelines → Pipeline models: uses models
typedapi/ingest/putpipeline/put_pipeline.go - Pipeline builders → Pipeline models: builds
typedapi/esdsl/ingestpipeline.go - Typed API → Query builders: offers builders
typedapi/esdsl/ingestpipeline.go - Go application → Bulk indexing: can bulk index
- Go application → Observability hooks: can instrument
- Go application → Interceptors: can customize