From 5c4ada54ae6c036ae69fe5957eeea6564e6ef49a Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 27 Sep 2024 09:22:26 -0400 Subject: [PATCH] Make java default as well for people who dont update their app properties on upgrade --- src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java | 2 +- .../ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 18c4bec..563e217 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -104,7 +104,7 @@ public class AppProperties { private final List custom_provider_classes = new ArrayList<>(); - private List search_prefetch_thresholds = new ArrayList<>(); + private List search_prefetch_thresholds = List.of(13, 503, 2003, -1); public List getCustomInterceptorClasses() { diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java index 8380505..6b9dc5f 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java @@ -150,6 +150,7 @@ public class FhirServerConfigCommon { jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled()); jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled()); + jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds()); Integer maxFetchSize = appProperties.getMax_page_size();