[[getting-started-go]]
== Getting started

This page guides you through the installation process of the Go client, shows 
you how to instantiate the client, and how to perform basic Elasticsearch 
operations with it. You can use the client with either a low-level API or a 
fully typed API. This getting started shows you examples of both APIs.

[discrete]
=== Requirements

Go version 1.21+

[discrete]
=== Installation 

To install the latest version of the client, run the following command:

[source,shell]
--------------------------
go get github.com/elastic/go-elasticsearch/v8@latest
--------------------------

Refer to the <<installation>> page to learn more.


[discrete]
=== Connecting

include::tab-widgets/connecting-widget.asciidoc[]


Your Elasticsearch endpoint can be found on the **My deployment** page of your 
deployment:

image::images/es-endpoint.jpg[alt="Finding Elasticsearch endpoint",align="center"]

You can generate an API key on the **Management** page under Security.

image::images/create-api-key.png[alt="Create API key",align="center"]

For other connection options, refer to the <<connecting>> section.


[discrete]
=== Operations

Time to use Elasticsearch! This section walks you through the basic, and most 
important, operations of Elasticsearch. For more operations and more advanced 
examples, refer to the <<examples>> page.


[discrete]
==== Creating an index

include::tab-widgets/create-index-widget.asciidoc[]


[discrete]
==== Indexing documents

include::tab-widgets/index-document-widget.asciidoc[]


[discrete]
==== Getting documents

include::tab-widgets/get-documents-widget.asciidoc[]


[discrete]
==== Searching documents

include::tab-widgets/search-documents-widget.asciidoc[]


[discrete]
==== Updating documents

include::tab-widgets/update-documents-widget.asciidoc[]


[discrete]
==== Deleting documents

include::tab-widgets/delete-documents-widget.asciidoc[]


[discrete]
==== Deleting an index

include::tab-widgets/delete-index-widget.asciidoc[]


[discrete]
== Further reading

* Learn more about the <<typedapi>>, a strongly typed Golang API
for {es}.
