RousselTMLEARNING

Observability

OpenSearch: concepts, architecture and differences with Elasticsearch

Understanding OpenSearch: project origin, license, differences with Elasticsearch, indexes, shards, replicas, cluster manager, cluster states and components.

1. OpenSearch at a glance #

An open source search and analytics engine.

Overview #

OpenSearch is a distributed search and analytics engine built on Apache Lucene, with its console OpenSearch Dashboards. It serves application search, log analytics, observability, security and, increasingly, vector search. All its components are published under the Apache 2.0 license.

Its history with Elasticsearch #

In 2021, Elastic moved Elasticsearch and Kibana away from the Apache 2.0 license. AWS and contributors then created OpenSearch from the last Apache 2.0 versions (7.10). Since 2024, the project has been hosted by the OpenSearch Software Foundation, within the Linux Foundation. Elastic in turn added an AGPL option to its licenses in 2024.

PointOpenSearchElasticsearch
LicenseApache 2.0Elastic License, SSPL or AGPL, at your choice
Security, alerting, ISMIncluded pluginsDepends on the subscription
Index lifecycleISM (_plugins/_ism)ILM
LanguagesDSL, SQL, PPLDSL, SQL, ES|QL
ConsoleOpenSearch DashboardsKibana
The two projects have diverged. Concepts and much of the API remain common, but do not assume that a configuration, client or plugin is compatible: check. Some official Elasticsearch clients refuse to connect to OpenSearch; use the OpenSearch clients.

2. Concepts #

Indexes, shards and replicas.

Vocabulary #

ConceptMeaning
DocumentA JSON object
IndexA collection of documents
ShardA piece of an index, which is a Lucene index
Primary / replicaThe original and its copy
MappingThe type of each field
Cluster managerNode managing cluster state: the former “master”

The cluster #

An OpenSearch cluster with its shards and replicas
The number of primaries is set at index creation; the number of replicas can change at any time.
StateMeaningWhat to do?
greenAll shards are assignedNothing
yellowSome replicas are unassignedNormal with a single node; otherwise, add a node
redSome primaries are missingUrgent: data is unavailable

3. Components #

What surrounds the engine.

The ecosystem #

ComponentPurpose
OpenSearch DashboardsExploration, visualizations, administration
Data PrepperCollection and transformation, recommended for ingestion
Included pluginsSecurity, Alerting, Index Management, SQL/PPL, k-NN, Observability, Anomaly Detection…

The official 3.9 archive ships these plugins and its own JDK; list them with GET _cat/plugins.

4. Migrating from Elasticsearch #

Snapshot, reindex or Migration Assistant.

The paths #

Migration paths
FromMethodNote
Elasticsearch 7.0 – 7.10snapshot / restoreto OpenSearch 1.x or 2.x, then upgrade to 3.x after reindexing indexes created in 7.x
Elasticsearch 7.11+, 8.xremote reindexthe snapshot format is no longer compatible
All, large volumesMigration Assistantproject tool: data copy, traffic capture and replay, gradual cut-over

One rule to remember: an OpenSearch major version reads indexes created by the previous major version, no further. OpenSearch 3 reads indexes created in 2.x; an index born in 7.x must be reindexed first.

Remote reindex #

First allow the source host in opensearch.yml (reindex.remote.allowlist: "es-old:9200"), then run:

POST _reindex?wait_for_completion=false
{
  "source": {
    "remote": {"host": "http://es-ancien:9200", "username": "lecteur", "password": "…"},
    "index": "logs-2026.11.*"
  },
  "dest": {"index": "logs-2026.11"}
}

The response gives a task ID, to follow with GET _tasks/<id>. Create the target index template first, otherwise types will be guessed.

Clients and collectors #

ToolWith OpenSearch
Recent Elastic clientsrefuse a server that is not Elasticsearch: switch to opensearch-py, opensearch-java, opensearch-js, opensearch-go… clients
Beatsonly old OSS versions (7.12 at most) work: prefer Fluent Bit, the OTel Collector or Data Prepper
Logstashwith the logstash-output-opensearch plugin
Kibanareplaced by OpenSearch Dashboards; saved objects can be partly re-imported
Watch out : Elastic-specific features (ES|QL, ILM, Elastic Agent, Elastic machine learning) have no direct equivalent: list them before migrating and plan for PPL, ISM and OpenSearch plugins.

5. When to choose OpenSearch? #

The criteria for an informed choice.

Criteria #

CriterionWhat to look at
LicenceApache 2.0 without restriction, security and alerting features included
Governanceneutral foundation (Linux Foundation), contributors from several companies
Ecosystemmanaged services, Data Prepper, OpenTelemetry, vector search
Existing setupmigration cost of clients, dashboards and rules
Best practice : Run a proof of concept on your own data: volume, typical queries, key dashboards. That is what decides, not a comparison table.

Commands to know #

Commands to know
  • GET / : version and distribution
  • GET _cat/plugins?v : installed plugins
  • POST _reindex : copy or migrate data
  • GET _tasks?actions=*reindex&detailed : follow a reindex

Related articles

The OpenSearch cluster in depth: nodes, shards and replication

Understanding how an OpenSearch cluster works inside: node roles, cluster manager election, shard allocation,…

Full-text search in OpenSearch: analyzers and relevance

Mastering full-text search: inverted index, analyzers (including French), the _analyze API, match, multi_matc…

Advanced aggregations, PPL and SQL in OpenSearch

Analyzing data in OpenSearch: bucket, metric and pipeline aggregations, date histograms, approximate cardinal…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!