Updated hapi-fhir to 6.1.0

This commit is contained in:
chgl
2022-08-22 18:16:24 +02:00
parent 956cfb171d
commit d059954c5f
7 changed files with 29 additions and 11 deletions

View File

@@ -17,9 +17,9 @@ In order to use this sample, you should have:
- Apache Maven build tool (newest version)
### or
- Docker, as the entire project can be built using multistage docker (with both JDK and maven wrapped in docker) or used directly from [Docker Hub](https://hub.docker.com/repository/docker/hapiproject/hapi)
- Docker, as the entire project can be built using multistage docker (with both JDK and maven wrapped in docker) or used directly from [Docker Hub](https://hub.docker.com/r/hapiproject/hapi)
## Running via [Docker Hub](https://hub.docker.com/repository/docker/hapiproject/hapi)
## Running via [Docker Hub](https://hub.docker.com/r/hapiproject/hapi)
Each tagged/released version of `hapi-fhir-jpaserver` is built as a Docker image and published to Docker hub. To run the published Docker image from DockerHub:

View File

@@ -14,7 +14,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>6.0.1</version>
<version>6.1.0</version>
</parent>
<artifactId>hapi-fhir-jpaserver-starter</artifactId>
@@ -196,8 +196,6 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<!-- pw: 04.07.22: this is fixed in latest hapi snapshot, can be removed when switchung to hapi 6.1.0-->
<version>2.1.212</version>
</dependency>
<!-- webjars -->

View File

@@ -418,7 +418,7 @@ public class BaseJpaRestfulServer extends RestfulServer {
daoConfig.setLastNEnabled(true);
}
daoConfig.setStoreResourceInLuceneIndex(appProperties.getStore_resource_in_lucene_index_enabled());
daoConfig.setStoreResourceInHSearchIndex(appProperties.getStore_resource_in_lucene_index_enabled());
daoConfig.getModelConfig().setNormalizedQuantitySearchLevel(appProperties.getNormalized_quantity_search_level());
daoConfig.getModelConfig().setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
}

View File

@@ -1,7 +1,7 @@
package ca.uhn.fhir.jpa.starter;
import ca.uhn.fhir.jpa.config.HapiFhirLocalContainerEntityManagerFactoryBean;
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
import ca.uhn.fhir.jpa.search.elastic.ElasticsearchHibernatePropertiesBuilder;
import org.apache.lucene.util.Version;
import org.hibernate.cfg.AvailableSettings;
@@ -71,7 +71,8 @@ public class EnvironmentHelper {
if (properties.get(BackendSettings.backendKey(BackendSettings.TYPE)).equals(LuceneBackendSettings.TYPE_NAME)) {
properties.putIfAbsent(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), LocalFileSystemDirectoryProvider.NAME);
properties.putIfAbsent(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), "target/lucenefiles");
properties.putIfAbsent(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName());
properties.putIfAbsent(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
properties.putIfAbsent(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), Version.LATEST);
} else if (properties.get(BackendSettings.backendKey(BackendSettings.TYPE)).equals(ElasticsearchBackendSettings.TYPE_NAME)) {

View File

@@ -122,7 +122,7 @@ public class FhirServerConfigCommon {
}
retVal.setFilterParameterEnabled(appProperties.getFilter_search_enabled());
retVal.setAdvancedLuceneIndexing(appProperties.getAdvanced_lucene_indexing());
retVal.setAdvancedHSearchIndexing(appProperties.getAdvanced_lucene_indexing());
retVal.setTreatBaseUrlsAsLocal(new HashSet<>(appProperties.getLocal_base_urls()));
return retVal;

View File

@@ -10,13 +10,19 @@ import ca.uhn.fhir.jpa.config.util.ResourceCountCacheUtil;
import ca.uhn.fhir.jpa.config.util.ValidationSupportConfigUtil;
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl;
import ca.uhn.fhir.jpa.dao.search.HSearchSortHelperImpl;
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
import ca.uhn.fhir.jpa.provider.DaoRegistryResourceSupportedSvc;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.jpa.search.IStaleSearchDeletingSvc;
import ca.uhn.fhir.jpa.search.StaleSearchDeletingSvcImpl;
import ca.uhn.fhir.jpa.util.ResourceCountCache;
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain;
import ca.uhn.fhir.mdm.dao.IMdmLinkDao;
import ca.uhn.fhir.rest.api.IResourceSupportedSvc;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
@@ -106,4 +112,17 @@ public class StarterJpaConfig {
retVal.setEntityManagerFactory(entityManagerFactory);
return retVal;
}
@Autowired
private ISearchParamRegistry mySearchParamRegistry;
@Bean
public IHSearchSortHelper hSearchSortHelper() {
return new HSearchSortHelperImpl(mySearchParamRegistry);
}
@Bean
public IMdmLinkDao<?> mdmLinkDao(){
return new MdmLinkDaoJpaImpl();
}
}

View File

@@ -42,7 +42,7 @@ spring:
### These settings will enable fulltext search with lucene
hibernate.search.enabled: false
# hibernate.search.backend.type: lucene
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiLuceneAnalysisConfigurer
# hibernate.search.backend.directory.type: local-filesystem
# hibernate.search.backend.directory.root: target/lucenefiles
# hibernate.search.backend.lucene_version: lucene_current