1. Get Elasticsearch Connection String
Retool requires a connection string of the following format:
https://[username]:[password]@[host]
Whoever set up your Elasticsearch instance should be able to provide you with these parameters.
Minimum Privileges
Make sure that your Elasticsearch user has at least read privileges as well as cluster monitoring privileges!
2. Add to Retool
Create a new resource in Retool, and select "Elasticsearch" as the type. Enter a label by which you want to refer to this Elasticsearch integration. Enter the connection string obtained from the previous step, and click "Save".
Resources > Add > Elasticsearch


3. Create Queries
You can now select your newly created Elasticsearch resource from the Resource dropdown when creating queries in your Retool apps.


You can display the results of Elasticsearch queries as with any other query in Retool. Note that the actual data is nested 2 levels inside the data
key, so instead of accessing it using esQuery.data
, you instead need to use esQuery.data.hits.hits
.


Updated 7 months ago