IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Getting started with the API
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Getting started with the API
editThe new typed client can be obtained from the elasticsearch package using the
NewTypedClient function. This new API takes the same arguments as the previous
one and uses the same transport underneath.
Connection to an Elasticsearch cluster is identical to the existing client, only the API changes:
client, err := elasticsearch.NewTypedClient(elasticsearch.Config{
// Proper configuration for your {es} cluster.
})
The code is generated from the elasticsearch-specification.