Task-oriented guides for the OpenSearch Go client. Each guide is the canonical reference for its topic; cross-links point to the single source of truth rather than duplicating content.
- Document Lifecycle - Create, read, update, and delete individual documents.
- Bulk - Index, update, and delete many documents in a single request.
- Search - Query an index and shape the results with search parameters.
- Making Raw JSON REST Requests - Reach endpoints that have no typed method yet by sending a raw JSON body.
- Index Lifecycle - Create, configure, update, and delete indices.
- Index Template - Apply settings, mappings, and aliases to indices matching a name pattern.
- Advanced Index Actions - Clear cache, flush, refresh, force merge, and other maintenance actions.
- Data Streams - Manage append-only time-series data streams.
- Request Routing and Connection Management - The per-request scoring model that routes operations to shard-hosting nodes by proximity, load, and data placement.
- Node Discovery and Role Management - Discover cluster nodes and route by node role.
- Cluster Health Checking - Two-phase health checks and capability detection, including the permissions the Security plugin requires.
- Retry and Backoff - Tune request retries and dead-connection resurrection backoff.
- Error Handling and Partial Failures - The canonical reference for detecting and handling partial failures, including the typed error model and helpers.
- Response Body Lifecycle:
Execute[T],Request, andStream- Choose between the buffered and streaming entry points and understand their body-ownership contracts.
- Tasks - Submit long-running operations asynchronously, poll for completion, and inspect task status.
- Client-Side Metrics - Read a point-in-time snapshot of request counters, connection-pool state, and router cache state.
- Observer-Based Metrics - Turn per-request observer events into metrics; record them to Prometheus with the
osprommodule.
- Environment Variables - The canonical reference for every
OPENSEARCH_GO_*runtime variable. - Security - TLS, certificate verification, authentication, and related configuration.