From 7265b115dd83664d972235f677d898e89a1d3c48 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 10 Aug 2023 12:55:30 -0400 Subject: [PATCH] Leave comment in case of updates --- .../java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java b/src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java index f65a572..6f358d4 100644 --- a/src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java +++ b/src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java @@ -84,6 +84,10 @@ public class ElasticsearchLastNR4IT { RestHighLevelClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient( "http", embeddedElastic.getHost() + ":" + embeddedElastic.getMappedPort(9200), "", ""); + /* As of 2023-08-10, HAPI FHIR sets SubscriptionConstants.MAX_SUBSCRIPTION_RESULTS to 50000 + which is in excess of elastic's default max_result_window. If MAX_SUBSCRIPTION_RESULTS is changed + to a value <= 10000, the following will no longer be necessary. - dotasek + */ PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest("hapi_fhir_template"); putIndexTemplateRequest.patterns(List.of("*")); Settings settings = Settings.builder().put("index.max_result_window", 50000).build();