ADR 010: OpenSearch as the search engine
Status: accepted
Context
The platform needs a search engine to store and query indexed data. OpenSearch, Elasticsearch and Apache Solr were evaluated against three needs:
- OpenID Connect. Centralized authentication through the platform's identity provider, Keycloak.
- Data-level security. A security plugin for fine-grained permissions and roles.
- License. Free to use at large scale, without license restrictions.
Options
| Option | For | Against |
|---|---|---|
| Elasticsearch | Mature and well supported, with a large community and many plugins | License no longer open source; no OpenID Connect support without a commercial license; no guaranteed compatibility with the required security plugins |
| Apache Solr | Fully open source under the Apache License 2.0; strong text search | No native OpenID Connect integration; less mature for strict per-user and per-role permissions; no built-in security plugin for centralized authentication |
| OpenSearch | Fully open source, derived from an open version of Elasticsearch; native OpenID Connect and Keycloak integration through its security plugin; fine-grained data security | A younger community and ecosystem; some Elasticsearch plugins are not directly compatible |
Decision
OpenSearch. It meets the security and authentication requirements natively while remaining open source and free of license fees. Its security plugin uses OpenID Connect to integrate with Keycloak.
Consequences
- Simpler OpenID Connect integration, with centralized management of users and permissions.
- Plugin compatibility has to be checked: some third-party Elasticsearch plugins are not supported, so critical plugins must be validated before adoption.
- Maintenance. OpenSearch releases must be followed to keep long-term compatibility and to adopt new security and authentication features.
See Search engine for how OpenSearch is used and configured.