Elasticsearch
Elasticsearch is a distributed search and analytics engine used for full-text search, log analysis, and real-time data exploration. Appliku supports provisioning Elasticsearch as a managed database container on your server.
Supported Versions
| Version | Notes |
|---|---|
| Elasticsearch 8.17 | Latest supported release |
Provisioning Elasticsearch
- Open your application in the Appliku dashboard
- On the Application Overview page, scroll to the Databases block (bottom-right sidebar)
- Click Add Database
- Select Elasticsearch 8.17 from the dropdown
- Select the server where Elasticsearch should run
- Click Create
Appliku provisions an Elasticsearch Docker container and generates the connection URL automatically.
Elasticsearch is resource-intensive. Ensure your server has adequate RAM (at least 2 GB free, 4 GB+ recommended) before provisioning. Elasticsearch with insufficient memory will crash or perform poorly.
Connection URL
Once provisioned, Appliku injects the Elasticsearch connection URL as an environment variable:
http://host:port
Your application can use this URL to connect to the Elasticsearch instance.
Common Use Cases
Django with django-elasticsearch-dsl
import os
ELASTICSEARCH_DSL = {
"default": {
"hosts": os.environ.get("ELASTICSEARCH_URL", "http://localhost:9200"),
},
}
Direct Connection with elasticsearch-py
from elasticsearch import Elasticsearch
import os
es = Elasticsearch(os.environ.get("ELASTICSEARCH_URL", "http://localhost:9200"))
# Index a document
es.index(index="articles", id=1, body={"title": "Hello", "content": "World"})
# Search
results = es.search(index="articles", body={"query": {"match": {"content": "world"}}})
Resource Considerations
Elasticsearch uses significant memory for indexing and querying. Keep the following in mind:
| Server RAM | Suitability |
|---|---|
| 1 GB | Not recommended |
| 2 GB | Minimal workloads only |
| 4 GB | Small to medium datasets |
| 8 GB+ | Production workloads |
If you are running Elasticsearch alongside your application and a PostgreSQL database on the same server, ensure you have enough headroom for all services. Monitor your server's RAM usage from the Appliku dashboard.
Managing Elasticsearch
From the Application Overview page, click Manage in the Databases card to:
- Start / Stop / Restart the Elasticsearch container
- View logs for debugging indexing or query issues
- Delete the instance (all indexed data is lost)
Next Steps
- Database Management Overview -- All supported database engines
- PostgreSQL -- Primary relational database