Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a26801e
init
Junjiequan Feb 24, 2026
1467a31
modified api code
Junjiequan Mar 2, 2026
5dc47b2
renaming elasticSearch to Opensearch
Junjiequan Mar 4, 2026
8f62b6d
refactor opensearch query logic
Junjiequan Mar 9, 2026
802b389
load settings & mappings from json file
Junjiequan Mar 10, 2026
364d050
Set opensearchService optional in datasetService
Junjiequan Mar 10, 2026
a2ee660
fix type error
Junjiequan Mar 11, 2026
5097402
fix unit test
Junjiequan Mar 11, 2026
bf1d914
update api test for opensearch
Junjiequan Mar 11, 2026
fe1adc1
fix opensearch api test
Junjiequan Mar 11, 2026
0ce95e9
added missing host for api test
Junjiequan Mar 11, 2026
abef90e
fix api test
Junjiequan Mar 11, 2026
f1e56ba
isIndexExists to return boolean value instead of body & fix opensearc…
Junjiequan Mar 11, 2026
cd31ac6
revert removed testData
Junjiequan Mar 11, 2026
b5b9aa4
fix api test
Junjiequan Mar 11, 2026
08da048
update unit tests
Junjiequan Mar 11, 2026
7d1d5a7
minor type correction for createFullfacetPipeline
Junjiequan Mar 11, 2026
355816b
add interface IDatasetOpenSearchPipeline for opensearch fullfacet pip…
Junjiequan Mar 11, 2026
ff37d33
minor check change for osEnabled
Junjiequan Mar 11, 2026
c9982e2
remove unused configs & update env example
Junjiequan Mar 12, 2026
b3f3216
remove unused compose files & replace es image from all compose files…
Junjiequan Mar 16, 2026
838d6a7
fix for permission filter
Junjiequan Mar 16, 2026
710975f
update default OS password for local development and remove .env.open…
Junjiequan Mar 17, 2026
f97d8df
correct prepare:local command
Junjiequan Mar 17, 2026
905fee3
update opensearch doc
Junjiequan Mar 17, 2026
ed4e3cd
update documentation
Junjiequan Mar 17, 2026
0cd3c6f
add api test for search query
Junjiequan Mar 18, 2026
c0ef935
centralize os query condition in one place
Junjiequan Mar 18, 2026
5e12c27
test1
Junjiequan Mar 18, 2026
2d703c5
test
Junjiequan Mar 18, 2026
a1b3f61
change dataset name in TestData.js used for api test
Junjiequan Mar 18, 2026
504a7ab
add OPENSEARCH_REFRESH="wait_for" for API test
Junjiequan Mar 18, 2026
81afa33
avoid multi os config loading
Junjiequan Mar 18, 2026
f7ed6fd
run os connection retry on background
Junjiequan Mar 18, 2026
e0421ce
remove isAdmin
Junjiequan Mar 19, 2026
63f6f05
fix os api test
Junjiequan Mar 19, 2026
a27ee4e
add bulk sync
Junjiequan Mar 19, 2026
40e3a9d
user cursor for data sync
Junjiequan Mar 19, 2026
a0f7c8f
default dataSyncBatchSize to 1000
Junjiequan Mar 19, 2026
c4b0950
added dataset opensearch dto
Junjiequan Mar 19, 2026
1ae3571
minor text change
Junjiequan Mar 19, 2026
5fa33ad
add excludeExtraneousValues ot plainToInstance
Junjiequan Mar 19, 2026
412eb06
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 24, 2026
d91161a
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 24, 2026
447dc52
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 24, 2026
572130e
update package
Junjiequan Mar 24, 2026
3baee8d
fix for inconsistant mongodb version across different packages
Junjiequan Mar 24, 2026
81921da
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 24, 2026
7342eff
fix unit test
Junjiequan Mar 24, 2026
e257e04
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 24, 2026
85fee81
Use correct PickType for dataset-opensearch dto
Junjiequan Mar 25, 2026
4f72ef5
Merge branch 'master' into elasticSearch-to-openSearch
Junjiequan Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,17 @@ MS365_CLIENT_ID=<clientId>
MS365_CLIENT_SECRET=<clientSecret>
POLICY_PUBLICATION_SHIFT=3 years
POLICY_RETENTION_SHIFT=-1 (indefinitely)
ELASTICSEARCH_ENABLED=<"yes"|"no">
ES_HOST="https://localhost:9200"
ES_USERNAME="elastic"
ES_PASSWORD="duo-password"
ES_PORT=9200
MONGODB_COLLECTION="Dataset"
ES_MAX_RESULT=100000
ES_FIELDS_LIMIT=400000
ES_INDEX="dataset"
ES_REFRESH=<"wait_for"|"false">
STACK_VERSION="8.8.2"
CLUSTER_NAME="es-cluster"
MEM_LIMIT="4G"

