Skip to content

Conversation

@fboulnois
Copy link
Contributor

@fboulnois fboulnois commented Dec 9, 2025

Addresses

https://broadworkbench.atlassian.net/browse/DT-2541

Summary

This replaces the PR in #2755 . This allows OpenSearch 3 and Elasticsearch 5 to be supported simultaneously. I duplicated the Elasticsearch resources and then cleaned up the code . The following section is required in the docker-compose.yml:

  opensearch:
    image: opensearchproject/opensearch:3
    ports:
      - "9201:9200"
    container_name: opensearch
    volumes:
      - ./osdata:/usr/share/opensearch/data
    environment:
      - DISABLE_SECURITY_PLUGIN=true
      - discovery.type=single-node
      - cluster.routing.allocation.disk.threshold_enabled=false

Have you read CONTRIBUTING.md lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

public Response searchDatasetIndexStream(@Auth DuosUser duosUser, String query) {
try {
InputStream inputStream = elasticSearchService.searchDatasetsStream(query);
InputStream inputStream = openSearchService.searchDatasetsStream(query);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use openSearch for the V2 endpoint.

@fboulnois fboulnois changed the title [DT-2541] Support Elasticsearch and Opensearch simultaneously [DT-2541] Support Elasticsearch 5 and OpenSearch 3 simultaneously Dec 9, 2025
@fboulnois fboulnois marked this pull request as ready for review December 9, 2025 15:14
@fboulnois fboulnois requested a review from a team as a code owner December 9, 2025 15:14
@fboulnois fboulnois requested review from eweitz and kevinmarete and removed request for a team December 9, 2025 15:14
@fboulnois
Copy link
Contributor Author

fboulnois commented Dec 9, 2025

Quality Gate Passed Quality Gate passed

Issues 19 New issues

These are mainly preexisting issues.

Copy link
Contributor

@kevinmarete kevinmarete left a comment

Choose a reason for hiding this comment

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

Looks good, a few nit comments!

@fboulnois fboulnois force-pushed the fb-dt-2541-opensearch-vs-elasticsearch branch from 71d01fa to fd9a56d Compare December 10, 2025 14:33
@sonarqubecloud
Copy link

Copy link
Member

@eweitz eweitz left a comment

Choose a reason for hiding this comment

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

Looks good!

Any work implied by my comments strikes me as reasonable to consider ticketing for later. Looking forward to more performant Data Library filtering.

Comment on lines +59 to +64
openSearch:
servers:
- localhost
indexName: iName
datasetIndexName: dataset
port: 9201
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll need a corresponding helmfile config update to support this: https://github.com/broadinstitute/terra-helmfile/blob/master/charts/consent/templates/_consent.yaml.tpl

Comment on lines +10 to +14
@NotNull private String indexName;

@NotNull private List<String> servers;

@NotNull private String datasetIndexName;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are staging the OpenSearch rollout over time and we don't have values for production, this will likely cause the app to fail on startup.

@fboulnois fboulnois closed this Dec 10, 2025
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.

5 participants