--- id: elasticsearch title: Elasticsearch --- # Elasticsearch ToolJet can connect to your Elasticsearch cluster to read and write data. ## Connection Please make sure the host/IP of the Elasticsearch cluster is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please **whitelist our IP**. To establish a connection with the ElasticSearch data source, you can either click on the `+Add new data source` button located on the query panel or navigate to the **[Data Sources](/docs/data-sources/overview)** page through the ToolJet dashboard. ToolJet requires the following to connect to your Elasticsearch cluster: - **Host** - **Port** - **Username** - **Password**
## Querying Elasticsearch
Click on `+` button of the query manager at the bottom panel of the editor and select the Elasticsearch added in the previous step as the data source.
Select the operation that you want to perform on your Elasticsearch cluster and click `Create` to save the query.
#### Index a document
This operation allows you to add a JSON document to the specified data stream or index. Read the Elasticsearch's `Index` guide **[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html)**.
#### Get a document
This operation allows you to retrieve the specified JSON document from the index. Read the Elasticsearch's `Get` guide **[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html)**.
#### Update a document
This operation allows to update a document using the specified script. Read the Elasticsearch's `Update` guide **[here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html)**.