# "wait_for": waits for index refresh before returning, recommended for development and testing.
# "false": returns immediately without waiting, recommended for production.
OPENSEARCH_REFRESH=<"wait_for"|"false">
OPENSEARCH_ENABLED=<"yes"|"no">
OPENSEARCH_ENABLED="https://localhost:9200"
OPENSEARCH_ENABLED="admin"
OPENSEARCH_ENABLED="Scicat_default_password_2026"
OPENSEARCH_DEFAULT_INDEX="dataset"
OPENSEARCH_DATA_SYNC_BATCH_SIZE=50000

FRONTEND_CONFIG_FILE="./src/config/frontend.config.json"
FRONTEND_THEME_FILE="./src/config/frontend.theme.json"
LOGGERS_CONFIG_FILE="loggers.json"
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ jobs:
run: npm run build

api_tests:
name: API tests with ElasticSearch enabled - ${{ matrix.elasticsearch_enabled }}
name: API tests with OpenSearch enabled - ${{ matrix.opensearch_enabled }}
needs: [install-and-cache]
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
elasticsearch_enabled: ["yes", "no"]
opensearch_enabled: ["yes", "no"]

steps:
- name: Checkout code
Expand All @@ -130,12 +130,8 @@ jobs:

- name: API tests
env:
ELASTICSEARCH_ENABLED: ${{ matrix.elasticsearch_enabled }}
COMPOSE_PROFILES: ${{ matrix.elasticsearch_enabled == 'yes' && 'elasticsearch' || ''}}
CLUSTER_NAME: es-cluster
ES_PASSWORD: duo-password
MEM_LIMIT: 4G
STACK_VERSION: 8.8.2
COMPOSE_PROFILES: ${{ matrix.opensearch_enabled == 'yes' && 'opensearch' || ''}}
OPENSEARCH_ENABLED: ${{ matrix.opensearch_enabled }}
OIDC_ISSUER: http://localhost:8080/local-test
OIDC_CLIENT_ID: scicat-client-test
OIDC_CLIENT_SECRET: secret
Expand All @@ -144,6 +140,7 @@ jobs:

# Start mongo container and app before running api tests
run: |
cp opensearchConfig.example.json opensearchConfig.json
cp CI/ESS/docker-compose.api.yaml docker-compose.yaml
docker compose up --build -d --wait
npm run test:api
OPENSEARCH_ENABLED=${{ matrix.opensearch_enabled }} npm run test:api
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobConfig.json
jobConfig.yaml
metricsConfig.json
publishedDataConfig.json
openSearchConfig.json

# Configs
.env
Expand Down
15 changes: 6 additions & 9 deletions CI/E2E/.env.backend-next.example
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ DATASET_CREATION_VALIDATION_REGEX="^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][
PROPOSAL_GROUPS="proposalingestor"
SAMPLE_GROUPS=""

ELASTICSEARCH_ENABLED='yes'
ES_HOST=http://es01:9200
ES_USERNAME=elastic
ES_PASSWORD=duo-password
MONGODB_COLLECTION=Dataset
ES_MAX_RESULT=210000
ES_FIELDS_LIMIT=400000
ES_INDEX="dataset"
ES_REFRESH="wait_for"
OPENSEARCH_ENABLED='yes'
OPENSEARCH_DEFAULT_INDEX="dataset"
OPENSEARCH_HOST=https://localhost:9200
OPENSEARCH_USERNAME=admin
OPENSEARCH_PASSWORD=Scicat_default_password_2026
OPENSEARCH_REFRESH="wait_for"
6 changes: 0 additions & 6 deletions CI/E2E/.env.elastic-search

This file was deleted.

15 changes: 6 additions & 9 deletions CI/E2E/backend.env
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ DATASET_CREATION_VALIDATION_REGEX="^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][
PROPOSAL_GROUPS="proposalingestor"
SAMPLE_GROUPS=""

ELASTICSEARCH_ENABLED='yes'
ES_HOST=http://es01:9200
ES_USERNAME=elastic
ES_PASSWORD=duo-password
MONGODB_COLLECTION=Dataset
ES_MAX_RESULT=210000
ES_FIELDS_LIMIT=400000
ES_INDEX="dataset"
ES_REFRESH="wait_for"
OPENSEARCH_ENABLED=yes
OPENSEARCH_DEFAULT_INDEX="dataset"
OPENSEARCH_HOST=https://localhost:9200
OPENSEARCH_USERNAME=admin
OPENSEARCH_PASSWORD=Scicat_default_password_2026
OPENSEARCH_REFRESH="wait_for"
27 changes: 0 additions & 27 deletions CI/E2E/docker-compose-local-no-es.yaml

This file was deleted.

41 changes: 29 additions & 12 deletions CI/E2E/docker-compose-local.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: "3.2"
services:
mongodb:
image: bitnami/mongodb:latest
image: mongo:latest
volumes:
- "mongodb_data:/bitnami"
- "mongodb_data:/data/db"
ports:
- "27017:27017"

scichat-loopback:
image: dacat/scichat-loopback:e2e
command:
Expand All @@ -23,28 +24,44 @@ services:
depends_on:
- mongodb

