Skip to content

Commit a12e30c

Browse files
committed
Expose setting, add docs
1 parent e2d2ea7 commit a12e30c

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ public class AppProperties {
104104

105105
private final List<String> custom_provider_classes = new ArrayList<>();
106106

107+
private List<Integer> search_prefetch_thresholds = new ArrayList<>();
108+
107109

108110
public List<String> getCustomInterceptorClasses() {
109111
return custom_interceptor_classes;
@@ -643,7 +645,16 @@ public void setLanguage_search_parameter_enabled(Boolean language_search_paramet
643645
this.language_search_parameter_enabled = language_search_parameter_enabled;
644646
}
645647

646-
public static class Cors {
648+
public List<Integer> getSearch_prefetch_thresholds() {
649+
return this.search_prefetch_thresholds;
650+
}
651+
652+
public void setSearch_prefetch_thresholds(List<Integer> thePrefetchThresholds) {
653+
this.search_prefetch_thresholds = thePrefetchThresholds;
654+
}
655+
656+
657+
public static class Cors {
647658
private Boolean allow_Credentials = true;
648659
private List<String> allowed_origin = List.of("*");
649660

src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
150150
jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled());
151151
jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled());
152152

153+
jpaStorageSettings.setSearchPreFetchThresholds(appProperties.getSearch_prefetch_thresholds());
153154

154155
Integer maxFetchSize = appProperties.getMax_page_size();
155156
jpaStorageSettings.setFetchSizeDefaultMaximum(maxFetchSize);

src/main/resources/application.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ hapi:
7676
### This flag when enabled to true, will avail evaluate measure operations from CR Module.
7777
### Flag is false by default, can be passed as command line argument to override.
7878
cr:
79-
enabled: false
79+
enabled: true
8080
caregaps:
8181
reporter: "default"
8282
section_author: "default"
@@ -229,7 +229,18 @@ hapi:
229229
search-coord-core-pool-size: 20
230230
search-coord-max-pool-size: 100
231231
search-coord-queue-capacity: 200
232-
232+
233+
# Search Prefetch Thresholds.
234+
235+
# This setting sets the number of search results to prefetch. For example, if this list
236+
# is set to [100, 1000, -1] then the server will initially load 100 results and not
237+
# attempt to load more. If the user requests subsequent page(s) of results and goes
238+
# past 100 results, the system will load the next 900 (up to the following threshold of 1000).
239+
# The system will progressively work through these thresholds.
240+
# A threshold of -1 means to load all results. Note that if the final threshold is a
241+
# number other than -1, the system will never prefetch more than the given number.
242+
search_prefetch_thresholds: 13,503,2003
243+
233244
# comma-separated package names, will be @ComponentScan'ed by Spring to allow for creating custom Spring beans
234245
#custom-bean-packages:
235246

0 commit comments

Comments
 (0)