Skip to main content

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:

  1. OpenID Connect. Centralized authentication through the platform's identity provider, Keycloak.
  2. Data-level security. A security plugin for fine-grained permissions and roles.
  3. License. Free to use at large scale, without license restrictions.

Options​

OptionForAgainst
ElasticsearchMature and well supported, with a large community and many pluginsLicense no longer open source; no OpenID Connect support without a commercial license; no guaranteed compatibility with the required security plugins
Apache SolrFully open source under the Apache License 2.0; strong text searchNo native OpenID Connect integration; less mature for strict per-user and per-role permissions; no built-in security plugin for centralized authentication
OpenSearchFully open source, derived from an open version of Elasticsearch; native OpenID Connect and Keycloak integration through its security plugin; fine-grained data securityA 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​

  1. Simpler OpenID Connect integration, with centralized management of users and permissions.
  2. Plugin compatibility has to be checked: some third-party Elasticsearch plugins are not supported, so critical plugins must be validated before adoption.
  3. 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.