OpenSearch is a distributed search and analytics engine forked from Elasticsearch 7.10.2. It is licensed under the Apache 2.0 license and developed as a community-driven project, offering a fully open-source alternative to the original software. The suite consists of the OpenSearch engine and the OpenSearch Dashboards visualization interface.
Technical Architecture
Built on Apache Lucene, OpenSearch provides full-text search capabilities. Its distributed architecture comprises clusters, nodes, indices, shards, and documents. A cluster is a collection of nodes, each assigned a specific role. Data nodes store indices—logical groupings of documents—and handle data ingestion, search queries, and aggregations.
Indices are divided into shards, which conttain primary and replica data. Distributing shards across multiple machines enables horizontal scaling, improving performance and storage efficiency.
Comparison with Elasticsearch
| Feature | OpenSearch | Elasticsearch |
|---|---|---|
| License | Apache 2.0 | SSPL / Elastic License / AGPLv3 |
| Security | All security features open-source | Some advanced features require a paid license |
| Community Governance | Open governance model | Led by Elastic NV |
| AI / Vector Search | Rapidly evolving with good compatibility | Native support with ongoing enhancements |
| Deployment | AWS OpenSearch Service / Self-hosted | Elastic Cloud / Self-hosted |
| Migration Path | Smooth migration from Elasticsearch 7.x | Native upgrade path |
Quick Deployment with Docker
1. Deploy OpenSearch
# Pull the Docker image
docker pull opensearchproject/opensearch:3.2.0
# Run a single-node cluster
docker run -d --name opensearch-node \
-p 9200:9200 -p 9600:9600 \
-e "discovery.type=single-node" \
-e "plugins.security.disabled=true" \
opensearchproject/opensearch:3.2.0
2. Deploy OpenSearch Dashboards
# Pull the Dashboards image
docker pull opensearchproject/opensearch-dashboards:3.2.0
# Run Dashboards
docker run -d --name opensearch-dashboards \
-p 5601:5601 \
-e "OPENSEARCH_HOSTS=http://opensearch-node:9200" \
opensearchproject/opensearch-dashboards:3.2.0
3. Verify the Installation
# Check cluster health
curl -X GET "http://localhost:9200/"
A successful response confirms the cluster is running.
4. Index Data and Perform a Search
# Index a document
curl -X POST "http://localhost:9200/test-index/_doc" -H 'Content-Type: application/json' -d'
{
"title": "Getting Started with OpenSearch",
"description": "This is the first document indexed into OpenSearch",
"date": "2025-09-18T10:00:00"
}'
# Execute a search query
curl -X GET "http://localhost:9200/test-index/_search" -H 'Content-Type: application/json' -d'
{
"query": {
"match": {
"description": "first document"
}
}
}'
5. Access the Dashboard
Navigate to http://localhost:5601 in a web browser to use the OpenSearch Dashboards interface.