Add Elasticsearch index prefix configuration (#891)

* Add Elasticsearch configuration section to application.yaml

* Add configuration for reindexing resources upon search parameter change

* Add Elasticsearch client configuration for testing

* Update logback dependencies because of a security issue and enable resource filtering in pom.xml

* Add application name and tester configuration to application.yaml. Refactor hibernate properties

* Add custom Elasticsearch configuration to create ElasticsearchClient bean

* Add index prefix configuration for Elasticsearch indices

* Fix Elasticsearch URI format in test initialization

* Refactor ElasticsearchConfig for improved readability and code style consistency (spotless:apply)

* Refactor ElasticsearchConfig for improved readability and code style consistency (spotless:apply)

* Update index prefix in application.yaml for Elasticsearch configuration

* Enhance index prefix validation and add sanitization method for Elasticsearch index names

* Merged with master in upstream

* Refactor ElasticsearchBootSvcImpl and ElasticsearchConfig for improved readability (mvn spotless)

* Comment out custom_content_path in application.yaml for clarity

* - Refactor application.yaml for improved structure and readability;
- Add PostgresLucenePatientIT integration test; and
- Update testcontainers dependencies to avoid compatibility issues with newer Docker APIs.

* Refactor PostgresLucenePatientIT to use external configuration file for test properties

* Add integration tests for PostgreSQL and Elasticsearch with dynamic configuration

* Increase socket timeout in CdsHooksServletIT for improved stability during tests

* Remove deprecated tester configuration from application.yaml
This commit is contained in:
darth.cav
2026-01-20 15:32:24 +01:00
committed by GitHub
parent bf7f6a3b6a
commit b81e2abe81
12 changed files with 476 additions and 19 deletions

View File

@@ -129,6 +129,7 @@ public class AppProperties {
private Boolean mark_resources_for_reindexing_upon_search_parameter_change = true;
private Integer reindex_thread_count = null;
private Integer expunge_thread_count = null;
private Elasticsearch elasticsearch = null;
public List<String> getCustomInterceptorClasses() {
return custom_interceptor_classes;
@@ -847,6 +848,14 @@ public class AppProperties {
this.store_meta_source_information = store_meta_source_information;
}
public Elasticsearch getElasticsearch() {
return elasticsearch;
}
public void setElasticsearch(Elasticsearch elasticsearch) {
this.elasticsearch = elasticsearch;
}
public static class Cors {
private Boolean allow_Credentials = true;
private List<String> allowed_origin = List.of("*");
@@ -1196,4 +1205,17 @@ public class AppProperties {
}
}
}
public static class Elasticsearch {
private String index_prefix = "";
public String getIndex_prefix() {
return index_prefix;
}
public void setIndex_prefix(String index_prefix) {
this.index_prefix = index_prefix;
}
}
}