Skip to content

feat: add opensearch search backend module#275

Open
dschmidt wants to merge 2 commits intoopencloud-eu:mainfrom
dschmidt:feat/opensearch-module
Open

feat: add opensearch search backend module#275
dschmidt wants to merge 2 commits intoopencloud-eu:mainfrom
dschmidt:feat/opensearch-module

Conversation

@dschmidt
Copy link
Copy Markdown
Contributor

@dschmidt dschmidt commented Apr 21, 2026

Summary

  • Adds search/opensearch.yml — a single-node OpenSearch deployment wired up as the opencloud search engine backend (SEARCH_ENGINE_TYPE=open-search).
  • Usable via -f search/opensearch.yml or by adding the file to COMPOSE_FILE in .env.

Notes

  • Security plugin disabled. OpenSearch is only reachable on the internal opencloud-net bridge (no published port). Do not publish or reverse-proxy this without first enabling the security plugin and providing real credentials.
  • Disk-based shard allocation watermarks disabled. Otherwise OpenSearch marks indices read-only when the host disk falls below 5% free, which silently turns bulk upserts into no-ops — a hard-to-diagnose failure mode on modest dev disks. The comment in the file calls out the tradeoff.
  • Healthcheck gates on cluster status yellow (single-node clusters can't go green — replicas have nowhere to land). opencloud waits on that via depends_on: service_healthy.

Test plan

  • docker compose -f docker-compose.yml -f search/tika.yml -f search/opensearch.yml up -d
  • Upload files; confirm curl http://opensearch:9200/opencloud-resources/_count grows
  • Confirm search from OpenCloud UI works

Adds search/opensearch.yml — a single-node OpenSearch deployment wired up
as the opencloud search engine backend via SEARCH_ENGINE_TYPE=open-search.

The security plugin is disabled because the service is only reachable on
the internal opencloud-net bridge (no published port). Do not publish or
proxy this without enabling the security plugin first.

The disk-based shard allocation watermarks are disabled so the index
does not flip to read-only on modest disks, which otherwise silently
turns bulk upserts into no-ops.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Docker Compose module to run OpenSearch as the OpenCloud search backend for local/dev deployments.

Changes:

  • Introduces search/opensearch.yml to deploy a single-node OpenSearch service.
  • Wires the opencloud service to use OpenSearch via SEARCH_ENGINE_TYPE=open-search and related env vars.
  • Adds a healthcheck and depends_on: condition: service_healthy gating for startup ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread search/opensearch.yml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants