From 91e4105fd8c0c900e552633fbe02d436564b8675 Mon Sep 17 00:00:00 2001 From: Alejandro Medina Date: Fri, 6 May 2022 12:25:51 -0400 Subject: [PATCH] Add: of-type modifier option in application.yaml (#363) Co-authored-by: Alejandro Medina --- src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java | 9 +++++++++ .../ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java | 1 + src/main/resources/application.yaml | 1 + 3 files changed, 11 insertions(+) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index 2ef74cf..a4ab834 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -22,6 +22,7 @@ public class AppProperties { private Boolean openapi_enabled = false; private Boolean mdm_enabled = false; private boolean advanced_lucene_indexing = false; + private boolean enable_index_of_type = false; private Boolean allow_cascading_deletes = false; private Boolean allow_contains_searches = true; private Boolean allow_external_references = false; @@ -834,4 +835,12 @@ public class AppProperties { private Boolean quitWait = false; } } + + public boolean getEnable_index_of_type() { + return enable_index_of_type; + } + + public void setEnable_index_of_type(boolean enable_index_of_type) { + this.enable_index_of_type = enable_index_of_type; + } } diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java index d9617c7..3896167 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/FhirServerConfigCommon.java @@ -178,6 +178,7 @@ public class FhirServerConfigCommon { modelConfig.setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level()); modelConfig.setIndexOnContainedResources(appProperties.getEnable_index_contained_resource()); + modelConfig.setIndexIdentifierOfType(appProperties.getEnable_index_of_type()); return modelConfig; } diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 45c3e13..67c86f4 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -91,6 +91,7 @@ hapi: # delete_expunge_enabled: true # enable_repository_validating_interceptor: false # enable_index_missing_fields: false + # enable_index_of_type: true # enable_index_contained_resource: false ### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!! ### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html