Analytics & OLAP

Elasticsearch 8 vs OpenSearch 2: Which Fork to Choose in 2025?

Two years after the Elastic license change, Elasticsearch and OpenSearch have diverged significantly. Both are mature forks but the right choice depends on your use case, vendor lock-in tolerance, and team expertise.

JusDB Team
April 29, 2025
8 min read
172 views

When Elastic relicensed to SSPL in 2021, many teams were forced to decide quickly — stay with Elasticsearch or fork to what became OpenSearch. In 2025, that decision deserves a fresh look. Both have shipped major releases, diverged meaningfully in features, and established very different ecosystems. The right choice in 2021 may not be the right choice today.

This guide compares Elasticsearch 8 and OpenSearch 2 on licensing, features, performance, managed options, and ecosystem maturity for 2025 production deployments.

TL;DR
  • Elasticsearch 8 leads on vector search, ML inference, and enterprise security features.
  • OpenSearch 2 is Apache 2.0 licensed — safe for any use case including SaaS and cloud providers.
  • AWS OpenSearch Service makes OpenSearch the default for AWS-native deployments.
  • Elasticsearch 8 API compatibility is mostly maintained, but divergence is growing.

Licensing

AspectElasticsearch 8OpenSearch 2
LicenseSSPL + Elastic License 2.0Apache License 2.0
Commercial useRestricted under SSPL (as a service)Unrestricted
SaaS embeddingRequires Elastic agreementPermitted
GovernanceElastic N.V.AWS + Linux Foundation

Feature Comparison: Elasticsearch 8

Native Vector Search (kNN)

Elasticsearch 8 integrated HNSW vector search natively in 8.x, with dedicated dense_vector field types and hardware-accelerated distance calculations:

json
PUT /products
{
  "mappings": {
    "properties": {
      "embedding": {
        "type": "dense_vector",
        "dims": 1536,
        "index": true,
        "similarity": "cosine"
      }
    }
  }
}

POST /products/_search
{
  "knn": { "field": "embedding", "query_vector": [...], "k": 10, "num_candidates": 100 },
  "query": { "match": { "description": "wireless headphones" } }
}

ML Inference Pipelines

Elasticsearch 8 can run ML models (including embedding models) natively in the cluster via its ML node type. This eliminates the need for external embedding services for many search workloads.

Feature Comparison: OpenSearch 2

json
PUT /products/_doc/1
{
  "_source": { "description": "wireless bluetooth headphones" }
}

POST /products/_search
{
  "query": {
    "neural": {
      "embedding": {
        "query_text": "wireless audio",
        "model_id": "your_model_id",
        "k": 10
      }
    }
  }
}

Security: Default On

OpenSearch 2 ships with security enabled by default (TLS, authentication, RBAC) — a meaningful operational improvement over OpenSearch 1.x. Elasticsearch 8 also requires security by default since 8.0.

Managed Service Options

ProviderElasticsearchOpenSearch
AWSSelf-managed only on EC2AWS OpenSearch Service (managed)
Elastic CloudYes (Elastic's own)No
GCPVia Elastic Cloud marketplaceSelf-managed
AzureVia Elastic Cloud marketplaceSelf-managed
Tip

If you are on AWS and want a managed search cluster, OpenSearch Service is the practical default. Elastic Cloud is available via the AWS Marketplace but is an Elastic-billed service, not an AWS-native one.

API Compatibility

OpenSearch 2 maintains backward compatibility with Elasticsearch 7.x APIs for most common operations. However, Elasticsearch 8 APIs have diverged in several areas:

  • Elasticsearch 8 removed the mapping _type field — OpenSearch 2 also did this
  • Vector search API syntax differs between ES8 and OS2
  • Security plugin APIs are incompatible
  • ML node APIs are Elastic-specific and not replicated in OpenSearch
Warning

If you are migrating from Elasticsearch 7 to either ES8 or OS2, test all client code changes carefully. Both dropped _type from the API, which breaks clients that pass document type in requests.

Key Takeaways
  • Choose Elasticsearch 8 for advanced ML inference, enterprise security features, and Elastic's support ecosystem.
  • Choose OpenSearch 2 for Apache 2.0 licensing, AWS-native deployments, and SaaS products where SSPL is a risk.
  • AWS OpenSearch Service is the lowest-friction managed option if you are on AWS.
  • Both support hybrid search (keyword + vector) — benchmark your specific query patterns, not synthetic benchmarks.

Working with JusDB on Search Infrastructure

JusDB helps teams choose between Elasticsearch and OpenSearch, migrate between them, and tune cluster configuration for production search workloads. We have migrated teams from Elasticsearch 7 to both ES8 and OS2 with zero search downtime.

Explore JusDB Migration Services →  |  Talk to a DBA

Share this article

JusDB Team

Official JusDB content team