es01:
opensearch:
depends_on:
- mongodb
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
image: opensearchproject/opensearch:3.5.0
ports:
- ${ES_PORT}:9200
- 9200:9200
environment:
- node.name=es01
- ES_JAVA_OPTS=-Xms2g -Xmx2g
- cluster.name=${CLUSTER_NAME}
- cluster.initial_master_nodes=es01
- ELASTIC_PASSWORD=${ES_PASSWORD}
- node.name=opensearch
- discovery.type=single-node
- cluster.name=os-cluster
- bootstrap.memory_lock=true
mem_limit: ${MEM_LIMIT}
- OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Scicat_default_password_2026
volumes:
- opensearch_data:/usr/share/opensearch/data
mem_limit: 4G
ulimits:
memlock:
soft: -1
hard: -1


# Web UI for OpenSearch
# Enable this service if you want to use OpenSearch Dashboards to visualize and debug your OpenSearch data.
# Access it at http://localhost:5601
# opensearch-dashboards:
# image: opensearchproject/opensearch-dashboards:3.5.0
# ports:
# - "5601:5601"
# environment:
# - OPENSEARCH_HOSTS=https://opensearch:9200
# - OPENSEARCH_USERNAME=admin
# - OPENSEARCH_PASSWORD=Scicat_default_password_2026
# - OPENSEARCH_SSL_VERIFICATIONMODE=none

volumes:
mongodb_data:
driver: local

es01:
opensearch_data:
driver: local
37 changes: 15 additions & 22 deletions CI/E2E/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mongodb:
image: "bitnami/mongodb:latest"
image: "mongo:latest"
ports:
- "27017:27017"
volumes:
- "mongodb_data:/bitnami"
- "mongodb_data:/data/db"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh mongodb:27017/test --quiet
interval: 10s
Expand Down Expand Up @@ -63,35 +63,28 @@ services:
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.routers.frontend.entrypoints=web"

es01:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
opensearch:
depends_on:
- mongodb
image: opensearchproject/opensearch:3.5.0
ports:
- 9200:9200
environment:
- xpack.security.enabled=false
- node.name=es01
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- cluster.name=es-cluster
- cluster.initial_master_nodes=es01
- node.name=opensearch
- discovery.type=single-node
- cluster.name=os-cluster
- bootstrap.memory_lock=true
mem_limit: 1g
- OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Scicat_default_password_2026
volumes:
- opensearch_data:/usr/share/opensearch/data
mem_limit: 4G
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test:
[
"CMD-SHELL",
"curl -s -X GET 'http://es01:9200/_cluster/health?pretty' | grep status | grep -q '\\(green\\|yellow\\)'"
]
interval: 30s
timeout: 10s
start_period: 60s
retries: 4

volumes:
mongodb_data:
driver: local
es01:
opensearch_data:
driver: local
29 changes: 17 additions & 12 deletions CI/ESS/docker-compose.api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,36 @@ services:
mongodb:
image: mongo:latest
volumes:
- mongodb_data:/bitnami
- "mongodb_data:/data/db"
ports:
- "27017:27017"
es01:
opensearch:
profiles:
- elasticsearch
- opensearch
depends_on:
- mongodb
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
image: opensearchproject/opensearch:3.5.0
ports:
- "9200:9200"
environment:
- node.name=es01
- ES_JAVA_OPTS=-Xms2g -Xmx2g
- cluster.name=${CLUSTER_NAME}
- cluster.initial_master_nodes=es01
- ELASTIC_PASSWORD=${ES_PASSWORD}
- node.name=opensearch
- discovery.type=single-node
- cluster.name=os-test-cluster
- bootstrap.memory_lock=true
mem_limit: ${MEM_LIMIT}
- OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Scicat_default_password_2026
mem_limit: 4G
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: ["CMD-SHELL", "curl -sk -u admin:Scicat_default_password_2026 https://localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 10s
retries: 10
start_period: 30s
volumes:
mongodb_data:
driver: local
es01:
driver: local

25 changes: 15 additions & 10 deletions CI/ESS/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,27 @@ services:
depends_on:
- mongodb

es01:
opensearch:
depends_on:
- mongodb
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
image: opensearchproject/opensearch:3.5.0
ports:
- 9200:9200
environment:
- node.name=es01
- ES_JAVA_OPTS=-Xms2g -Xmx2g
- cluster.name=${CLUSTER_NAME}
- cluster.initial_master_nodes=es01
- ELASTIC_PASSWORD=${ES_PASSWORD}
- node.name=opensearch
- discovery.type=single-node
- cluster.name=os-cluster
- bootstrap.memory_lock=true
mem_limit: ${MEM_LIMIT}
- OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Scicat_default_password_2026
volumes:
- opensearch_data:/usr/share/opensearch/data
mem_limit: 4G
ulimits:
memlock:
soft: -1
hard: -1

# catanie:
# build:
# context: catanie
Expand Down Expand Up @@ -114,5 +119,5 @@ volumes:
driver: local
rabbitmq_data:
driver: local
es01:
driver: local
opensearch_data:
driver: local
Loading
Loading