Elasticsearch vs OpenSearch

In 2021 Elastic moved Elasticsearch and Kibana from the Apache 2.0 license to the Server Side Public License and the Elastic License. AWS responded by forking the last Apache-licensed versions, Elasticsearch 7.10.2 and Kibana 7.10.2, as OpenSearch and OpenSearch Dashboards. Both projects have shipped major releases since and have steadily diverged. In 2024 Elastic added the AGPLv3 as a license option for Elasticsearch, and OpenSearch moved to the vendor-neutral OpenSearch Software Foundation under the Linux Foundation.

Short verdict: choose Elasticsearch when you want the most advanced search, observability, and AI features from one vendor, especially on Elastic Cloud. Choose OpenSearch when you want a permissive Apache 2.0 license, foundation governance, security features without license tiers, or tight integration with Amazon OpenSearch Service. For most core search and logging workloads, both are capable; the deciding factors are licensing, ecosystem, and where you want to run it.

TL;DR

Quick Example

The core search request is still the same on both:

Lifecycle management, vector fields, and many newer features are not. A 30-day retention rule looks like this in each:

Plan migrations around differences like these, not around the query DSL that still matches.

Core Concepts

Head-to-Head

Compatibility and Divergence

At the fork, index formats, REST APIs, and the query DSL matched. Since then each project has upgraded Lucene independently, renamed or added APIs (OpenSearch uses _plugins/ paths for plugin APIs), and built features with no counterpart on the other side. Elasticsearch clients since 7.14 check that they are talking to Elasticsearch, so applications use the OpenSearch clients for OpenSearch. Snapshot restore works across the fork only for older versions; moving from Elasticsearch 8 or later to OpenSearch (or back) means reindexing or a migration tool.

Features and Licensing

Elastic bundles capabilities by subscription tier: basic security and many features are free, while document- and field-level security, some machine-learning features, and advanced connectors require paid tiers or Elastic Cloud. OpenSearch includes its plugins — security, alerting, anomaly detection, k-NN, cross-cluster replication — in the Apache-licensed distribution.

Pace and Focus

Elastic invests heavily in search relevance and AI (semantic search, learned sparse retrieval, inference endpoints, reranking) and in observability and security products built on Elasticsearch. OpenSearch development is spread across AWS and other foundation members, with strong work on vector search, performance, and observability, and a broader set of companies contributing.

The Decision Framework

Migration Considerations

Best Practices

Decide on Licensing Up Front

If you embed search in a product or offer it as a service, review the licenses with legal counsel before building. Licensing constraints are expensive to discover later.

Avoid Lock-In Where It Is Cheap

Keep the query DSL in a thin search layer, keep data reproducible from a primary store, and avoid proprietary features where a portable alternative is just as good.

Benchmark Your Own Workload

Vendor benchmarks differ widely. Test your mappings, queries, and ingest rates on both before choosing on performance.

Follow Each Project's Upgrade Path

Both ship frequent releases with security fixes. Plan regular upgrades within whichever project you choose rather than staying on the fork-era 7.10 line.

Common Mistakes

Assuming Drop-In Compatibility

Choosing on Fork History Alone

Staying on 7.10 Forever

FAQ

Is OpenSearch the same as Elasticsearch?

No. OpenSearch started as a fork of Elasticsearch 7.10.2 and shares its core concepts and query DSL, but both have evolved separately since 2021 with different features, APIs, clients, and licenses.

Is Elasticsearch open source again?

Since 2024, Elasticsearch can be used under the AGPLv3, an OSI-approved open-source license, alongside the Elastic License 2.0 and SSPL. OpenSearch remains under the more permissive Apache 2.0 license.

Can I migrate from Elasticsearch to OpenSearch?

Yes. Older Elasticsearch versions can restore snapshots into compatible OpenSearch versions; newer versions require reindexing, for example via reindex-from-remote or migration tooling. Clients, dashboards, and lifecycle policies also need translating.

Which is faster?

It depends on the workload, version, and configuration. Both are built on Apache Lucene and publish benchmarks favoring themselves. Test your own data and queries.

Which should I use for vector search?

Both support approximate nearest-neighbor and hybrid search. Elasticsearch offers tightly integrated semantic search features; OpenSearch offers flexible engines and neural search plugins. Choose based on the rest of your stack and hosting.

Related Topics

References