OpenSearch is a free, open-source search engine forked from Elasticsearch

OpenSearch is a search and analytics engine that Amazon created in 2021 by copying the code from Elasticsearch version 7.10. When Elasticsearch changed its license to prevent cloud providers from offering it as a managed service, Amazon took the last freely licensed version, renamed it OpenSearch, and released it under the Server Side Public License (SSPL) and the Elastic License alternative. Anyone can download, modify, and run OpenSearch without paying a license fee.

OpenSearch works the same way Elasticsearch does: you send it documents (usually as JSON), it indexes them, and you search through them using a query language. It powers search boxes on websites, log analysis tools, and security monitoring systems. The main difference from Elasticsearch is that OpenSearch is maintained by Amazon and the open-source community, while Elasticsearch is maintained by Elastic, the company that originally built the software.

If you are running your own servers or using Amazon Web Services (AWS), OpenSearch is available as a managed service called Amazon OpenSearch Service. If you want to run it yourself on your own hardware or any cloud provider, you can download the software for free and install it.

Key Takeaways

  • OpenSearch is a free copy of Elasticsearch that Amazon maintains, created when Elasticsearch changed its licensing terms in 2021.
  • You can run OpenSearch on your own servers or use Amazon's managed version without paying licensing fees.
  • OpenSearch and Elasticsearch are similar enough that knowledge of one transfers to the other, but they are diverging as each adds new features.
  • OpenSearch includes built-in security features like encryption and user authentication that Elasticsearch requires separate plugins to add.

Why Amazon created OpenSearch

Elasticsearch was originally released under an open-source license that let anyone use it freely. In January 2021, Elastic changed the license to the Elastic License and Server Side Public License (SSPL), which prevented cloud companies from offering Elasticsearch as a managed service without paying Elastic. Amazon, which was already offering Elasticsearch through AWS, could not continue under the new terms.

Rather than pay Elastic's licensing fees, Amazon forked Elasticsearch at version 7.10 — the last version released under the old open license — and created OpenSearch. A fork means Amazon took the entire codebase, renamed it, and began maintaining it separately. This is legal under open-source licensing, and it meant Amazon could continue offering search functionality to its customers without licensing costs.

Elastic still maintains Elasticsearch as a separate product. The two projects now develop independently, so new features added to one do not automatically appear in the other.

How OpenSearch and Elasticsearch differ today

OpenSearch and Elasticsearch started from the same code, so they are similar enough that someone who knows one can usually work with the other. Both use the same query language, both store data in indexes, and both work with JSON documents. However, they have diverged since the fork.

OpenSearch includes security features built in — encryption, user authentication, and role-based access control — without requiring additional plugins. Elasticsearch offers these features through separate paid plugins or through Elastic Cloud, its managed service. OpenSearch also added features that Elasticsearch does not have, such as anomaly detection and machine learning capabilities designed for security monitoring.

Elasticsearch has added features OpenSearch does not have, and Elasticsearch versions are now ahead of OpenSearch in version numbering. If you are choosing between them, check whether the specific features you need exist in the version you plan to use.

When you would use OpenSearch instead of other search engines

OpenSearch makes sense if you need a search engine but cannot or do not want to pay licensing fees. It is also the right choice if you are already using AWS and want a managed search service without vendor lock-in concerns — you can move your data to a self-hosted OpenSearch instance or another search engine if you need to.

OpenSearch is less common than Elasticsearch in job postings and training materials, so if you are learning search technology for employment, Elasticsearch has a larger community and more learning resources. However, the skills transfer between them, so learning one teaches you most of what you need to know about the other.

If you need a search engine for a small project or internal tool, OpenSearch's free licensing and built-in security make it a practical choice. For large-scale production systems, you would need to evaluate whether the managed AWS version or self-hosting makes sense for your infrastructure and budget.

How to run OpenSearch

You have two main options: use Amazon OpenSearch Service (the managed version) or download and run OpenSearch yourself.

Amazon OpenSearch Service handles the infrastructure for you — you create a domain (which is AWS's term for a search cluster), choose how many nodes you want, and AWS manages backups, updates, and scaling. You pay for the compute resources you use, similar to how you would pay for any AWS service. This is simpler than running it yourself but costs money.

To run OpenSearch yourself, download the software from opensearch.org, install it on a server or virtual machine, and configure it. You need to handle your own backups, security updates, and scaling. This is free but requires more technical work. OpenSearch requires Java to run, so you need a server with Java installed.

OpenSearch versus Elasticsearch for your search needs

If cost is your main concern, OpenSearch is free and Elasticsearch requires a license (unless you use the very limited free tier). If you need built-in security features without extra plugins, OpenSearch includes them. If you need the latest features or the largest community of users, Elasticsearch has both.

If you are already on AWS, OpenSearch Service is simpler to set up than managing Elasticsearch yourself. If you use a different cloud provider or prefer not to use AWS, you can run OpenSearch on any infrastructure that supports Java, or you can use a managed Elasticsearch service from another vendor.

The choice often comes down to whether you want to pay for Elasticsearch's features and support, or whether OpenSearch's free licensing and built-in security are enough for what you are building.

Frequently Asked Questions

Is OpenSearch the same as Elasticsearch?

OpenSearch started as a copy of Elasticsearch version 7.10, so they are similar, but they have diverged. Both use the same query language and data format, so knowledge transfers between them. However, new features added to one do not automatically appear in the other, and they now have different capabilities.

Do I need to pay to use OpenSearch?

No. OpenSearch is free to download and run yourself. If you use Amazon OpenSearch Service, you pay for the AWS resources you use, not for the software itself. The software license is free under the SSPL.

Can I move from Elasticsearch to OpenSearch or vice versa?

Moving between them is possible but requires work. You would need to export your data from one system and import it into the other, and you may need to adjust your queries or configuration if you are using features that only exist in one system. The core functionality is similar enough that the migration is usually straightforward.

Which search engine should I learn if I want a job in tech?

Elasticsearch appears in more job postings and has a larger community of learning resources. However, learning either one teaches you the core concepts, and the skills transfer between them. If you have access to OpenSearch, learning it is valuable — employers who use Elasticsearch will recognize that you understand search technology.

What does "open source" mean in OpenSearch?

Open source means the source code is publicly available and you can read it, modify it, and redistribute it under the terms of the license. OpenSearch is open source under the SSPL, which means you can use it freely but cannot offer it as a service to others without contributing changes back to the project.