Hsearch namespace consolidation (#3733)
* Initial implementation * Implement job cancellation * Works for date and token. Cleanup required. * Works for string and quantity.Cleanup pending. * Works for reference and perform cleanup. * Cleanup configuration and add missing tests * Eliminate sort property registry (no go for a cluster) for a static property map. * Missed in previous commit * Implement HSearch number parameter * Implement HSearch number sorting * Unify different hibernate search names (HibernateSearch, Freetext and Lucene) to HSearch * Move analysis configures for lucene and elastic to same file to enforce the need to keep them in synch * Use new defined constant * Rename package too * Rename additional elastic references * bump version to 6.1.0-PRE5-SNAPSHOT * Restore Hap prefix to hapi configurers * fixing hapi version of new maven module * fix pom * fix pom Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com> Co-authored-by: Ken Stevens <ken@smilecdr.com>
This commit is contained in:
parent
f4629822f1
commit
84fe58cc86
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir-bom</artifactId>
|
<artifactId>hapi-fhir-bom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>HAPI FHIR BOM</name>
|
<name>HAPI FHIR BOM</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir-cli</artifactId>
|
<artifactId>hapi-fhir-cli</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../../hapi-deployable-pom</relativePath>
|
<relativePath>../../hapi-deployable-pom</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,8 @@ package ca.uhn.fhir.jpa.demo;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
|
|
||||||
import org.apache.commons.dbcp2.BasicDataSource;
|
import org.apache.commons.dbcp2.BasicDataSource;
|
||||||
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
|
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
|
||||||
import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings;
|
|
||||||
import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings;
|
|
||||||
import org.hibernate.search.engine.cfg.BackendSettings;
|
|
||||||
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-fhir</artifactId>
|
<artifactId>hapi-fhir</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@ import ca.uhn.fhir.jpa.search.StaleSearchDeletingSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.util.ResourceCountCache;
|
import ca.uhn.fhir.jpa.util.ResourceCountCache;
|
||||||
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain;
|
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain;
|
||||||
import ca.uhn.fhir.rest.api.IResourceSupportedSvc;
|
import ca.uhn.fhir.rest.api.IResourceSupportedSvc;
|
||||||
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
|
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
|
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
|
||||||
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
|
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
|
||||||
|
@ -46,17 +45,6 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_LOWER;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE_NORM;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.SEARCH_PARAM_ROOT;
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Import({JpaConfig.class})
|
@Import({JpaConfig.class})
|
||||||
public class HapiJpaConfig {
|
public class HapiJpaConfig {
|
||||||
|
|
|
@ -45,7 +45,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTag;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTag;
|
||||||
import ca.uhn.fhir.jpa.model.entity.TagDefinition;
|
import ca.uhn.fhir.jpa.model.entity.TagDefinition;
|
||||||
import ca.uhn.fhir.jpa.model.entity.TagTypeEnum;
|
import ca.uhn.fhir.jpa.model.entity.TagTypeEnum;
|
||||||
import ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData;
|
import ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData;
|
||||||
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
|
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
|
||||||
import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage;
|
import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage;
|
||||||
import ca.uhn.fhir.jpa.model.util.JpaConstants;
|
import ca.uhn.fhir.jpa.model.util.JpaConstants;
|
||||||
|
@ -1889,9 +1889,9 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> extends BaseStora
|
||||||
} else {
|
} else {
|
||||||
theEntity.setNarrativeText(parseNarrativeTextIntoWords(theResource));
|
theEntity.setNarrativeText(parseNarrativeTextIntoWords(theResource));
|
||||||
theEntity.setContentText(parseContentTextIntoWords(theContext, theResource));
|
theEntity.setContentText(parseContentTextIntoWords(theContext, theResource));
|
||||||
if (myDaoConfig.isAdvancedLuceneIndexing()) {
|
if (myDaoConfig.isAdvancedHSearchIndexing()) {
|
||||||
ExtendedLuceneIndexData luceneIndexData = myFulltextSearchSvc.extractLuceneIndexData(theResource, theNewParams);
|
ExtendedHSearchIndexData hSearchIndexData = myFulltextSearchSvc.extractLuceneIndexData(theResource, theNewParams);
|
||||||
theEntity.setLuceneIndexData(luceneIndexData);
|
theEntity.setLuceneIndexData(hSearchIndexData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,16 +24,16 @@ import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.i18n.Msg;
|
import ca.uhn.fhir.i18n.Msg;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
|
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
|
||||||
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneClauseBuilder;
|
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchClauseBuilder;
|
||||||
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneIndexExtractor;
|
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchIndexExtractor;
|
||||||
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneResourceProjection;
|
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchResourceProjection;
|
||||||
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder;
|
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder;
|
||||||
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
|
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
|
||||||
import ca.uhn.fhir.jpa.dao.search.LastNOperation;
|
import ca.uhn.fhir.jpa.dao.search.LastNOperation;
|
||||||
import ca.uhn.fhir.jpa.dao.search.SearchScrollQueryExecutorAdaptor;
|
import ca.uhn.fhir.jpa.dao.search.SearchScrollQueryExecutorAdaptor;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData;
|
import ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData;
|
||||||
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteOptions;
|
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteOptions;
|
||||||
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteSearch;
|
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteSearch;
|
||||||
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
|
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
|
||||||
|
@ -102,7 +102,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IHSearchSortHelper myExtendedFulltextSortHelper;
|
private IHSearchSortHelper myExtendedFulltextSortHelper;
|
||||||
|
|
||||||
final private ExtendedLuceneSearchBuilder myAdvancedIndexQueryBuilder = new ExtendedLuceneSearchBuilder();
|
final private ExtendedHSearchSearchBuilder myAdvancedIndexQueryBuilder = new ExtendedHSearchSearchBuilder();
|
||||||
|
|
||||||
private Boolean ourDisabled;
|
private Boolean ourDisabled;
|
||||||
|
|
||||||
|
@ -113,10 +113,10 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExtendedLuceneIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
|
public ExtendedHSearchIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
|
||||||
String resourceType = myFhirContext.getResourceType(theResource);
|
String resourceType = myFhirContext.getResourceType(theResource);
|
||||||
ResourceSearchParams activeSearchParams = mySearchParamRegistry.getActiveSearchParams(resourceType);
|
ResourceSearchParams activeSearchParams = mySearchParamRegistry.getActiveSearchParams(resourceType);
|
||||||
ExtendedLuceneIndexExtractor extractor = new ExtendedLuceneIndexExtractor(
|
ExtendedHSearchIndexExtractor extractor = new ExtendedHSearchIndexExtractor(
|
||||||
myDaoConfig, myFhirContext, activeSearchParams, mySearchParamExtractor, myModelConfig);
|
myDaoConfig, myFhirContext, activeSearchParams, mySearchParamExtractor, myModelConfig);
|
||||||
return extractor.extract(theResource,theNewParams);
|
return extractor.extract(theResource,theNewParams);
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
// keep this in sync with the guts of doSearch
|
// keep this in sync with the guts of doSearch
|
||||||
boolean requiresHibernateSearchAccess = myParams.containsKey(Constants.PARAM_CONTENT) || myParams.containsKey(Constants.PARAM_TEXT) || myParams.isLastN();
|
boolean requiresHibernateSearchAccess = myParams.containsKey(Constants.PARAM_CONTENT) || myParams.containsKey(Constants.PARAM_TEXT) || myParams.isLastN();
|
||||||
|
|
||||||
requiresHibernateSearchAccess |= myDaoConfig.isAdvancedLuceneIndexing() && myAdvancedIndexQueryBuilder.isSupportsSomeOf(myParams);
|
requiresHibernateSearchAccess |= myDaoConfig.isAdvancedHSearchIndexing() && myAdvancedIndexQueryBuilder.isSupportsSomeOf(myParams);
|
||||||
|
|
||||||
return requiresHibernateSearchAccess;
|
return requiresHibernateSearchAccess;
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
f -> f.bool(b -> {
|
f -> f.bool(b -> {
|
||||||
ExtendedLuceneClauseBuilder builder = new ExtendedLuceneClauseBuilder(myFhirContext, myModelConfig, b, f);
|
ExtendedHSearchClauseBuilder builder = new ExtendedHSearchClauseBuilder(myFhirContext, myModelConfig, b, f);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle _content parameter (resource body content)
|
* Handle _content parameter (resource body content)
|
||||||
|
@ -215,7 +215,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
/*
|
/*
|
||||||
* Handle other supported parameters
|
* Handle other supported parameters
|
||||||
*/
|
*/
|
||||||
if (myDaoConfig.isAdvancedLuceneIndexing() && theParams.getEverythingMode() == null) {
|
if (myDaoConfig.isAdvancedHSearchIndexing() && theParams.getEverythingMode() == null) {
|
||||||
myAdvancedIndexQueryBuilder.addAndConsumeAdvancedQueryClauses(builder, theResourceType, theParams, mySearchParamRegistry);
|
myAdvancedIndexQueryBuilder.addAndConsumeAdvancedQueryClauses(builder, theResourceType, theParams, mySearchParamRegistry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,10 +341,10 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchSession session = getSearchSession();
|
SearchSession session = getSearchSession();
|
||||||
List<ExtendedLuceneResourceProjection> rawResourceDataList = session.search(ResourceTable.class)
|
List<ExtendedHSearchResourceProjection> rawResourceDataList = session.search(ResourceTable.class)
|
||||||
.select(
|
.select(
|
||||||
f -> f.composite(
|
f -> f.composite(
|
||||||
ExtendedLuceneResourceProjection::new,
|
ExtendedHSearchResourceProjection::new,
|
||||||
f.field("myId", Long.class),
|
f.field("myId", Long.class),
|
||||||
f.field("myForcedId", String.class),
|
f.field("myForcedId", String.class),
|
||||||
f.field("myRawResource", String.class))
|
f.field("myRawResource", String.class))
|
||||||
|
@ -354,8 +354,8 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
|
||||||
.fetchAllHits(); // matches '_id' from resource index
|
.fetchAllHits(); // matches '_id' from resource index
|
||||||
|
|
||||||
ArrayList<Long> pidList = new ArrayList<>(thePids);
|
ArrayList<Long> pidList = new ArrayList<>(thePids);
|
||||||
List<ExtendedLuceneResourceProjection> orderedAsPidsResourceDataList = rawResourceDataList.stream()
|
List<ExtendedHSearchResourceProjection> orderedAsPidsResourceDataList = rawResourceDataList.stream()
|
||||||
.sorted( Ordering.explicit(pidList).onResultOf(ExtendedLuceneResourceProjection::getPid) ).collect( Collectors.toList() );
|
.sorted( Ordering.explicit(pidList).onResultOf(ExtendedHSearchResourceProjection::getPid) ).collect( Collectors.toList() );
|
||||||
|
|
||||||
IParser parser = myFhirContext.newJsonParser();
|
IParser parser = myFhirContext.newJsonParser();
|
||||||
return orderedAsPidsResourceDataList.stream()
|
return orderedAsPidsResourceDataList.stream()
|
||||||
|
|
|
@ -21,7 +21,7 @@ package ca.uhn.fhir.jpa.dao;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData;
|
import ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData;
|
||||||
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteOptions;
|
import ca.uhn.fhir.jpa.search.autocomplete.ValueSetAutocompleteOptions;
|
||||||
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
|
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
|
@ -67,7 +67,7 @@ public interface IFulltextSearchSvc {
|
||||||
|
|
||||||
boolean isDisabled();
|
boolean isDisabled();
|
||||||
|
|
||||||
ExtendedLuceneIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams);
|
ExtendedHSearchIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams);
|
||||||
|
|
||||||
boolean supportsSomeOf(SearchParameterMap myParams);
|
boolean supportsSomeOf(SearchParameterMap myParams);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ package ca.uhn.fhir.jpa.dao;
|
||||||
import ca.uhn.fhir.context.*;
|
import ca.uhn.fhir.context.*;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken;
|
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamToken;
|
||||||
import ca.uhn.fhir.jpa.model.util.CodeSystemHash;
|
import ca.uhn.fhir.jpa.model.util.CodeSystemHash;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.IElasticsearchSvc;
|
import ca.uhn.fhir.jpa.search.lastn.IElasticsearchSvc;
|
||||||
|
@ -103,7 +102,7 @@ public class ObservationLastNIndexPersistSvc {
|
||||||
|
|
||||||
indexedObservation.setEffectiveDtm(theEffectiveDtm);
|
indexedObservation.setEffectiveDtm(theEffectiveDtm);
|
||||||
indexedObservation.setIdentifier(resourcePID);
|
indexedObservation.setIdentifier(resourcePID);
|
||||||
if (myConfig.isStoreResourceInLuceneIndex()) {
|
if (myConfig.isStoreResourceInHSearchIndex()) {
|
||||||
indexedObservation.setResource(encodeResource(theResource));
|
indexedObservation.setResource(encodeResource(theResource));
|
||||||
}
|
}
|
||||||
indexedObservation.setSubject(theSubjectId);
|
indexedObservation.setSubject(theSubjectId);
|
||||||
|
|
|
@ -22,10 +22,10 @@ package ca.uhn.fhir.jpa.dao.search;
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.i18n.Msg;
|
import ca.uhn.fhir.i18n.Msg;
|
||||||
import ca.uhn.fhir.jpa.dao.predicate.SearchFilterParser;
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
|
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
|
||||||
import ca.uhn.fhir.jpa.model.util.UcumServiceUtil;
|
import ca.uhn.fhir.jpa.model.util.UcumServiceUtil;
|
||||||
|
import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
|
||||||
import ca.uhn.fhir.model.api.IQueryParameterType;
|
import ca.uhn.fhir.model.api.IQueryParameterType;
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||||
import ca.uhn.fhir.rest.api.Constants;
|
import ca.uhn.fhir.rest.api.Constants;
|
||||||
|
@ -48,7 +48,6 @@ import org.hibernate.search.engine.search.common.BooleanOperator;
|
||||||
import org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateClausesStep;
|
import org.hibernate.search.engine.search.predicate.dsl.BooleanPredicateClausesStep;
|
||||||
import org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep;
|
import org.hibernate.search.engine.search.predicate.dsl.PredicateFinalStep;
|
||||||
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
|
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
|
||||||
import org.hibernate.search.util.common.data.RangeBoundInclusion;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -63,24 +62,23 @@ import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_EXACT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_EXACT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_NORMALIZED;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_NORMALIZED;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_TEXT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE_NORM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE_NORM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE_NORM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.SEARCH_PARAM_ROOT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
|
||||||
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
|
|
||||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
|
|
||||||
public class ExtendedLuceneClauseBuilder {
|
public class ExtendedHSearchClauseBuilder {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedLuceneClauseBuilder.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedHSearchClauseBuilder.class);
|
||||||
|
|
||||||
private static final double QTY_APPROX_TOLERANCE_PERCENT = .10;
|
private static final double QTY_APPROX_TOLERANCE_PERCENT = .10;
|
||||||
private static final double QTY_TOLERANCE_PERCENT = .05;
|
private static final double QTY_TOLERANCE_PERCENT = .05;
|
||||||
|
@ -92,8 +90,8 @@ public class ExtendedLuceneClauseBuilder {
|
||||||
|
|
||||||
final List<TemporalPrecisionEnum> ordinalSearchPrecisions = Arrays.asList(TemporalPrecisionEnum.YEAR, TemporalPrecisionEnum.MONTH, TemporalPrecisionEnum.DAY);
|
final List<TemporalPrecisionEnum> ordinalSearchPrecisions = Arrays.asList(TemporalPrecisionEnum.YEAR, TemporalPrecisionEnum.MONTH, TemporalPrecisionEnum.DAY);
|
||||||
|
|
||||||
public ExtendedLuceneClauseBuilder(FhirContext myFhirContext, ModelConfig theModelConfig,
|
public ExtendedHSearchClauseBuilder(FhirContext myFhirContext, ModelConfig theModelConfig,
|
||||||
BooleanPredicateClausesStep<?> myRootClause, SearchPredicateFactory myPredicateFactory) {
|
BooleanPredicateClausesStep<?> myRootClause, SearchPredicateFactory myPredicateFactory) {
|
||||||
this.myFhirContext = myFhirContext;
|
this.myFhirContext = myFhirContext;
|
||||||
this.myModelConfig = theModelConfig;
|
this.myModelConfig = theModelConfig;
|
||||||
this.myRootClause = myRootClause;
|
this.myRootClause = myRootClause;
|
||||||
|
@ -271,7 +269,7 @@ public class ExtendedLuceneClauseBuilder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normalize the string to match our standardAnalyzer.
|
* Normalize the string to match our standardAnalyzer.
|
||||||
* @see ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer#STANDARD_ANALYZER
|
* @see HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer#STANDARD_ANALYZER
|
||||||
*
|
*
|
||||||
* @param theString the raw string
|
* @param theString the raw string
|
||||||
* @return a case and accent normalized version of the input
|
* @return a case and accent normalized version of the input
|
|
@ -26,7 +26,7 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate;
|
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamDate;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
|
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
|
||||||
import ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData;
|
import ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData;
|
||||||
import ca.uhn.fhir.jpa.searchparam.extractor.ISearchParamExtractor;
|
import ca.uhn.fhir.jpa.searchparam.extractor.ISearchParamExtractor;
|
||||||
import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams;
|
import ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams;
|
||||||
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
|
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
|
||||||
|
@ -48,11 +48,11 @@ import java.util.Map;
|
||||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract search params for advanced lucene indexing.
|
* Extract search params for advanced HSearch indexing.
|
||||||
* <p>
|
* <p>
|
||||||
* This class re-uses the extracted JPA entities to build an ExtendedLuceneIndexData instance.
|
* This class re-uses the extracted JPA entities to build an ExtendedHSearchIndexData instance.
|
||||||
*/
|
*/
|
||||||
public class ExtendedLuceneIndexExtractor {
|
public class ExtendedHSearchIndexExtractor {
|
||||||
|
|
||||||
private final DaoConfig myDaoConfig;
|
private final DaoConfig myDaoConfig;
|
||||||
private final FhirContext myContext;
|
private final FhirContext myContext;
|
||||||
|
@ -60,8 +60,8 @@ public class ExtendedLuceneIndexExtractor {
|
||||||
private final ISearchParamExtractor mySearchParamExtractor;
|
private final ISearchParamExtractor mySearchParamExtractor;
|
||||||
private final ModelConfig myModelConfig;
|
private final ModelConfig myModelConfig;
|
||||||
|
|
||||||
public ExtendedLuceneIndexExtractor(DaoConfig theDaoConfig, FhirContext theContext, ResourceSearchParams theActiveParams,
|
public ExtendedHSearchIndexExtractor(DaoConfig theDaoConfig, FhirContext theContext, ResourceSearchParams theActiveParams,
|
||||||
ISearchParamExtractor theSearchParamExtractor, ModelConfig theModelConfig) {
|
ISearchParamExtractor theSearchParamExtractor, ModelConfig theModelConfig) {
|
||||||
myDaoConfig = theDaoConfig;
|
myDaoConfig = theDaoConfig;
|
||||||
myContext = theContext;
|
myContext = theContext;
|
||||||
myParams = theActiveParams;
|
myParams = theActiveParams;
|
||||||
|
@ -70,10 +70,10 @@ public class ExtendedLuceneIndexExtractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public ExtendedLuceneIndexData extract(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
|
public ExtendedHSearchIndexData extract(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
|
||||||
ExtendedLuceneIndexData retVal = new ExtendedLuceneIndexData(myContext, myModelConfig);
|
ExtendedHSearchIndexData retVal = new ExtendedHSearchIndexData(myContext, myModelConfig);
|
||||||
|
|
||||||
if(myDaoConfig.isStoreResourceInLuceneIndex()) {
|
if(myDaoConfig.isStoreResourceInHSearchIndex()) {
|
||||||
retVal.setRawResourceData(myContext.newJsonParser().encodeResourceToString(theResource));
|
retVal.setRawResourceData(myContext.newJsonParser().encodeResourceToString(theResource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ public class ExtendedLuceneIndexExtractor {
|
||||||
/**
|
/**
|
||||||
* Re-extract token parameters so we can distinguish
|
* Re-extract token parameters so we can distinguish
|
||||||
*/
|
*/
|
||||||
private void extractAutocompleteTokens(IBaseResource theResource, ExtendedLuceneIndexData theRetVal) {
|
private void extractAutocompleteTokens(IBaseResource theResource, ExtendedHSearchIndexData theRetVal) {
|
||||||
// we need to re-index token params to match up display with codes.
|
// we need to re-index token params to match up display with codes.
|
||||||
myParams.values().stream()
|
myParams.values().stream()
|
||||||
.filter(p->p.getParamType() == RestSearchParameterTypeEnum.TOKEN)
|
.filter(p->p.getParamType() == RestSearchParameterTypeEnum.TOKEN)
|
||||||
|
@ -170,7 +170,7 @@ public class ExtendedLuceneIndexExtractor {
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void indexTokenValue(ExtendedLuceneIndexData theRetVal, RuntimeSearchParam p, IBase nextValue) {
|
private void indexTokenValue(ExtendedHSearchIndexData theRetVal, RuntimeSearchParam p, IBase nextValue) {
|
||||||
String nextType = mySearchParamExtractor.toRootTypeName(nextValue);
|
String nextType = mySearchParamExtractor.toRootTypeName(nextValue);
|
||||||
String spName = p.getName();
|
String spName = p.getName();
|
||||||
switch (nextType) {
|
switch (nextType) {
|
||||||
|
@ -194,14 +194,14 @@ public class ExtendedLuceneIndexExtractor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToken_CodeableConcept(ExtendedLuceneIndexData theRetVal, String theSpName, IBase theValue) {
|
private void addToken_CodeableConcept(ExtendedHSearchIndexData theRetVal, String theSpName, IBase theValue) {
|
||||||
List<IBase> codings = mySearchParamExtractor.getCodingsFromCodeableConcept(theValue);
|
List<IBase> codings = mySearchParamExtractor.getCodingsFromCodeableConcept(theValue);
|
||||||
for (IBase nextCoding : codings) {
|
for (IBase nextCoding : codings) {
|
||||||
addToken_Coding(theRetVal, theSpName, (IBaseCoding) nextCoding);
|
addToken_Coding(theRetVal, theSpName, (IBaseCoding) nextCoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToken_Coding(ExtendedLuceneIndexData theRetVal, String theSpName, IBaseCoding theNextValue) {
|
private void addToken_Coding(ExtendedHSearchIndexData theRetVal, String theSpName, IBaseCoding theNextValue) {
|
||||||
theRetVal.addTokenIndexData(theSpName, theNextValue);
|
theRetVal.addTokenIndexData(theSpName, theNextValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -26,14 +26,14 @@ import org.apache.commons.lang3.Validate;
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query result when fetching full resources from Hibernate Search.
|
* Query result when fetching full resources from HSearch.
|
||||||
*/
|
*/
|
||||||
public class ExtendedLuceneResourceProjection {
|
public class ExtendedHSearchResourceProjection {
|
||||||
final long myPid;
|
final long myPid;
|
||||||
final String myForcedId;
|
final String myForcedId;
|
||||||
final String myResourceString;
|
final String myResourceString;
|
||||||
|
|
||||||
public ExtendedLuceneResourceProjection(long thePid, String theForcedId, String theResourceString) {
|
public ExtendedHSearchResourceProjection(long thePid, String theForcedId, String theResourceString) {
|
||||||
Validate.notEmpty(theResourceString, "Resource not stored in search index: " + thePid);
|
Validate.notEmpty(theResourceString, "Resource not stored in search index: " + thePid);
|
||||||
myPid = thePid;
|
myPid = thePid;
|
||||||
myForcedId = theForcedId;
|
myForcedId = theForcedId;
|
|
@ -42,9 +42,9 @@ import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search builder for lucene/elastic for token, string, and reference parameters.
|
* Search builder for HSearch for token, string, and reference parameters.
|
||||||
*/
|
*/
|
||||||
public class ExtendedLuceneSearchBuilder {
|
public class ExtendedHSearchSearchBuilder {
|
||||||
public static final String EMPTY_MODIFIER = "";
|
public static final String EMPTY_MODIFIER = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,7 +126,7 @@ public class ExtendedLuceneSearchBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAndConsumeAdvancedQueryClauses(ExtendedLuceneClauseBuilder builder, String theResourceType, SearchParameterMap theParams, ISearchParamRegistry theSearchParamRegistry) {
|
public void addAndConsumeAdvancedQueryClauses(ExtendedHSearchClauseBuilder builder, String theResourceType, SearchParameterMap theParams, ISearchParamRegistry theSearchParamRegistry) {
|
||||||
// copy the keys to avoid concurrent modification error
|
// copy the keys to avoid concurrent modification error
|
||||||
ArrayList<String> paramNames = compileParamNames(theParams);
|
ArrayList<String> paramNames = compileParamNames(theParams);
|
||||||
for (String nextParam : paramNames) {
|
for (String nextParam : paramNames) {
|
|
@ -17,14 +17,14 @@ import java.util.Map;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_LOWER;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_LOWER;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE_NORM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.SEARCH_PARAM_ROOT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to build HSearch sort clauses.
|
* Used to build HSearch sort clauses.
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import java.util.stream.StreamSupport;
|
import java.util.stream.StreamSupport;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.SEARCH_PARAM_ROOT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds lastN aggregation, and parse the results
|
* Builds lastN aggregation, and parse the results
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class LastNOperation {
|
||||||
private final FhirContext myFhirContext;
|
private final FhirContext myFhirContext;
|
||||||
private final ModelConfig myModelConfig;
|
private final ModelConfig myModelConfig;
|
||||||
private final ISearchParamRegistry mySearchParamRegistry;
|
private final ISearchParamRegistry mySearchParamRegistry;
|
||||||
private final ExtendedLuceneSearchBuilder myExtendedLuceneSearchBuilder = new ExtendedLuceneSearchBuilder();
|
private final ExtendedHSearchSearchBuilder myExtendedHSearchSearchBuilder = new ExtendedHSearchSearchBuilder();
|
||||||
|
|
||||||
public LastNOperation(SearchSession theSession, FhirContext theFhirContext, ModelConfig theModelConfig,
|
public LastNOperation(SearchSession theSession, FhirContext theFhirContext, ModelConfig theModelConfig,
|
||||||
ISearchParamRegistry theSearchParamRegistry) {
|
ISearchParamRegistry theSearchParamRegistry) {
|
||||||
|
@ -61,8 +61,8 @@ public class LastNOperation {
|
||||||
.where(f -> f.bool(b -> {
|
.where(f -> f.bool(b -> {
|
||||||
// Must match observation type
|
// Must match observation type
|
||||||
b.must(f.match().field("myResourceType").matching(OBSERVATION_RES_TYPE));
|
b.must(f.match().field("myResourceType").matching(OBSERVATION_RES_TYPE));
|
||||||
ExtendedLuceneClauseBuilder builder = new ExtendedLuceneClauseBuilder(myFhirContext, myModelConfig, b, f);
|
ExtendedHSearchClauseBuilder builder = new ExtendedHSearchClauseBuilder(myFhirContext, myModelConfig, b, f);
|
||||||
myExtendedLuceneSearchBuilder.addAndConsumeAdvancedQueryClauses(builder, OBSERVATION_RES_TYPE, theParams.clone(), mySearchParamRegistry);
|
myExtendedHSearchSearchBuilder.addAndConsumeAdvancedQueryClauses(builder, OBSERVATION_RES_TYPE, theParams.clone(), mySearchParamRegistry);
|
||||||
}))
|
}))
|
||||||
.aggregation(observationsByCodeKey, f -> f.fromJson(lastNAggregation.toAggregation()))
|
.aggregation(observationsByCodeKey, f -> f.fromJson(lastNAggregation.toAggregation()))
|
||||||
.fetch(0);
|
.fetch(0);
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
* {@link ca.uhn.fhir.jpa.model.entity.ResourceTable#myContentText}.
|
* {@link ca.uhn.fhir.jpa.model.entity.ResourceTable#myContentText}.
|
||||||
* This package extends this search to support token, string, and reference parameters via {@link ca.uhn.fhir.jpa.model.entity.ResourceTable#myLuceneIndexData}.
|
* This package extends this search to support token, string, and reference parameters via {@link ca.uhn.fhir.jpa.model.entity.ResourceTable#myLuceneIndexData}.
|
||||||
* When active, the extracted search parameters which are written to the HFJ_SPIDX_* tables are also written to the Lucene index document.
|
* When active, the extracted search parameters which are written to the HFJ_SPIDX_* tables are also written to the Lucene index document.
|
||||||
* For now, we use the existing JPA index entities to populate the {@link ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData}
|
* For now, we use the existing JPA index entities to populate the {@link ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData}
|
||||||
* in {@link ca.uhn.fhir.jpa.dao.search.ExtendedLuceneIndexExtractor#extract(org.hl7.fhir.instance.model.api.IBaseResource, ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams)} ()}
|
* in {@link ca.uhn.fhir.jpa.dao.search.ExtendedHSearchIndexExtractor#extract(org.hl7.fhir.instance.model.api.IBaseResource, ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams)} ()}
|
||||||
*
|
*
|
||||||
* <h2>Implementation</h2>
|
* <h2>Implementation</h2>
|
||||||
* Both {@link ca.uhn.fhir.jpa.search.builder.SearchBuilder} and {@link ca.uhn.fhir.jpa.dao.LegacySearchBuilder} delegate the
|
* Both {@link ca.uhn.fhir.jpa.search.builder.SearchBuilder} and {@link ca.uhn.fhir.jpa.dao.LegacySearchBuilder} delegate the
|
||||||
|
@ -15,10 +15,10 @@
|
||||||
* The fulltext search runs first and interprets any search parameters it understands, returning a pid list.
|
* The fulltext search runs first and interprets any search parameters it understands, returning a pid list.
|
||||||
* This pid list is used as a narrowing where clause against the remaining unprocessed search parameters in a jdbc query.
|
* This pid list is used as a narrowing where clause against the remaining unprocessed search parameters in a jdbc query.
|
||||||
* The actual queries for the different search types (e.g. token, string, modifiers, etc.) are
|
* The actual queries for the different search types (e.g. token, string, modifiers, etc.) are
|
||||||
* generated in {@link ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder}.
|
* generated in {@link ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder}.
|
||||||
* <p>
|
* <p>
|
||||||
* Full resource bodies can be stored in the Hibernate Search index.
|
* Full resource bodies can be stored in the Hibernate Search index.
|
||||||
* The {@link ca.uhn.fhir.jpa.dao.search.ExtendedLuceneResourceProjection} is used to extract these.
|
* The {@link ca.uhn.fhir.jpa.dao.search.ExtendedHSearchResourceProjection} is used to extract these.
|
||||||
* This is currently restricted to LastN, and misses tag changes from $meta-add and $meta-delete since those don't
|
* This is currently restricted to LastN, and misses tag changes from $meta-add and $meta-delete since those don't
|
||||||
* update Hibernate Search.
|
* update Hibernate Search.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -26,12 +26,12 @@
|
||||||
* <h2>Operation</h2>
|
* <h2>Operation</h2>
|
||||||
* During startup, Hibernate Search uses {@link ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder} to generate a schema.
|
* During startup, Hibernate Search uses {@link ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder} to generate a schema.
|
||||||
*
|
*
|
||||||
* @see ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData
|
* @see ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData
|
||||||
* @see ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter
|
* @see ca.uhn.fhir.jpa.model.search.HSearchIndexWriter
|
||||||
* @see ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder
|
* @see ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder
|
||||||
* @see ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder
|
* @see ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder
|
||||||
*
|
*
|
||||||
* Activated by {@link ca.uhn.fhir.jpa.api.config.DaoConfig#setAdvancedLuceneIndexing(boolean)}.
|
* Activated by {@link ca.uhn.fhir.jpa.api.config.DaoConfig#setAdvancedHSearchIndexing(boolean)}.
|
||||||
*/
|
*/
|
||||||
package ca.uhn.fhir.jpa.dao.search;
|
package ca.uhn.fhir.jpa.dao.search;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
package ca.uhn.fhir.jpa.search;
|
||||||
|
|
||||||
|
import org.apache.lucene.analysis.core.KeywordTokenizerFactory;
|
||||||
|
import org.apache.lucene.analysis.core.LowerCaseFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.core.StopFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.core.WhitespaceTokenizerFactory;
|
||||||
|
import org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.ngram.EdgeNGramFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.ngram.NGramFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.pattern.PatternTokenizerFactory;
|
||||||
|
import org.apache.lucene.analysis.phonetic.PhoneticFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory;
|
||||||
|
import org.apache.lucene.analysis.standard.StandardTokenizerFactory;
|
||||||
|
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurationContext;
|
||||||
|
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurer;
|
||||||
|
import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurationContext;
|
||||||
|
import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurer;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import static ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder.LOWERCASE_ASCIIFOLDING_NORMALIZER;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class includes configuration classes for both Lucene and Elasticsearch as they usually need to be updated
|
||||||
|
* simultaneously, and otherwise is very easy to miss the second
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class HapiHSearchAnalysisConfigurers {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory for defining the analysers.
|
||||||
|
*/
|
||||||
|
public static class HapiLuceneAnalysisConfigurer implements LuceneAnalysisConfigurer {
|
||||||
|
|
||||||
|
public static final String STANDARD_ANALYZER = "standardAnalyzer";
|
||||||
|
public static final String NORM_STRING_ANALYZER = "normStringAnalyzer";
|
||||||
|
public static final String EXACT_ANALYZER = "exactAnalyzer";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(LuceneAnalysisConfigurationContext theLuceneCtx) {
|
||||||
|
theLuceneCtx.analyzer("autocompleteEdgeAnalyzer").custom()
|
||||||
|
.tokenizer(PatternTokenizerFactory.class).param("pattern", "(.*)").param("group", "1")
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(StopFilterFactory.class)
|
||||||
|
.tokenFilter(EdgeNGramFilterFactory.class)
|
||||||
|
.param("minGramSize", "3")
|
||||||
|
.param("maxGramSize", "50");
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer("autocompletePhoneticAnalyzer").custom()
|
||||||
|
.tokenizer(StandardTokenizerFactory.class)
|
||||||
|
.tokenFilter(StopFilterFactory.class)
|
||||||
|
.tokenFilter(PhoneticFilterFactory.class).param("encoder", "DoubleMetaphone")
|
||||||
|
.tokenFilter(SnowballPorterFilterFactory.class).param("language", "English");
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer("autocompleteNGramAnalyzer").custom()
|
||||||
|
.tokenizer(StandardTokenizerFactory.class)
|
||||||
|
.tokenFilter(WordDelimiterFilterFactory.class)
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(NGramFilterFactory.class)
|
||||||
|
.param("minGramSize", "3")
|
||||||
|
.param("maxGramSize", "20");
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer("autocompleteWordEdgeAnalyzer").custom()
|
||||||
|
.tokenizer(StandardTokenizerFactory.class)
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(StopFilterFactory.class)
|
||||||
|
.tokenFilter(EdgeNGramFilterFactory.class)
|
||||||
|
.param("minGramSize", "3")
|
||||||
|
.param("maxGramSize", "20");
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer(STANDARD_ANALYZER).custom()
|
||||||
|
.tokenizer(StandardTokenizerFactory.class)
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer(NORM_STRING_ANALYZER).custom()
|
||||||
|
.tokenizer(KeywordTokenizerFactory.class)
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer(EXACT_ANALYZER).custom()
|
||||||
|
.tokenizer(KeywordTokenizerFactory.class);
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer("conceptParentPidsAnalyzer").custom()
|
||||||
|
.tokenizer(WhitespaceTokenizerFactory.class);
|
||||||
|
|
||||||
|
theLuceneCtx.analyzer("termConceptPropertyAnalyzer").custom()
|
||||||
|
.tokenizer(WhitespaceTokenizerFactory.class);
|
||||||
|
|
||||||
|
theLuceneCtx.normalizer(LOWERCASE_ASCIIFOLDING_NORMALIZER).custom()
|
||||||
|
.tokenFilter(LowerCaseFilterFactory.class)
|
||||||
|
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static class HapiElasticsearchAnalysisConfigurer implements ElasticsearchAnalysisConfigurer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void configure(ElasticsearchAnalysisConfigurationContext theConfigCtx) {
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("autocompleteEdgeAnalyzer").custom()
|
||||||
|
.tokenizer("pattern_all")
|
||||||
|
.tokenFilters("lowercase", "stop", "edgengram_3_50");
|
||||||
|
|
||||||
|
theConfigCtx.tokenizer("pattern_all")
|
||||||
|
.type("pattern")
|
||||||
|
.param("pattern", "(.*)")
|
||||||
|
.param("group", "1");
|
||||||
|
|
||||||
|
theConfigCtx.tokenFilter("edgengram_3_50")
|
||||||
|
.type("edgeNGram")
|
||||||
|
.param("min_gram", "3")
|
||||||
|
.param("max_gram", "50");
|
||||||
|
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("autocompleteWordEdgeAnalyzer").custom()
|
||||||
|
.tokenizer("standard")
|
||||||
|
.tokenFilters("lowercase", "stop", "wordedgengram_3_50");
|
||||||
|
|
||||||
|
theConfigCtx.tokenFilter("wordedgengram_3_50")
|
||||||
|
.type("edgeNGram")
|
||||||
|
.param("min_gram", "3")
|
||||||
|
.param("max_gram", "20");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("autocompletePhoneticAnalyzer").custom()
|
||||||
|
.tokenizer("standard")
|
||||||
|
.tokenFilters("stop", "snowball_english");
|
||||||
|
|
||||||
|
theConfigCtx.tokenFilter("snowball_english")
|
||||||
|
.type("snowball")
|
||||||
|
.param("language", "English");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("autocompleteNGramAnalyzer").custom()
|
||||||
|
.tokenizer("standard")
|
||||||
|
.tokenFilters("word_delimiter", "lowercase", "ngram_3_20");
|
||||||
|
|
||||||
|
theConfigCtx.tokenFilter("ngram_3_20")
|
||||||
|
.type("nGram")
|
||||||
|
.param("min_gram", "3")
|
||||||
|
.param("max_gram", "20");
|
||||||
|
|
||||||
|
|
||||||
|
theConfigCtx.analyzer(HapiLuceneAnalysisConfigurer.STANDARD_ANALYZER).custom()
|
||||||
|
.tokenizer("standard")
|
||||||
|
.tokenFilters("lowercase", "asciifolding");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer(HapiLuceneAnalysisConfigurer.NORM_STRING_ANALYZER).custom()
|
||||||
|
.tokenizer("keyword") // We need the whole string to match, including whitespace.
|
||||||
|
.tokenFilters("lowercase", "asciifolding");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("exactAnalyzer")
|
||||||
|
.custom()
|
||||||
|
.tokenizer("keyword")
|
||||||
|
.tokenFilters("unique");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("conceptParentPidsAnalyzer").custom()
|
||||||
|
.tokenizer("whitespace");
|
||||||
|
|
||||||
|
theConfigCtx.analyzer("termConceptPropertyAnalyzer").custom()
|
||||||
|
.tokenizer("whitespace");
|
||||||
|
|
||||||
|
theConfigCtx.normalizer( LOWERCASE_ASCIIFOLDING_NORMALIZER ).custom()
|
||||||
|
.tokenFilters( "lowercase", "asciifolding" );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,107 +0,0 @@
|
||||||
package ca.uhn.fhir.jpa.search;
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR JPA Server
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import org.apache.lucene.analysis.core.KeywordTokenizerFactory;
|
|
||||||
import org.apache.lucene.analysis.core.LowerCaseFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.core.StopFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.core.WhitespaceTokenizerFactory;
|
|
||||||
import org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.ngram.EdgeNGramFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.ngram.NGramFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.pattern.PatternTokenizerFactory;
|
|
||||||
import org.apache.lucene.analysis.phonetic.PhoneticFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.snowball.SnowballPorterFilterFactory;
|
|
||||||
import org.apache.lucene.analysis.standard.StandardTokenizerFactory;
|
|
||||||
import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurationContext;
|
|
||||||
import org.hibernate.search.backend.lucene.analysis.LuceneAnalysisConfigurer;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder.LOWERCASE_ASCIIFOLDING_NORMALIZER;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Factory for defining the analysers.
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class HapiLuceneAnalysisConfigurer implements LuceneAnalysisConfigurer {
|
|
||||||
|
|
||||||
public static final String STANDARD_ANALYZER = "standardAnalyzer";
|
|
||||||
public static final String NORM_STRING_ANALYZER = "normStringAnalyzer";
|
|
||||||
public static final String EXACT_ANALYZER = "exactAnalyzer";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure(LuceneAnalysisConfigurationContext theLuceneCtx) {
|
|
||||||
theLuceneCtx.analyzer("autocompleteEdgeAnalyzer").custom()
|
|
||||||
.tokenizer(PatternTokenizerFactory.class).param("pattern", "(.*)").param("group", "1")
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(StopFilterFactory.class)
|
|
||||||
.tokenFilter(EdgeNGramFilterFactory.class)
|
|
||||||
.param("minGramSize", "3")
|
|
||||||
.param("maxGramSize", "50");
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer("autocompletePhoneticAnalyzer").custom()
|
|
||||||
.tokenizer(StandardTokenizerFactory.class)
|
|
||||||
.tokenFilter(StopFilterFactory.class)
|
|
||||||
.tokenFilter(PhoneticFilterFactory.class).param("encoder", "DoubleMetaphone")
|
|
||||||
.tokenFilter(SnowballPorterFilterFactory.class).param("language", "English");
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer("autocompleteNGramAnalyzer").custom()
|
|
||||||
.tokenizer(StandardTokenizerFactory.class)
|
|
||||||
.tokenFilter(WordDelimiterFilterFactory.class)
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(NGramFilterFactory.class)
|
|
||||||
.param("minGramSize", "3")
|
|
||||||
.param("maxGramSize", "20");
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer("autocompleteWordEdgeAnalyzer").custom()
|
|
||||||
.tokenizer(StandardTokenizerFactory.class)
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(StopFilterFactory.class)
|
|
||||||
.tokenFilter(EdgeNGramFilterFactory.class)
|
|
||||||
.param("minGramSize", "3")
|
|
||||||
.param("maxGramSize", "20");
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer(STANDARD_ANALYZER).custom()
|
|
||||||
.tokenizer(StandardTokenizerFactory.class)
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer(NORM_STRING_ANALYZER).custom()
|
|
||||||
.tokenizer(KeywordTokenizerFactory.class)
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer(EXACT_ANALYZER).custom()
|
|
||||||
.tokenizer(KeywordTokenizerFactory.class);
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer("conceptParentPidsAnalyzer").custom()
|
|
||||||
.tokenizer(WhitespaceTokenizerFactory.class);
|
|
||||||
|
|
||||||
theLuceneCtx.analyzer("termConceptPropertyAnalyzer").custom()
|
|
||||||
.tokenizer(WhitespaceTokenizerFactory.class);
|
|
||||||
|
|
||||||
theLuceneCtx.normalizer(LOWERCASE_ASCIIFOLDING_NORMALIZER).custom()
|
|
||||||
.tokenFilter(LowerCaseFilterFactory.class)
|
|
||||||
.tokenFilter(ASCIIFoldingFilterFactory.class);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -37,8 +37,8 @@ import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.StreamSupport;
|
import java.util.stream.StreamSupport;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_TEXT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compose the autocomplete aggregation, and parse the results.
|
* Compose the autocomplete aggregation, and parse the results.
|
||||||
|
|
|
@ -21,7 +21,7 @@ package ca.uhn.fhir.jpa.search.autocomplete;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneClauseBuilder;
|
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchClauseBuilder;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
@ -74,7 +74,7 @@ class TokenAutocompleteSearch {
|
||||||
// compose the query json
|
// compose the query json
|
||||||
SearchQueryOptionsStep<?, ?, SearchLoadingOptionsStep, ?, ?> query = mySession.search(ResourceTable.class)
|
SearchQueryOptionsStep<?, ?, SearchLoadingOptionsStep, ?, ?> query = mySession.search(ResourceTable.class)
|
||||||
.where(predFactory -> predFactory.bool(boolBuilder -> {
|
.where(predFactory -> predFactory.bool(boolBuilder -> {
|
||||||
ExtendedLuceneClauseBuilder clauseBuilder = new ExtendedLuceneClauseBuilder(myFhirContext, myModelConfig, boolBuilder, predFactory);
|
ExtendedHSearchClauseBuilder clauseBuilder = new ExtendedHSearchClauseBuilder(myFhirContext, myModelConfig, boolBuilder, predFactory);
|
||||||
|
|
||||||
// we apply resource-level predicates here, at the top level
|
// we apply resource-level predicates here, at the top level
|
||||||
if (isNotBlank(theResourceName)) {
|
if (isNotBlank(theResourceName)) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class ValueSetAutocompleteOptions {
|
||||||
if (haveId || haveIdentifier || haveValueSet) {
|
if (haveId || haveIdentifier || haveValueSet) {
|
||||||
throw new InvalidRequestException(Msg.code(2020) + "$expand with contexDirection='existing' is only supported at the type leve. It is not supported at instance level, with a url specified, or with a ValueSet .");
|
throw new InvalidRequestException(Msg.code(2020) + "$expand with contexDirection='existing' is only supported at the type leve. It is not supported at instance level, with a url specified, or with a ValueSet .");
|
||||||
}
|
}
|
||||||
if (!theDaoConfig.isAdvancedLuceneIndexing()) {
|
if (!theDaoConfig.isAdvancedHSearchIndexing()) {
|
||||||
throw new InvalidRequestException(Msg.code(2022) + "$expand with contexDirection='existing' requires Extended Lucene Indexing.");
|
throw new InvalidRequestException(Msg.code(2022) + "$expand with contexDirection='existing' requires Extended Lucene Indexing.");
|
||||||
}
|
}
|
||||||
if (theContext == null || theContext.isEmpty()) {
|
if (theContext == null || theContext.isEmpty()) {
|
||||||
|
|
|
@ -426,7 +426,7 @@ public class SearchBuilder implements ISearchBuilder {
|
||||||
|
|
||||||
private List<ResourcePersistentId> executeLastNAgainstIndex(Integer theMaximumResults) {
|
private List<ResourcePersistentId> executeLastNAgainstIndex(Integer theMaximumResults) {
|
||||||
// Can we use our hibernate search generated index on resource to support lastN?:
|
// Can we use our hibernate search generated index on resource to support lastN?:
|
||||||
if (myDaoConfig.isAdvancedLuceneIndexing()) {
|
if (myDaoConfig.isAdvancedHSearchIndexing()) {
|
||||||
if (myFulltextSearchSvc == null) {
|
if (myFulltextSearchSvc == null) {
|
||||||
throw new InvalidRequestException(Msg.code(2027) + "LastN operation is not enabled on this service, can not process this request");
|
throw new InvalidRequestException(Msg.code(2027) + "LastN operation is not enabled on this service, can not process this request");
|
||||||
}
|
}
|
||||||
|
@ -940,7 +940,7 @@ public class SearchBuilder implements ISearchBuilder {
|
||||||
private boolean isLoadingFromElasticSearchSupported(Collection<ResourcePersistentId> thePids) {
|
private boolean isLoadingFromElasticSearchSupported(Collection<ResourcePersistentId> thePids) {
|
||||||
|
|
||||||
// is storage enabled?
|
// is storage enabled?
|
||||||
return myDaoConfig.isStoreResourceInLuceneIndex() &&
|
return myDaoConfig.isStoreResourceInHSearchIndex() &&
|
||||||
// we don't support history
|
// we don't support history
|
||||||
thePids.stream().noneMatch(p->p.getVersion()!=null) &&
|
thePids.stream().noneMatch(p->p.getVersion()!=null) &&
|
||||||
// skip the complexity for metadata in dstu2
|
// skip the complexity for metadata in dstu2
|
||||||
|
@ -950,7 +950,7 @@ public class SearchBuilder implements ISearchBuilder {
|
||||||
private List<IBaseResource> loadResourcesFromElasticSearch(Collection<ResourcePersistentId> thePids) {
|
private List<IBaseResource> loadResourcesFromElasticSearch(Collection<ResourcePersistentId> thePids) {
|
||||||
// Do we use the fulltextsvc via hibernate-search to load resources or be backwards compatible with older ES only impl
|
// Do we use the fulltextsvc via hibernate-search to load resources or be backwards compatible with older ES only impl
|
||||||
// to handle lastN?
|
// to handle lastN?
|
||||||
if (myDaoConfig.isAdvancedLuceneIndexing() && myDaoConfig.isStoreResourceInLuceneIndex()) {
|
if (myDaoConfig.isAdvancedHSearchIndexing() && myDaoConfig.isStoreResourceInHSearchIndex()) {
|
||||||
List<Long> pidList = thePids.stream().map(ResourcePersistentId::getIdAsLong).collect(Collectors.toList());
|
List<Long> pidList = thePids.stream().map(ResourcePersistentId::getIdAsLong).collect(Collectors.toList());
|
||||||
|
|
||||||
// wipmb standardize on ResourcePersistentId
|
// wipmb standardize on ResourcePersistentId
|
||||||
|
|
|
@ -20,8 +20,9 @@ package ca.uhn.fhir.jpa.search.elastic;
|
||||||
* #L%
|
* #L%
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import ca.uhn.fhir.context.ConfigurationException;
|
|
||||||
import ca.uhn.fhir.i18n.Msg;
|
import ca.uhn.fhir.i18n.Msg;
|
||||||
|
import ca.uhn.fhir.context.ConfigurationException;
|
||||||
|
import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
|
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||||
|
@ -29,12 +30,12 @@ import org.elasticsearch.client.RequestOptions;
|
||||||
import org.elasticsearch.client.RestHighLevelClient;
|
import org.elasticsearch.client.RestHighLevelClient;
|
||||||
import org.elasticsearch.client.indices.PutIndexTemplateRequest;
|
import org.elasticsearch.client.indices.PutIndexTemplateRequest;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchBackendSettings;
|
|
||||||
import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchIndexSettings;
|
|
||||||
import org.hibernate.search.backend.elasticsearch.index.IndexStatus;
|
import org.hibernate.search.backend.elasticsearch.index.IndexStatus;
|
||||||
import org.hibernate.search.engine.cfg.BackendSettings;
|
import org.hibernate.search.engine.cfg.BackendSettings;
|
||||||
import org.hibernate.search.mapper.orm.automaticindexing.session.AutomaticIndexingSynchronizationStrategyNames;
|
import org.hibernate.search.mapper.orm.automaticindexing.session.AutomaticIndexingSynchronizationStrategyNames;
|
||||||
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
||||||
|
import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchBackendSettings;
|
||||||
|
import org.hibernate.search.backend.elasticsearch.cfg.ElasticsearchIndexSettings;
|
||||||
import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName;
|
import org.hibernate.search.mapper.orm.schema.management.SchemaManagementStrategyName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
|
@ -81,7 +82,8 @@ public class ElasticsearchHibernatePropertiesBuilder {
|
||||||
|
|
||||||
// the below properties are used for ElasticSearch integration
|
// the below properties are used for ElasticSearch integration
|
||||||
theProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch");
|
theProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch");
|
||||||
theProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER), HapiElasticsearchAnalysisConfigurer.class.getName());
|
theProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER),
|
||||||
|
HapiHSearchAnalysisConfigurers.HapiElasticsearchAnalysisConfigurer.class.getName());
|
||||||
theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), myHosts);
|
theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), myHosts);
|
||||||
theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), myProtocol);
|
theProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), myProtocol);
|
||||||
|
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
package ca.uhn.fhir.jpa.search.elastic;
|
|
||||||
|
|
||||||
/*-
|
|
||||||
* #%L
|
|
||||||
* HAPI FHIR JPA Server
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
|
||||||
* %%
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
|
|
||||||
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurationContext;
|
|
||||||
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurer;
|
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder.LOWERCASE_ASCIIFOLDING_NORMALIZER;
|
|
||||||
|
|
||||||
|
|
||||||
public class HapiElasticsearchAnalysisConfigurer implements ElasticsearchAnalysisConfigurer{
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void configure(ElasticsearchAnalysisConfigurationContext theConfigCtx) {
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("autocompleteEdgeAnalyzer").custom()
|
|
||||||
.tokenizer("pattern_all")
|
|
||||||
.tokenFilters("lowercase", "stop", "edgengram_3_50");
|
|
||||||
|
|
||||||
theConfigCtx.tokenizer("pattern_all")
|
|
||||||
.type("pattern")
|
|
||||||
.param("pattern", "(.*)")
|
|
||||||
.param("group", "1");
|
|
||||||
|
|
||||||
theConfigCtx.tokenFilter("edgengram_3_50")
|
|
||||||
.type("edgeNGram")
|
|
||||||
.param("min_gram", "3")
|
|
||||||
.param("max_gram", "50");
|
|
||||||
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("autocompleteWordEdgeAnalyzer").custom()
|
|
||||||
.tokenizer("standard")
|
|
||||||
.tokenFilters("lowercase", "stop", "wordedgengram_3_50");
|
|
||||||
|
|
||||||
theConfigCtx.tokenFilter("wordedgengram_3_50")
|
|
||||||
.type("edgeNGram")
|
|
||||||
.param("min_gram", "3")
|
|
||||||
.param("max_gram", "20");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("autocompletePhoneticAnalyzer").custom()
|
|
||||||
.tokenizer("standard")
|
|
||||||
.tokenFilters("stop", "snowball_english");
|
|
||||||
|
|
||||||
theConfigCtx.tokenFilter("snowball_english")
|
|
||||||
.type("snowball")
|
|
||||||
.param("language", "English");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("autocompleteNGramAnalyzer").custom()
|
|
||||||
.tokenizer("standard")
|
|
||||||
.tokenFilters("word_delimiter", "lowercase", "ngram_3_20");
|
|
||||||
|
|
||||||
theConfigCtx.tokenFilter("ngram_3_20")
|
|
||||||
.type("nGram")
|
|
||||||
.param("min_gram", "3")
|
|
||||||
.param("max_gram", "20");
|
|
||||||
|
|
||||||
|
|
||||||
theConfigCtx.analyzer(HapiLuceneAnalysisConfigurer.STANDARD_ANALYZER).custom()
|
|
||||||
.tokenizer("standard")
|
|
||||||
.tokenFilters("lowercase", "asciifolding");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer(HapiLuceneAnalysisConfigurer.NORM_STRING_ANALYZER).custom()
|
|
||||||
.tokenizer("keyword") // We need the whole string to match, including whitespace.
|
|
||||||
.tokenFilters("lowercase", "asciifolding");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("exactAnalyzer")
|
|
||||||
.custom()
|
|
||||||
.tokenizer("keyword")
|
|
||||||
.tokenFilters("unique");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("conceptParentPidsAnalyzer").custom()
|
|
||||||
.tokenizer("whitespace");
|
|
||||||
|
|
||||||
theConfigCtx.analyzer("termConceptPropertyAnalyzer").custom()
|
|
||||||
.tokenizer("whitespace");
|
|
||||||
|
|
||||||
theConfigCtx.normalizer(LOWERCASE_ASCIIFOLDING_NORMALIZER).custom()
|
|
||||||
.tokenFilters("lowercase", "asciifolding");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -37,7 +37,7 @@ import java.util.regex.Pattern;
|
||||||
/**
|
/**
|
||||||
* This class instructs hibernate search on how to create index names for indexed entities.
|
* This class instructs hibernate search on how to create index names for indexed entities.
|
||||||
* In our case, we use this class to add an optional prefix to all indices which are created, which can be controlled via
|
* In our case, we use this class to add an optional prefix to all indices which are created, which can be controlled via
|
||||||
* {@link DaoConfig#setElasticSearchIndexPrefix(String)}.
|
* {@link DaoConfig#setHSearchIndexPrefix(String)}.
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
|
public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
|
||||||
|
@ -63,8 +63,8 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
|
||||||
|
|
||||||
private String addPrefixIfNecessary(String theCandidateName) {
|
private String addPrefixIfNecessary(String theCandidateName) {
|
||||||
validateDaoConfigIsPresent();
|
validateDaoConfigIsPresent();
|
||||||
if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) {
|
if (!StringUtils.isBlank(myDaoConfig.getHSearchIndexPrefix())) {
|
||||||
return myDaoConfig.getElasticSearchIndexPrefix() + "-" + theCandidateName;
|
return myDaoConfig.getHSearchIndexPrefix() + "-" + theCandidateName;
|
||||||
} else {
|
} else {
|
||||||
return theCandidateName;
|
return theCandidateName;
|
||||||
}
|
}
|
||||||
|
@ -86,8 +86,8 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
|
||||||
|
|
||||||
private String removePrefixIfNecessary(String theCandidateUniqueKey) {
|
private String removePrefixIfNecessary(String theCandidateUniqueKey) {
|
||||||
validateDaoConfigIsPresent();
|
validateDaoConfigIsPresent();
|
||||||
if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) {
|
if (!StringUtils.isBlank(myDaoConfig.getHSearchIndexPrefix())) {
|
||||||
return theCandidateUniqueKey.replace(myDaoConfig.getElasticSearchIndexPrefix() + "-", "");
|
return theCandidateUniqueKey.replace(myDaoConfig.getHSearchIndexPrefix() + "-", "");
|
||||||
} else {
|
} else {
|
||||||
return theCandidateUniqueKey;
|
return theCandidateUniqueKey;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,14 @@
|
||||||
package ca.uhn.fhir.jpa.mdm.interceptor;
|
package ca.uhn.fhir.jpa.mdm.interceptor;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.dao.index.IdHelperService;
|
|
||||||
import ca.uhn.fhir.jpa.entity.MdmLink;
|
import ca.uhn.fhir.jpa.entity.MdmLink;
|
||||||
import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test;
|
import ca.uhn.fhir.jpa.mdm.BaseMdmR4Test;
|
||||||
import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig;
|
import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig;
|
||||||
import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4;
|
import ca.uhn.fhir.jpa.mdm.helper.MdmHelperR4;
|
||||||
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
|
|
||||||
import ca.uhn.fhir.mdm.api.IMdmLink;
|
|
||||||
import ca.uhn.fhir.mdm.api.MdmLinkEvent;
|
import ca.uhn.fhir.mdm.api.MdmLinkEvent;
|
||||||
import ca.uhn.fhir.mdm.api.MdmLinkJson;
|
import ca.uhn.fhir.mdm.api.MdmLinkJson;
|
||||||
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
|
import ca.uhn.fhir.mdm.api.MdmMatchResultEnum;
|
||||||
import ca.uhn.fhir.mdm.model.MdmTransactionContext;
|
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage;
|
import ca.uhn.fhir.rest.server.messaging.ResourceOperationMessage;
|
||||||
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
|
|
||||||
import org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings;
|
|
||||||
import org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings;
|
|
||||||
import org.hibernate.search.engine.cfg.BackendSettings;
|
|
||||||
import org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings;
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.r4.model.Patient;
|
import org.hl7.fhir.r4.model.Patient;
|
||||||
import org.hl7.fhir.r4.model.Practitioner;
|
import org.hl7.fhir.r4.model.Practitioner;
|
||||||
|
@ -25,15 +16,11 @@ import org.junit.jupiter.api.Test;
|
||||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.test.annotation.DirtiesContext;
|
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.TestPropertySource;
|
import org.springframework.test.context.TestPropertySource;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.model.entity;
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
||||||
import ca.uhn.fhir.jpa.model.cross.IResourceLookup;
|
import ca.uhn.fhir.jpa.model.cross.IResourceLookup;
|
||||||
import ca.uhn.fhir.jpa.model.search.ExtendedLuceneIndexData;
|
import ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData;
|
||||||
import ca.uhn.fhir.jpa.model.search.ResourceTableRoutingBinder;
|
import ca.uhn.fhir.jpa.model.search.ResourceTableRoutingBinder;
|
||||||
import ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder;
|
import ca.uhn.fhir.jpa.model.search.SearchParamTextPropertyBinder;
|
||||||
import ca.uhn.fhir.model.primitive.IdDt;
|
import ca.uhn.fhir.model.primitive.IdDt;
|
||||||
|
@ -138,7 +138,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
|
||||||
@Transient
|
@Transient
|
||||||
@IndexingDependency(derivedFrom = @ObjectPath(@PropertyValue(propertyName = "myVersion")))
|
@IndexingDependency(derivedFrom = @ObjectPath(@PropertyValue(propertyName = "myVersion")))
|
||||||
@PropertyBinding(binder = @PropertyBinderRef(type = SearchParamTextPropertyBinder.class))
|
@PropertyBinding(binder = @PropertyBinderRef(type = SearchParamTextPropertyBinder.class))
|
||||||
private ExtendedLuceneIndexData myLuceneIndexData;
|
private ExtendedHSearchIndexData myLuceneIndexData;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "myResource", cascade = {}, fetch = FetchType.LAZY, orphanRemoval = false)
|
@OneToMany(mappedBy = "myResource", cascade = {}, fetch = FetchType.LAZY, orphanRemoval = false)
|
||||||
@OptimisticLock(excluded = true)
|
@OptimisticLock(excluded = true)
|
||||||
|
@ -772,7 +772,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
|
||||||
return myCreatedByMatchUrl;
|
return myCreatedByMatchUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLuceneIndexData(ExtendedLuceneIndexData theLuceneIndexData) {
|
public void setLuceneIndexData(ExtendedHSearchIndexData theLuceneIndexData) {
|
||||||
myLuceneIndexData = theLuceneIndexData;
|
myLuceneIndexData = theLuceneIndexData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,11 +37,11 @@ import java.util.Objects;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collects our lucene extended indexing data.
|
* Collects our HSearch extended indexing data.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ExtendedLuceneIndexData {
|
public class ExtendedHSearchIndexData {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedLuceneIndexData.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedHSearchIndexData.class);
|
||||||
|
|
||||||
final FhirContext myFhirContext;
|
final FhirContext myFhirContext;
|
||||||
final ModelConfig myModelConfig;
|
final ModelConfig myModelConfig;
|
||||||
|
@ -56,7 +56,7 @@ public class ExtendedLuceneIndexData {
|
||||||
private String myForcedId;
|
private String myForcedId;
|
||||||
private String myResourceJSON;
|
private String myResourceJSON;
|
||||||
|
|
||||||
public ExtendedLuceneIndexData(FhirContext theFhirContext, ModelConfig theModelConfig) {
|
public ExtendedHSearchIndexData(FhirContext theFhirContext, ModelConfig theModelConfig) {
|
||||||
this.myFhirContext = theFhirContext;
|
this.myFhirContext = theFhirContext;
|
||||||
this.myModelConfig = theModelConfig;
|
this.myModelConfig = theModelConfig;
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ public class ExtendedLuceneIndexData {
|
||||||
* @param theDocument the Hibernate Search document for ResourceTable
|
* @param theDocument the Hibernate Search document for ResourceTable
|
||||||
*/
|
*/
|
||||||
public void writeIndexElements(DocumentElement theDocument) {
|
public void writeIndexElements(DocumentElement theDocument) {
|
||||||
HibernateSearchIndexWriter indexWriter = HibernateSearchIndexWriter.forRoot(myFhirContext, myModelConfig, theDocument);
|
HSearchIndexWriter indexWriter = HSearchIndexWriter.forRoot(myFhirContext, myModelConfig, theDocument);
|
||||||
|
|
||||||
ourLog.debug("Writing JPA index to Hibernate Search");
|
ourLog.debug("Writing JPA index to Hibernate Search");
|
||||||
|
|
|
@ -36,8 +36,8 @@ import java.util.Map;
|
||||||
* The Hibernate Search DocumentElement api only supports create - it does not support fetching an existing element.
|
* The Hibernate Search DocumentElement api only supports create - it does not support fetching an existing element.
|
||||||
* This class demand-creates object elements for a given path.
|
* This class demand-creates object elements for a given path.
|
||||||
*/
|
*/
|
||||||
public class HibernateSearchElementCache {
|
public class HSearchElementCache {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(HibernateSearchElementCache.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(HSearchElementCache.class);
|
||||||
private final DocumentElement myRoot;
|
private final DocumentElement myRoot;
|
||||||
private final Map<String, DocumentElement> myCache = new HashMap<>();
|
private final Map<String, DocumentElement> myCache = new HashMap<>();
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ public class HibernateSearchElementCache {
|
||||||
* Create the helper rooted on the given DocumentElement
|
* Create the helper rooted on the given DocumentElement
|
||||||
* @param theRoot the document root
|
* @param theRoot the document root
|
||||||
*/
|
*/
|
||||||
public HibernateSearchElementCache(DocumentElement theRoot) {
|
public HSearchElementCache(DocumentElement theRoot) {
|
||||||
this.myRoot = theRoot;
|
this.myRoot = theRoot;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
public class HibernateSearchIndexWriter {
|
public class HSearchIndexWriter {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(HibernateSearchIndexWriter.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(HSearchIndexWriter.class);
|
||||||
public static final String IDX_STRING_NORMALIZED = "norm";
|
public static final String IDX_STRING_NORMALIZED = "norm";
|
||||||
public static final String IDX_STRING_EXACT = "exact";
|
public static final String IDX_STRING_EXACT = "exact";
|
||||||
public static final String IDX_STRING_TEXT = "text";
|
public static final String IDX_STRING_TEXT = "text";
|
||||||
|
@ -55,23 +55,23 @@ public class HibernateSearchIndexWriter {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final HibernateSearchElementCache myNodeCache;
|
final HSearchElementCache myNodeCache;
|
||||||
final FhirContext myFhirContext;
|
final FhirContext myFhirContext;
|
||||||
final ModelConfig myModelConfig;
|
final ModelConfig myModelConfig;
|
||||||
|
|
||||||
HibernateSearchIndexWriter(FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theRoot) {
|
HSearchIndexWriter(FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theRoot) {
|
||||||
myFhirContext = theFhirContext;
|
myFhirContext = theFhirContext;
|
||||||
myModelConfig = theModelConfig;
|
myModelConfig = theModelConfig;
|
||||||
myNodeCache = new HibernateSearchElementCache(theRoot);
|
myNodeCache = new HSearchElementCache(theRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DocumentElement getSearchParamIndexNode(String theSearchParamName, String theIndexType) {
|
public DocumentElement getSearchParamIndexNode(String theSearchParamName, String theIndexType) {
|
||||||
return myNodeCache.getObjectElement(SEARCH_PARAM_ROOT, theSearchParamName, theIndexType);
|
return myNodeCache.getObjectElement(SEARCH_PARAM_ROOT, theSearchParamName, theIndexType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static HibernateSearchIndexWriter forRoot(
|
public static HSearchIndexWriter forRoot(
|
||||||
FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theDocument) {
|
FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theDocument) {
|
||||||
return new HibernateSearchIndexWriter(theFhirContext, theModelConfig, theDocument);
|
return new HSearchIndexWriter(theFhirContext, theModelConfig, theDocument);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeStringIndex(String theSearchParam, String theValue) {
|
public void writeStringIndex(String theSearchParam, String theValue) {
|
|
@ -40,17 +40,17 @@ import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_EXACT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_EXACT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_LOWER;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_LOWER;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_NORMALIZED;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_NORMALIZED;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_TEXT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE_NORM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE_NORM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE_NORM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows hibernate search to index
|
* Allows hibernate search to index
|
||||||
|
@ -59,7 +59,7 @@ import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
|
||||||
* Coding.display
|
* Coding.display
|
||||||
* Identifier.type.text
|
* Identifier.type.text
|
||||||
*/
|
*/
|
||||||
public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBridge<ExtendedLuceneIndexData> {
|
public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBridge<ExtendedHSearchIndexData> {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(SearchParamTextPropertyBinder.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(SearchParamTextPropertyBinder.class);
|
||||||
|
|
||||||
public static final String SEARCH_PARAM_TEXT_PREFIX = "text-";
|
public static final String SEARCH_PARAM_TEXT_PREFIX = "text-";
|
||||||
|
@ -75,7 +75,7 @@ public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBr
|
||||||
|
|
||||||
defineIndexingTemplate(thePropertyBindingContext);
|
defineIndexingTemplate(thePropertyBindingContext);
|
||||||
|
|
||||||
thePropertyBindingContext.bridge(ExtendedLuceneIndexData.class, this);
|
thePropertyBindingContext.bridge(ExtendedHSearchIndexData.class, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void defineIndexingTemplate(PropertyBindingContext thePropertyBindingContext) {
|
private void defineIndexingTemplate(PropertyBindingContext thePropertyBindingContext) {
|
||||||
|
@ -145,9 +145,9 @@ public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBr
|
||||||
|
|
||||||
// The following section is a bit ugly. We need to enforce order and dependency or the object matches will be too big.
|
// The following section is a bit ugly. We need to enforce order and dependency or the object matches will be too big.
|
||||||
{
|
{
|
||||||
IndexSchemaObjectField spfield = indexSchemaElement.objectField(HibernateSearchIndexWriter.SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
|
IndexSchemaObjectField spfield = indexSchemaElement.objectField(HSearchIndexWriter.SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
|
||||||
spfield.toReference();
|
spfield.toReference();
|
||||||
IndexSchemaObjectField nestedSpField = indexSchemaElement.objectField(HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
|
IndexSchemaObjectField nestedSpField = indexSchemaElement.objectField(HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
|
||||||
nestedSpField.toReference();
|
nestedSpField.toReference();
|
||||||
|
|
||||||
// TODO MB: the lucene/elastic independent api is hurting a bit here.
|
// TODO MB: the lucene/elastic independent api is hurting a bit here.
|
||||||
|
@ -219,7 +219,7 @@ public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBr
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(DocumentElement theDocument, ExtendedLuceneIndexData theIndexData, PropertyBridgeWriteContext thePropertyBridgeWriteContext) {
|
public void write(DocumentElement theDocument, ExtendedHSearchIndexData theIndexData, PropertyBridgeWriteContext thePropertyBridgeWriteContext) {
|
||||||
if (theIndexData != null) {
|
if (theIndexData != null) {
|
||||||
ourLog.trace("Writing index data for {}", theIndexData);
|
ourLog.trace("Writing index data for {}", theIndexData);
|
||||||
theIndexData.writeIndexElements(theDocument);
|
theIndexData.writeIndexElements(theDocument);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
|
|
||||||
class HibernateSearchElementCacheTest {
|
class HSearchElementCacheTest {
|
||||||
static class TestDocumentElement implements DocumentElement {
|
static class TestDocumentElement implements DocumentElement {
|
||||||
final TestDocumentElement myParent;
|
final TestDocumentElement myParent;
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class HibernateSearchElementCacheTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
TestDocumentElement myRoot = new TestDocumentElement(null);
|
TestDocumentElement myRoot = new TestDocumentElement(null);
|
||||||
HibernateSearchElementCache mySvc = new HibernateSearchElementCache(myRoot);
|
HSearchElementCache mySvc = new HSearchElementCache(myRoot);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void emptyPathReturnsRoot() {
|
public void emptyPathReturnsRoot() {
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||||
<artifactId>hapi-deployable-pom</artifactId>
|
<artifactId>hapi-deployable-pom</artifactId>
|
||||||
<version>6.1.0-PRE4-SNAPSHOT</version>
|
<version>6.1.0-PRE5-SNAPSHOT</version>
|
||||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ import ca.uhn.fhir.interceptor.executor.InterceptorService;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
||||||
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
|
import ca.uhn.fhir.jpa.api.model.ExpungeOptions;
|
||||||
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
|
|
||||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||||
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
||||||
import ca.uhn.fhir.jpa.config.JpaConfig;
|
import ca.uhn.fhir.jpa.config.JpaConfig;
|
||||||
|
@ -270,7 +269,7 @@ public abstract class BaseJpaTest extends BaseTest {
|
||||||
myFhirInstanceValidator.invalidateCaches();
|
myFhirInstanceValidator.invalidateCaches();
|
||||||
}
|
}
|
||||||
DaoConfig defaultConfig = new DaoConfig();
|
DaoConfig defaultConfig = new DaoConfig();
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
|
||||||
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||||
TestJPAConfig.class,
|
TestJPAConfig.class,
|
||||||
JpaBatch2Config.class,
|
JpaBatch2Config.class,
|
||||||
Batch2JobsConfig.class,
|
Batch2JobsConfig.class,
|
||||||
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
|
TestHSearchAddInConfig.DefaultLuceneHeap.class
|
||||||
})
|
})
|
||||||
public class TestDstu2Config {
|
public class TestDstu2Config {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(TestDstu2Config.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(TestDstu2Config.class);
|
||||||
|
@ -83,7 +83,7 @@ public class TestDstu2Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
|
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
|
||||||
private Exception myLastStackTrace;
|
private Exception myLastStackTrace;
|
||||||
private String myLastStackTraceThreadName;
|
private String myLastStackTraceThreadName;
|
||||||
|
|
||||||
|
|
|
@ -63,13 +63,13 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||||
TestJPAConfig.class,
|
TestJPAConfig.class,
|
||||||
JpaBatch2Config.class,
|
JpaBatch2Config.class,
|
||||||
Batch2JobsConfig.class,
|
Batch2JobsConfig.class,
|
||||||
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
|
TestHSearchAddInConfig.DefaultLuceneHeap.class
|
||||||
})
|
})
|
||||||
public class TestDstu3Config {
|
public class TestDstu3Config {
|
||||||
|
|
||||||
static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestDstu3Config.class);
|
static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestDstu3Config.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
|
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
|
||||||
private Exception myLastStackTrace;
|
private Exception myLastStackTrace;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.test.config;
|
||||||
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
|
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
|
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
|
||||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
||||||
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
|
import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
|
||||||
import ca.uhn.fhir.jpa.search.elastic.ElasticsearchHibernatePropertiesBuilder;
|
import ca.uhn.fhir.jpa.search.elastic.ElasticsearchHibernatePropertiesBuilder;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
||||||
import ca.uhn.fhir.test.utilities.docker.RequiresDocker;
|
import ca.uhn.fhir.test.utilities.docker.RequiresDocker;
|
||||||
|
@ -55,13 +55,13 @@ import java.util.Properties;
|
||||||
* Turn off by adding {@link NoFT} to the test Contexts.
|
* Turn off by adding {@link NoFT} to the test Contexts.
|
||||||
* Use Elasticsearch instead via docker by adding {@link Elasticsearch} to the test Contexts;
|
* Use Elasticsearch instead via docker by adding {@link Elasticsearch} to the test Contexts;
|
||||||
*/
|
*/
|
||||||
public class TestHibernateSearchAddInConfig {
|
public class TestHSearchAddInConfig {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(TestHibernateSearchAddInConfig.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(TestHSearchAddInConfig.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add Hibernate Search config to JPA properties.
|
* Add Hibernate Search config to JPA properties.
|
||||||
*/
|
*/
|
||||||
public interface IHibernateSearchConfigurer {
|
public interface IHSearchConfigurer {
|
||||||
void apply(Properties theJPAProperties);
|
void apply(Properties theJPAProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class TestHibernateSearchAddInConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
IHibernateSearchConfigurer hibernateSearchConfigurer() throws IOException {
|
IHSearchConfigurer hibernateSearchConfigurer() throws IOException {
|
||||||
ourLog.warn("Hibernate Search: using lucene - filesystem");
|
ourLog.warn("Hibernate Search: using lucene - filesystem");
|
||||||
|
|
||||||
// replace by existing directory for debugging purposes
|
// replace by existing directory for debugging purposes
|
||||||
|
@ -84,7 +84,8 @@ public class TestHibernateSearchAddInConfig {
|
||||||
|
|
||||||
Map<String, String> luceneProperties = new HashMap<>();
|
Map<String, String> luceneProperties = new HashMap<>();
|
||||||
luceneProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
|
luceneProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
|
||||||
luceneProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName());
|
luceneProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
|
||||||
|
HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
|
||||||
luceneProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
|
luceneProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
|
||||||
luceneProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), dirPath);
|
luceneProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), dirPath);
|
||||||
ourLog.info("Using lucene root dir: {}", dirPath);
|
ourLog.info("Using lucene root dir: {}", dirPath);
|
||||||
|
@ -112,12 +113,13 @@ public class TestHibernateSearchAddInConfig {
|
||||||
public static class DefaultLuceneHeap {
|
public static class DefaultLuceneHeap {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
IHibernateSearchConfigurer hibernateSearchConfigurer() {
|
IHSearchConfigurer hibernateSearchConfigurer() {
|
||||||
ourLog.warn("Hibernate Search: using lucene - local-heap");
|
ourLog.warn("Hibernate Search: using lucene - local-heap");
|
||||||
|
|
||||||
Map<String, String> luceneHeapProperties = new HashMap<>();
|
Map<String, String> luceneHeapProperties = new HashMap<>();
|
||||||
luceneHeapProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
|
luceneHeapProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
|
||||||
luceneHeapProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName());
|
luceneHeapProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
|
||||||
|
HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
|
||||||
luceneHeapProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-heap");
|
luceneHeapProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-heap");
|
||||||
luceneHeapProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
|
luceneHeapProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
|
||||||
luceneHeapProperties.put(HibernateOrmMapperSettings.ENABLED, "true");
|
luceneHeapProperties.put(HibernateOrmMapperSettings.ENABLED, "true");
|
||||||
|
@ -140,7 +142,7 @@ public class TestHibernateSearchAddInConfig {
|
||||||
@Configuration
|
@Configuration
|
||||||
public static class NoFT {
|
public static class NoFT {
|
||||||
@Bean
|
@Bean
|
||||||
IHibernateSearchConfigurer hibernateSearchConfigurer() {
|
IHSearchConfigurer hibernateSearchConfigurer() {
|
||||||
ourLog.info("Hibernate Search is disabled");
|
ourLog.info("Hibernate Search is disabled");
|
||||||
return (theProperties) -> theProperties.put("hibernate.search.enabled", "false");
|
return (theProperties) -> theProperties.put("hibernate.search.enabled", "false");
|
||||||
}
|
}
|
||||||
|
@ -164,7 +166,7 @@ public class TestHibernateSearchAddInConfig {
|
||||||
public static class Elasticsearch {
|
public static class Elasticsearch {
|
||||||
@Bean
|
@Bean
|
||||||
@Primary // override the default
|
@Primary // override the default
|
||||||
IHibernateSearchConfigurer hibernateSearchConfigurer(ElasticsearchContainer theContainer) {
|
IHSearchConfigurer hibernateSearchConfigurer(ElasticsearchContainer theContainer) {
|
||||||
return (theProperties) -> {
|
return (theProperties) -> {
|
||||||
int httpPort = theContainer.getMappedPort(9200);//9200 is the HTTP port
|
int httpPort = theContainer.getMappedPort(9200);//9200 is the HTTP port
|
||||||
String host = theContainer.getHost();
|
String host = theContainer.getHost();
|
|
@ -64,7 +64,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||||
JpaR4Config.class,
|
JpaR4Config.class,
|
||||||
HapiJpaConfig.class,
|
HapiJpaConfig.class,
|
||||||
TestJPAConfig.class,
|
TestJPAConfig.class,
|
||||||
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class,
|
TestHSearchAddInConfig.DefaultLuceneHeap.class,
|
||||||
JpaBatch2Config.class,
|
JpaBatch2Config.class,
|
||||||
Batch2JobsConfig.class
|
Batch2JobsConfig.class
|
||||||
})
|
})
|
||||||
|
@ -93,7 +93,7 @@ public class TestR4Config {
|
||||||
|
|
||||||
private final Deque<Exception> myLastStackTrace = new LinkedList<>();
|
private final Deque<Exception> myLastStackTrace = new LinkedList<>();
|
||||||
@Autowired
|
@Autowired
|
||||||
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
|
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
|
||||||
private boolean myHaveDumpedThreads;
|
private boolean myHaveDumpedThreads;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|
|
@ -59,7 +59,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||||
TestJPAConfig.class,
|
TestJPAConfig.class,
|
||||||
JpaBatch2Config.class,
|
JpaBatch2Config.class,
|
||||||
Batch2JobsConfig.class,
|
Batch2JobsConfig.class,
|
||||||
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
|
TestHSearchAddInConfig.DefaultLuceneHeap.class
|
||||||
})
|
})
|
||||||
public class TestR5Config {
|
public class TestR5Config {
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class TestR5Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
|
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
|
||||||
@Autowired
|
@Autowired
|
||||||
private Environment myEnvironment;
|
private Environment myEnvironment;
|
||||||
private Exception myLastStackTrace;
|
private Exception myLastStackTrace;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import ca.uhn.fhir.context.ConfigurationException;
|
||||||
import ca.uhn.fhir.context.FhirContext;
|
import ca.uhn.fhir.context.FhirContext;
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.dao.r4.ElasticsearchPrefixTest;
|
import ca.uhn.fhir.jpa.dao.r4.ElasticsearchPrefixTest;
|
||||||
import ca.uhn.fhir.jpa.search.elastic.HapiElasticsearchAnalysisConfigurer;
|
import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
|
||||||
import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy;
|
import ca.uhn.fhir.jpa.search.elastic.IndexNamePrefixLayoutStrategy;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
|
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
|
||||||
import ca.uhn.fhir.jpa.search.elastic.TestElasticsearchContainerHelper;
|
import ca.uhn.fhir.jpa.search.elastic.TestElasticsearchContainerHelper;
|
||||||
|
@ -47,7 +47,7 @@ public class ElasticsearchWithPrefixConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public DaoConfig daoConfig() {
|
public DaoConfig daoConfig() {
|
||||||
DaoConfig daoConfig = new DaoConfig();
|
DaoConfig daoConfig = new DaoConfig();
|
||||||
daoConfig.setElasticSearchIndexPrefix(ElasticsearchPrefixTest.ELASTIC_PREFIX);
|
daoConfig.setHSearchIndexPrefix(ElasticsearchPrefixTest.ELASTIC_PREFIX);
|
||||||
return daoConfig;
|
return daoConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,8 @@ public class ElasticsearchWithPrefixConfig {
|
||||||
String host = elasticContainer().getHost();
|
String host = elasticContainer().getHost();
|
||||||
// the below properties are used for ElasticSearch integration
|
// the below properties are used for ElasticSearch integration
|
||||||
extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch");
|
extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "elasticsearch");
|
||||||
extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER), HapiElasticsearchAnalysisConfigurer.class.getName());
|
extraProperties.put(BackendSettings.backendKey(ElasticsearchIndexSettings.ANALYSIS_CONFIGURER),
|
||||||
|
HapiHSearchAnalysisConfigurers.HapiElasticsearchAnalysisConfigurer.class.getName());
|
||||||
extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), host + ":" + httpPort);
|
extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.HOSTS), host + ":" + httpPort);
|
||||||
extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), "http");
|
extraProperties.put(BackendSettings.backendKey(ElasticsearchBackendSettings.PROTOCOL), "http");
|
||||||
extraProperties.put(HibernateOrmMapperSettings.SCHEMA_MANAGEMENT_STRATEGY, SchemaManagementStrategyName.CREATE.externalRepresentation());
|
extraProperties.put(HibernateOrmMapperSettings.SCHEMA_MANAGEMENT_STRATEGY, SchemaManagementStrategyName.CREATE.externalRepresentation());
|
||||||
|
|
|
@ -11,7 +11,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamUri;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
|
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParamConstants;
|
import ca.uhn.fhir.jpa.searchparam.SearchParamConstants;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.util.TestUtil;
|
import ca.uhn.fhir.jpa.util.TestUtil;
|
||||||
import ca.uhn.fhir.model.api.IResource;
|
import ca.uhn.fhir.model.api.IResource;
|
||||||
import ca.uhn.fhir.model.api.Include;
|
import ca.uhn.fhir.model.api.Include;
|
||||||
|
@ -100,7 +100,7 @@ import static org.junit.jupiter.api.Assertions.fail;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
|
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
|
||||||
public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test {
|
public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu2SearchNoFtTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu2SearchNoFtTest.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -71,7 +71,6 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceGoneException;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException;
|
import ca.uhn.fhir.rest.server.exceptions.ResourceVersionConflictException;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
import org.hamcrest.Matchers;
|
import org.hamcrest.Matchers;
|
||||||
import org.hamcrest.core.StringContains;
|
import org.hamcrest.core.StringContains;
|
||||||
|
@ -84,13 +83,11 @@ import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static org.apache.commons.lang3.StringUtils.defaultString;
|
import static org.apache.commons.lang3.StringUtils.defaultString;
|
||||||
|
@ -2689,7 +2686,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStringParamWhichIsTooLong() {
|
public void testStringParamWhichIsTooLong() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
|
|
||||||
Organization org = new Organization();
|
Organization org = new Organization();
|
||||||
String str = "testStringParamLong__lvdaoy843s89tll8gvs89l4s3gelrukveilufyebrew8r87bv4b77feli7fsl4lv3vb7rexloxe7olb48vov4o78ls7bvo7vb48o48l4bb7vbvx";
|
String str = "testStringParamLong__lvdaoy843s89tll8gvs89l4s3gelrukveilufyebrew8r87bv4b77feli7fsl4lv3vb7rexloxe7olb48vov4o78ls7bvo7vb48o48l4bb7vbvx";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString;
|
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaDstu3Test;
|
import ca.uhn.fhir.jpa.test.BaseJpaDstu3Test;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.param.StringParam;
|
import ca.uhn.fhir.rest.param.StringParam;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
import ca.uhn.fhir.util.HapiExtensions;
|
import ca.uhn.fhir.util.HapiExtensions;
|
||||||
|
@ -33,7 +33,7 @@ import static org.hamcrest.Matchers.hasSize;
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||||
|
|
||||||
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
|
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
|
||||||
public class FhirResourceDaoDstu3PhoneticSearchNoFtTest extends BaseJpaDstu3Test {
|
public class FhirResourceDaoDstu3PhoneticSearchNoFtTest extends BaseJpaDstu3Test {
|
||||||
public static final String GALE = "Gale";
|
public static final String GALE = "Gale";
|
||||||
public static final String GAIL = "Gail";
|
public static final String GAIL = "Gail";
|
||||||
|
|
|
@ -13,7 +13,7 @@ import ca.uhn.fhir.jpa.searchparam.SearchParamConstants;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaDstu3Test;
|
import ca.uhn.fhir.jpa.test.BaseJpaDstu3Test;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.util.TestUtil;
|
import ca.uhn.fhir.jpa.util.TestUtil;
|
||||||
import ca.uhn.fhir.model.api.Include;
|
import ca.uhn.fhir.model.api.Include;
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||||
|
@ -128,7 +128,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.junit.jupiter.api.Assertions.fail;
|
import static org.junit.jupiter.api.Assertions.fail;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
|
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
|
public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3SearchNoFtTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3SearchNoFtTest.class);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.param.DateAndListParam;
|
import ca.uhn.fhir.rest.param.DateAndListParam;
|
||||||
import ca.uhn.fhir.rest.param.DateOrListParam;
|
import ca.uhn.fhir.rest.param.DateOrListParam;
|
||||||
import ca.uhn.fhir.rest.param.DateParam;
|
import ca.uhn.fhir.rest.param.DateParam;
|
||||||
|
@ -54,7 +54,7 @@ import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
|
||||||
abstract public class BaseR4SearchLastN extends BaseJpaTest {
|
abstract public class BaseR4SearchLastN extends BaseJpaTest {
|
||||||
|
|
||||||
private static final Map<String, String> observationPatientMap = new HashMap<>();
|
private static final Map<String, String> observationPatientMap = new HashMap<>();
|
||||||
|
@ -117,7 +117,7 @@ abstract public class BaseR4SearchLastN extends BaseJpaTest {
|
||||||
// Normally would use a static @BeforeClass method for this purpose, but Autowired objects cannot be accessed in static methods.
|
// Normally would use a static @BeforeClass method for this purpose, but Autowired objects cannot be accessed in static methods.
|
||||||
if (!dataLoaded || patient0Id == null) {
|
if (!dataLoaded || patient0Id == null) {
|
||||||
// enabled to also create extended lucene index during creation of test data
|
// enabled to also create extended lucene index during creation of test data
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
Patient pt = new Patient();
|
Patient pt = new Patient();
|
||||||
pt.addName().setFamily("Lastn").addGiven("Arthur");
|
pt.addName().setFamily("Lastn").addGiven("Arthur");
|
||||||
patient0Id = myPatientDao.create(pt, mockSrd()).getId().toUnqualifiedVersionless();
|
patient0Id = myPatientDao.create(pt, mockSrd()).getId().toUnqualifiedVersionless();
|
||||||
|
@ -135,7 +135,7 @@ abstract public class BaseR4SearchLastN extends BaseJpaTest {
|
||||||
myElasticsearchSvc.refreshIndex(ElasticsearchSvcImpl.OBSERVATION_INDEX);
|
myElasticsearchSvc.refreshIndex(ElasticsearchSvcImpl.OBSERVATION_INDEX);
|
||||||
myElasticsearchSvc.refreshIndex(ElasticsearchSvcImpl.OBSERVATION_CODE_INDEX);
|
myElasticsearchSvc.refreshIndex(ElasticsearchSvcImpl.OBSERVATION_CODE_INDEX);
|
||||||
// turn off the setting enabled earlier
|
// turn off the setting enabled earlier
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDoubleMatchingOnAnd_Search() {
|
public void testDoubleMatchingOnAnd_Search() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
createUniqueIndexPatientIdentifier();
|
createUniqueIndexPatientIdentifier();
|
||||||
|
|
||||||
Patient pt = new Patient();
|
Patient pt = new Patient();
|
||||||
|
@ -1043,7 +1043,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSearchSynchronousUsingUniqueComposite() {
|
public void testSearchSynchronousUsingUniqueComposite() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
createUniqueBirthdateAndGenderSps();
|
createUniqueBirthdateAndGenderSps();
|
||||||
|
|
||||||
Patient pt1 = new Patient();
|
Patient pt1 = new Patient();
|
||||||
|
@ -1186,7 +1186,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUniqueValuesAreIndexed_Reference_UsingModifierSyntax() {
|
public void testUniqueValuesAreIndexed_Reference_UsingModifierSyntax() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
createUniqueNameAndManagingOrganizationSps();
|
createUniqueNameAndManagingOrganizationSps();
|
||||||
|
|
||||||
Organization org = new Organization();
|
Organization org = new Organization();
|
||||||
|
@ -1549,7 +1549,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReplaceOneWithAnother() {
|
public void testReplaceOneWithAnother() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
createUniqueBirthdateAndGenderSps();
|
createUniqueBirthdateAndGenderSps();
|
||||||
|
|
||||||
Patient pt1 = new Patient();
|
Patient pt1 = new Patient();
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
|
||||||
public void beforeDisableResultReuse() {
|
public void beforeDisableResultReuse() {
|
||||||
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
|
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
|
||||||
myDaoConfig.setAllowContainsSearches(true);
|
myDaoConfig.setAllowContainsSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class FhirResourceDaoR4SearchLastNIT extends BaseR4SearchLastN {
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void reset() {
|
public void reset() {
|
||||||
SearchBuilder.setMaxPageSize50ForTest(false);
|
SearchBuilder.setMaxPageSize50ForTest(false);
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -101,7 +101,7 @@ public class FhirResourceDaoR4SearchLastNIT extends BaseR4SearchLastN {
|
||||||
@Test
|
@Test
|
||||||
public void testLastN_onEnablingStoringObservationWithIndexMapping_shouldSkipLoadingResourceFromDB() throws IOException {
|
public void testLastN_onEnablingStoringObservationWithIndexMapping_shouldSkipLoadingResourceFromDB() throws IOException {
|
||||||
// Enable flag
|
// Enable flag
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
|
|
||||||
// Create Data
|
// Create Data
|
||||||
Patient pt = new Patient();
|
Patient pt = new Patient();
|
||||||
|
|
|
@ -8,19 +8,19 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run entire @see {@link FhirResourceDaoR4SearchLastNAsyncIT} test suite this time
|
* Run entire @see {@link FhirResourceDaoR4SearchLastNAsyncIT} test suite this time
|
||||||
* using Extended Lucene index as search target
|
* using Extended HSearch index as search target
|
||||||
*/
|
*/
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
public class FhirResourceDaoR4SearchLastNUsingExtendedLuceneIndexAsyncIT extends FhirResourceDaoR4SearchLastNAsyncIT {
|
public class FhirResourceDaoR4SearchLastNUsingExtendedHSearchIndexAsyncIT extends FhirResourceDaoR4SearchLastNAsyncIT {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableAdvancedLuceneIndexing() {
|
public void enableAdvancedHSearchIndexing() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void disableAdvancedLuceneIndex() {
|
public void disableAdvancedHSearchIndex() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -22,25 +22,25 @@ import static org.mockito.Mockito.verify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run entire @see {@link FhirResourceDaoR4SearchLastNIT} test suite this time
|
* Run entire @see {@link FhirResourceDaoR4SearchLastNIT} test suite this time
|
||||||
* using Extended Lucene index as search target.
|
* using Extended HSearch index as search target.
|
||||||
*
|
*
|
||||||
* The other implementation is obsolete, and we can merge these someday.
|
* The other implementation is obsolete, and we can merge these someday.
|
||||||
*/
|
*/
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
public class FhirResourceDaoR4SearchLastNUsingExtendedLuceneIndexIT extends FhirResourceDaoR4SearchLastNIT {
|
public class FhirResourceDaoR4SearchLastNUsingExtendedHSearchIndexIT extends FhirResourceDaoR4SearchLastNIT {
|
||||||
// awkward override so we can spy
|
// awkward override so we can spy
|
||||||
@SpyBean
|
@SpyBean
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
IFulltextSearchSvc myFulltestSearchSvc;
|
IFulltextSearchSvc myFulltestSearchSvc;
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableAdvancedLuceneIndexing() {
|
public void enableAdvancedHSearchIndexing() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void disableAdvancedLuceneIndex() {
|
public void disableAdvancedHSearchIndex() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -26,7 +26,7 @@ import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap.EverythingModeEnum;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaR4Test;
|
import ca.uhn.fhir.jpa.test.BaseJpaR4Test;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.util.SqlQuery;
|
import ca.uhn.fhir.jpa.util.SqlQuery;
|
||||||
import ca.uhn.fhir.jpa.util.TestUtil;
|
import ca.uhn.fhir.jpa.util.TestUtil;
|
||||||
import ca.uhn.fhir.model.api.Include;
|
import ca.uhn.fhir.model.api.Include;
|
||||||
|
@ -196,7 +196,7 @@ import static org.mockito.Mockito.verify;
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "Duplicates"})
|
@SuppressWarnings({"unchecked", "Duplicates"})
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestHibernateSearchAddInConfig.NoFT.class})
|
@ContextConfiguration(classes = {TestHSearchAddInConfig.NoFT.class})
|
||||||
public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
|
public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchNoFtTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchNoFtTest.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test {
|
||||||
public void beforeInitialize() {
|
public void beforeInitialize() {
|
||||||
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
|
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
|
||||||
myDaoConfig.setDisableHashBasedSearches(true);
|
myDaoConfig.setDisableHashBasedSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test {
|
||||||
mySearchCoordinatorSvcImpl.setLoadingThrottleForUnitTests(null);
|
mySearchCoordinatorSvcImpl.setLoadingThrottleForUnitTests(null);
|
||||||
mySearchCoordinatorSvcImpl.setSyncSizeForUnitTests(SearchCoordinatorSvcImpl.DEFAULT_SYNC_SIZE);
|
mySearchCoordinatorSvcImpl.setSyncSizeForUnitTests(SearchCoordinatorSvcImpl.DEFAULT_SYNC_SIZE);
|
||||||
myCaptureQueriesListener.setCaptureQueryStackTrace(true);
|
myCaptureQueriesListener.setCaptureQueryStackTrace(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class FhirResourceDaoR4SearchSqlTest extends BaseJpaR4Test {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void before() {
|
public void before() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
|
|
|
@ -25,7 +25,7 @@ import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
|
import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4;
|
import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.parser.DataFormatException;
|
import ca.uhn.fhir.parser.DataFormatException;
|
||||||
import ca.uhn.fhir.parser.IParser;
|
import ca.uhn.fhir.parser.IParser;
|
||||||
|
@ -123,7 +123,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {
|
@ContextConfiguration(classes = {
|
||||||
TestR4Config.class,
|
TestR4Config.class,
|
||||||
TestHibernateSearchAddInConfig.Elasticsearch.class,
|
TestHSearchAddInConfig.Elasticsearch.class,
|
||||||
DaoTestDataBuilder.Config.class,
|
DaoTestDataBuilder.Config.class,
|
||||||
TestDaoSearch.Config.class
|
TestDaoSearch.Config.class
|
||||||
})
|
})
|
||||||
|
@ -217,15 +217,15 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableContainsAndLucene() {
|
public void enableContainsAndLucene() {
|
||||||
myDaoConfig.setAllowContainsSearches(true);
|
myDaoConfig.setAllowContainsSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void restoreContains() {
|
public void restoreContains() {
|
||||||
DaoConfig defaultConfig = new DaoConfig();
|
DaoConfig defaultConfig = new DaoConfig();
|
||||||
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -914,12 +914,12 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableResourceStorage() {
|
public void enableResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void resetResourceStorage() {
|
public void resetResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1557,12 +1557,12 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableResourceStorage() {
|
public void enableResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void resetResourceStorage() {
|
public void resetResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1694,7 +1694,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableResourceStorage() {
|
public void enableResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
|
|
||||||
myOldObsId = myTestDataBuilder.createObservation(List.of(
|
myOldObsId = myTestDataBuilder.createObservation(List.of(
|
||||||
myTestDataBuilder.withObservationCode("http://example.com/", "theCodeOld"),
|
myTestDataBuilder.withObservationCode("http://example.com/", "theCodeOld"),
|
||||||
|
@ -1707,7 +1707,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void resetResourceStorage() {
|
public void resetResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -1810,7 +1810,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableResourceStorage() {
|
public void enableResourceStorage() {
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1858,8 +1858,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableContainsAndLucene() {
|
public void enableContainsAndLucene() {
|
||||||
myDaoConfig.setAllowContainsSearches(true);
|
myDaoConfig.setAllowContainsSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
||||||
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
|
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
|
||||||
}
|
}
|
||||||
|
@ -1868,8 +1868,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
public void restoreContains() {
|
public void restoreContains() {
|
||||||
DaoConfig defaultConfig = new DaoConfig();
|
DaoConfig defaultConfig = new DaoConfig();
|
||||||
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
|
||||||
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
||||||
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
|
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
|
||||||
}
|
}
|
||||||
|
@ -2253,8 +2253,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableContainsAndLucene() {
|
public void enableContainsAndLucene() {
|
||||||
myDaoConfig.setAllowContainsSearches(true);
|
myDaoConfig.setAllowContainsSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
||||||
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
|
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
|
||||||
}
|
}
|
||||||
|
@ -2263,8 +2263,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
|
||||||
public void restoreContains() {
|
public void restoreContains() {
|
||||||
DaoConfig defaultConfig = new DaoConfig();
|
DaoConfig defaultConfig = new DaoConfig();
|
||||||
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
|
||||||
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
|
||||||
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
|
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,23 +11,19 @@ import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
||||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||||
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.jpa.dao.dstu2.FhirResourceDaoDstu2SearchNoFtTest;
|
|
||||||
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
|
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermReadSvc;
|
import ca.uhn.fhir.jpa.term.api.ITermReadSvc;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.util.ValueSetTestUtil;
|
import ca.uhn.fhir.jpa.util.ValueSetTestUtil;
|
||||||
import ca.uhn.fhir.parser.IParser;
|
|
||||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
|
||||||
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
||||||
import ca.uhn.fhir.rest.param.StringParam;
|
import ca.uhn.fhir.rest.param.StringParam;
|
||||||
import ca.uhn.fhir.rest.param.TokenParam;
|
import ca.uhn.fhir.rest.param.TokenParam;
|
||||||
import ca.uhn.fhir.rest.param.TokenParamModifier;
|
import ca.uhn.fhir.rest.param.TokenParamModifier;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
import org.hl7.fhir.r4.model.AllergyIntolerance;
|
import org.hl7.fhir.r4.model.AllergyIntolerance;
|
||||||
|
@ -61,8 +57,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.persistence.EntityManager;
|
import javax.persistence.EntityManager;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static ca.uhn.fhir.util.HapiExtensions.EXT_VALUESET_EXPANSION_MESSAGE;
|
import static ca.uhn.fhir.util.HapiExtensions.EXT_VALUESET_EXPANSION_MESSAGE;
|
||||||
|
@ -72,10 +66,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.fail;
|
import static org.junit.jupiter.api.Assertions.fail;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
|
||||||
@DirtiesContext
|
@DirtiesContext
|
||||||
public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest {
|
public class FhirResourceDaoR4SearchWithHSearchDisabledTest extends BaseJpaTest {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchWithLuceneDisabledTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchWithHSearchDisabledTest.class);
|
||||||
@Autowired
|
@Autowired
|
||||||
protected DaoConfig myDaoConfig;
|
protected DaoConfig myDaoConfig;
|
||||||
@Autowired
|
@Autowired
|
|
@ -6,7 +6,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||||
import ca.uhn.fhir.jpa.dao.TestDaoSearch;
|
import ca.uhn.fhir.jpa.dao.TestDaoSearch;
|
||||||
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.storage.test.BaseDateSearchDaoTests;
|
import ca.uhn.fhir.storage.test.BaseDateSearchDaoTests;
|
||||||
import ca.uhn.fhir.storage.test.DaoTestDataBuilder;
|
import ca.uhn.fhir.storage.test.DaoTestDataBuilder;
|
||||||
|
@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.not;
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {
|
@ContextConfiguration(classes = {
|
||||||
TestR4Config.class,
|
TestR4Config.class,
|
||||||
TestHibernateSearchAddInConfig.NoFT.class,
|
TestHSearchAddInConfig.NoFT.class,
|
||||||
DaoTestDataBuilder.Config.class,
|
DaoTestDataBuilder.Config.class,
|
||||||
TestDaoSearch.Config.class
|
TestDaoSearch.Config.class
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
|
import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||||
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
|
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
|
@ -51,7 +51,7 @@ import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
|
||||||
public class FhirResourceDaoR4TerminologyElasticsearchIT extends BaseJpaTest {
|
public class FhirResourceDaoR4TerminologyElasticsearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
public static final String URL_MY_CODE_SYSTEM = "http://example.com/my_code_system";
|
public static final String URL_MY_CODE_SYSTEM = "http://example.com/my_code_system";
|
||||||
|
|
|
@ -123,7 +123,6 @@ import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
@ -3647,7 +3646,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
|
||||||
@Test
|
@Test
|
||||||
public void testSortByString01() {
|
public void testSortByString01() {
|
||||||
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);
|
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
|
|
||||||
Patient p = new Patient();
|
Patient p = new Patient();
|
||||||
String string = "testSortByString01";
|
String string = "testSortByString01";
|
||||||
|
|
|
@ -676,7 +676,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testReindexingSingleStringHashValueIsDeleted() {
|
public void testReindexingSingleStringHashValueIsDeleted() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
Patient p = new Patient();
|
Patient p = new Patient();
|
||||||
p.addName().setFamily("family1");
|
p.addName().setFamily("family1");
|
||||||
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();
|
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();
|
||||||
|
|
|
@ -9,7 +9,7 @@ import ca.uhn.fhir.jpa.dao.TestDaoSearch;
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.model.api.IQueryParameterType;
|
import ca.uhn.fhir.model.api.IQueryParameterType;
|
||||||
import ca.uhn.fhir.rest.param.ParamPrefixEnum;
|
import ca.uhn.fhir.rest.param.ParamPrefixEnum;
|
||||||
|
@ -46,11 +46,11 @@ import javax.persistence.EntityManager;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
|
||||||
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
|
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
|
||||||
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,12 +60,12 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {
|
@ContextConfiguration(classes = {
|
||||||
TestR4Config.class,
|
TestR4Config.class,
|
||||||
TestHibernateSearchAddInConfig.Elasticsearch.class,
|
TestHSearchAddInConfig.Elasticsearch.class,
|
||||||
DaoTestDataBuilder.Config.class,
|
DaoTestDataBuilder.Config.class,
|
||||||
TestDaoSearch.Config.class
|
TestDaoSearch.Config.class
|
||||||
})
|
})
|
||||||
@Disabled
|
@Disabled
|
||||||
public class HibernateSearchSandboxTest extends BaseJpaTest {
|
public class HSearchSandboxTest extends BaseJpaTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EntityManager myEntityManager;
|
private EntityManager myEntityManager;
|
||||||
|
@ -104,7 +104,7 @@ public class HibernateSearchSandboxTest extends BaseJpaTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void enableContainsAndLucene() {
|
public void enableContainsAndLucene() {
|
||||||
myDaoConfig.setAllowContainsSearches(true);
|
myDaoConfig.setAllowContainsSearches(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void disableAdvanceIndexing() {
|
public void disableAdvanceIndexing() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
// ugh - somewhere the hibernate round trip is mangling LocalDate to h2 date column unless the tz=GMT
|
// ugh - somewhere the hibernate round trip is mangling LocalDate to h2 date column unless the tz=GMT
|
||||||
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
|
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
|
||||||
ourLog.info("Running with Timezone {}", TimeZone.getDefault().getID());
|
ourLog.info("Running with Timezone {}", TimeZone.getDefault().getID());
|
||||||
|
|
|
@ -10,7 +10,7 @@ import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.json.CodeJson;
|
import ca.uhn.fhir.jpa.search.lastn.json.CodeJson;
|
||||||
import ca.uhn.fhir.jpa.search.lastn.json.ObservationJson;
|
import ca.uhn.fhir.jpa.search.lastn.json.ObservationJson;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.parser.IParser;
|
import ca.uhn.fhir.parser.IParser;
|
||||||
import ca.uhn.fhir.rest.param.ReferenceAndListParam;
|
import ca.uhn.fhir.rest.param.ReferenceAndListParam;
|
||||||
import ca.uhn.fhir.rest.param.ReferenceOrListParam;
|
import ca.uhn.fhir.rest.param.ReferenceOrListParam;
|
||||||
|
@ -63,7 +63,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
|
||||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||||
public class PersistObservationIndexedSearchParamLastNR4IT {
|
public class PersistObservationIndexedSearchParamLastNR4IT {
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class SearchWithInterceptorR4Test extends BaseJpaR4Test {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRawSql_Search() {
|
public void testRawSql_Search() {
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
|
|
||||||
IAnonymousInterceptor interceptor = (pointcut, params) -> {
|
IAnonymousInterceptor interceptor = (pointcut, params) -> {
|
||||||
RequestDetails requestDetails = params.get(RequestDetails.class);
|
RequestDetails requestDetails = params.get(RequestDetails.class);
|
||||||
|
|
|
@ -8,7 +8,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
|
||||||
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
|
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
|
||||||
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
|
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||||
import ca.uhn.fhir.util.StopWatch;
|
import ca.uhn.fhir.util.StopWatch;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
|
@ -47,7 +47,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
|
||||||
@DirtiesContext
|
@DirtiesContext
|
||||||
public class SyntheaPerfTest extends BaseJpaTest {
|
public class SyntheaPerfTest extends BaseJpaTest {
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,11 @@ package ca.uhn.fhir.jpa.dao.r5;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
||||||
import ca.uhn.fhir.rest.param.HasAndListParam;
|
import ca.uhn.fhir.rest.param.HasAndListParam;
|
||||||
import ca.uhn.fhir.rest.param.HasOrListParam;
|
import ca.uhn.fhir.rest.param.HasOrListParam;
|
||||||
import ca.uhn.fhir.rest.param.HasParam;
|
import ca.uhn.fhir.rest.param.HasParam;
|
||||||
import org.hl7.fhir.r5.model.Appointment;
|
|
||||||
import org.hl7.fhir.r5.model.Enumerations;
|
|
||||||
import org.hl7.fhir.r5.model.Organization;
|
import org.hl7.fhir.r5.model.Organization;
|
||||||
import org.hl7.fhir.r5.model.Patient;
|
import org.hl7.fhir.r5.model.Patient;
|
||||||
import org.hl7.fhir.r5.model.Practitioner;
|
import org.hl7.fhir.r5.model.Practitioner;
|
||||||
|
@ -16,13 +14,12 @@ import org.hl7.fhir.r5.model.PractitionerRole;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
|
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
|
||||||
@SuppressWarnings({"Duplicates"})
|
@SuppressWarnings({"Duplicates"})
|
||||||
public class FhirResourceDaoR5SearchNoFtTest extends BaseJpaR5Test {
|
public class FhirResourceDaoR5SearchNoFtTest extends BaseJpaR5Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR5SearchNoFtTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR5SearchNoFtTest.class);
|
||||||
|
|
|
@ -10,15 +10,15 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.instanceOf;
|
import static org.hamcrest.Matchers.instanceOf;
|
||||||
|
|
||||||
class ExtendedLuceneResourceProjectionTest {
|
class ExtendedHSearchResourceProjectionTest {
|
||||||
final FhirContext myFhirContext = FhirContext.forR4();
|
final FhirContext myFhirContext = FhirContext.forR4();
|
||||||
final IParser myParser = myFhirContext.newJsonParser();
|
final IParser myParser = myFhirContext.newJsonParser();
|
||||||
ExtendedLuceneResourceProjection myProjection;
|
ExtendedHSearchResourceProjection myProjection;
|
||||||
IBaseResource myResource;
|
IBaseResource myResource;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void basicBodyReceivesId() {
|
public void basicBodyReceivesId() {
|
||||||
myProjection = new ExtendedLuceneResourceProjection(22, null, "{ \"resourceType\":\"Observation\"}");
|
myProjection = new ExtendedHSearchResourceProjection(22, null, "{ \"resourceType\":\"Observation\"}");
|
||||||
|
|
||||||
myResource = myProjection.toResource(myParser);
|
myResource = myProjection.toResource(myParser);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class ExtendedLuceneResourceProjectionTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void forcedIdOverridesPid() {
|
public void forcedIdOverridesPid() {
|
||||||
myProjection = new ExtendedLuceneResourceProjection(22, "force-id", "{ \"resourceType\":\"Observation\"}");
|
myProjection = new ExtendedHSearchResourceProjection(22, "force-id", "{ \"resourceType\":\"Observation\"}");
|
||||||
|
|
||||||
myResource = myProjection.toResource(myParser);
|
myResource = myProjection.toResource(myParser);
|
||||||
|
|
|
@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
||||||
@ExtendWith(MockitoExtension.class)
|
@ExtendWith(MockitoExtension.class)
|
||||||
public class TerminologyFreetextIndexingProviderTest {
|
public class TerminologyHSearchIndexingProviderTest {
|
||||||
|
|
||||||
private final FhirContext myContext = FhirContext.forR4();
|
private final FhirContext myContext = FhirContext.forR4();
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void disableAdvanceIndexing() {
|
public void disableAdvanceIndexing() {
|
||||||
// advanced indexing doesn't support partitions
|
// advanced indexing doesn't support partitions
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.jpa.provider.r4;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||||
import ca.uhn.fhir.jpa.provider.BaseJpaResourceProvider;
|
import ca.uhn.fhir.jpa.provider.BaseJpaResourceProvider;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.rest.api.Constants;
|
import ca.uhn.fhir.rest.api.Constants;
|
||||||
import ca.uhn.fhir.test.utilities.docker.RequiresDocker;
|
import ca.uhn.fhir.test.utilities.docker.RequiresDocker;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
@ -49,7 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.Elasticsearch.class)
|
@ContextConfiguration(classes = TestHSearchAddInConfig.Elasticsearch.class)
|
||||||
public class ResourceProviderR4ElasticTest extends BaseResourceProviderR4Test {
|
public class ResourceProviderR4ElasticTest extends BaseResourceProviderR4Test {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(ResourceProviderR4ElasticTest.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(ResourceProviderR4ElasticTest.class);
|
||||||
|
|
||||||
|
@ -61,15 +61,15 @@ public class ResourceProviderR4ElasticTest extends BaseResourceProviderR4Test {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void beforeEach() {
|
public void beforeEach() {
|
||||||
myDaoConfig.setLastNEnabled(true);
|
myDaoConfig.setLastNEnabled(true);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(true);
|
myDaoConfig.setStoreResourceInHSearchIndex(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterEach
|
@AfterEach
|
||||||
public void afterEach() {
|
public void afterEach() {
|
||||||
myDaoConfig.setLastNEnabled(new DaoConfig().isLastNEnabled());
|
myDaoConfig.setLastNEnabled(new DaoConfig().isLastNEnabled());
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
|
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
|
||||||
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
|
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ca.uhn.fhir.jpa.provider.ValueSetOperationProvider;
|
||||||
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
|
||||||
import ca.uhn.fhir.jpa.subscription.match.config.WebsocketDispatcherConfig;
|
import ca.uhn.fhir.jpa.subscription.match.config.WebsocketDispatcherConfig;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.parser.StrictErrorHandler;
|
import ca.uhn.fhir.parser.StrictErrorHandler;
|
||||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||||
|
@ -53,11 +53,11 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
|
||||||
@SuppressWarnings({"Duplicates"})
|
@SuppressWarnings({"Duplicates"})
|
||||||
public class ResourceProviderR4ValueSetLuceneDisabledTest extends BaseJpaTest {
|
public class ResourceProviderR4ValueSetHSearchDisabledTest extends BaseJpaTest {
|
||||||
|
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4ValueSetLuceneDisabledTest.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ResourceProviderR4ValueSetHSearchDisabledTest.class);
|
||||||
|
|
||||||
private static RestfulServer ourRestServer;
|
private static RestfulServer ourRestServer;
|
||||||
private static String ourServerBase;
|
private static String ourServerBase;
|
|
@ -10,7 +10,7 @@ import ca.uhn.fhir.jpa.model.entity.ModelConfig;
|
||||||
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
|
||||||
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
|
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
|
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
|
||||||
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
|
||||||
|
@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.not;
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
@ContextConfiguration(classes = {
|
@ContextConfiguration(classes = {
|
||||||
TestR4Config.class,
|
TestR4Config.class,
|
||||||
TestHibernateSearchAddInConfig.Elasticsearch.class,
|
TestHSearchAddInConfig.Elasticsearch.class,
|
||||||
DaoTestDataBuilder.Config.class
|
DaoTestDataBuilder.Config.class
|
||||||
})
|
})
|
||||||
public class TokenAutocompleteElasticsearchIT extends BaseJpaTest {
|
public class TokenAutocompleteElasticsearchIT extends BaseJpaTest {
|
||||||
|
@ -94,7 +94,7 @@ public class TokenAutocompleteElasticsearchIT extends BaseJpaTest {
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void beforePurgeDatabase() {
|
public void beforePurgeDatabase() {
|
||||||
purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataScheduleHelper);
|
purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataScheduleHelper);
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ValueSetAutocompleteOptionsTest {
|
||||||
final private DaoConfig myDaoConfig = new DaoConfig();
|
final private DaoConfig myDaoConfig = new DaoConfig();
|
||||||
|
|
||||||
{
|
{
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(true);
|
myDaoConfig.setAdvancedHSearchIndexing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -170,7 +170,7 @@ class ValueSetAutocompleteOptionsTest {
|
||||||
@Test
|
@Test
|
||||||
public void whenAdvancedIndexingOff() {
|
public void whenAdvancedIndexingOff() {
|
||||||
// given
|
// given
|
||||||
myDaoConfig.setAdvancedLuceneIndexing(false);
|
myDaoConfig.setAdvancedHSearchIndexing(false);
|
||||||
|
|
||||||
assertParseThrowsInvalidRequestWithErrorCode(ERROR_REQUIRES_EXTENDED_INDEXING);
|
assertParseThrowsInvalidRequestWithErrorCode(ERROR_REQUIRES_EXTENDED_INDEXING);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionMatchingS
|
||||||
import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionStrategyEvaluator;
|
import ca.uhn.fhir.jpa.subscription.match.matcher.matching.SubscriptionStrategyEvaluator;
|
||||||
import ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription;
|
import ca.uhn.fhir.jpa.subscription.model.CanonicalSubscription;
|
||||||
import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage;
|
import ca.uhn.fhir.jpa.subscription.model.ResourceModifiedMessage;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.util.CoordCalculatorTest;
|
import ca.uhn.fhir.jpa.util.CoordCalculatorTest;
|
||||||
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
|
||||||
import ca.uhn.fhir.rest.param.CompositeParam;
|
import ca.uhn.fhir.rest.param.CompositeParam;
|
||||||
|
@ -84,7 +84,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.junit.jupiter.api.Assertions.fail;
|
import static org.junit.jupiter.api.Assertions.fail;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
|
||||||
public class InMemorySubscriptionMatcherR4Test {
|
public class InMemorySubscriptionMatcherR4Test {
|
||||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(InMemorySubscriptionMatcherR4Test.class);
|
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(InMemorySubscriptionMatcherR4Test.class);
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
|
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
|
||||||
import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4;
|
import ca.uhn.fhir.jpa.term.api.ITermReadSvcR4;
|
||||||
import ca.uhn.fhir.jpa.term.custom.CustomTerminologySet;
|
import ca.uhn.fhir.jpa.term.custom.CustomTerminologySet;
|
||||||
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.parser.StrictErrorHandler;
|
import ca.uhn.fhir.parser.StrictErrorHandler;
|
||||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||||
|
@ -44,12 +46,15 @@ import org.junit.jupiter.api.AfterEach;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Nested;
|
import org.junit.jupiter.api.Nested;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.mockito.Answers;
|
import org.mockito.Answers;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
import org.springframework.test.util.AopTestUtils;
|
import org.springframework.test.util.AopTestUtils;
|
||||||
import org.springframework.test.util.ReflectionTestUtils;
|
import org.springframework.test.util.ReflectionTestUtils;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
|
@ -87,10 +92,10 @@ import static org.mockito.Mockito.when;
|
||||||
* and remove the abstract qualifier
|
* and remove the abstract qualifier
|
||||||
*/
|
*/
|
||||||
//@ExtendWith(SpringExtension.class)
|
//@ExtendWith(SpringExtension.class)
|
||||||
//@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
|
//@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
|
||||||
//@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
|
//@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
|
||||||
public abstract class AbstractValueSetFreeTextExpansionR4Test extends BaseJpaTest {
|
public abstract class AbstractValueSetHSearchExpansionR4Test extends BaseJpaTest {
|
||||||
private static final Logger ourLog = LoggerFactory.getLogger(AbstractValueSetFreeTextExpansionR4Test.class);
|
private static final Logger ourLog = LoggerFactory.getLogger(AbstractValueSetHSearchExpansionR4Test.class);
|
||||||
|
|
||||||
private static final String CS_URL = "http://example.com/my_code_system";
|
private static final String CS_URL = "http://example.com/my_code_system";
|
||||||
private static final String CS_URL_2 = "http://example.com/my_code_system2";
|
private static final String CS_URL_2 = "http://example.com/my_code_system2";
|
|
@ -8,7 +8,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoValueSet;
|
||||||
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
|
||||||
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
import ca.uhn.fhir.jpa.api.svc.ISearchCoordinatorSvc;
|
||||||
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
import ca.uhn.fhir.jpa.test.BaseJpaTest;
|
||||||
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
|
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
|
||||||
|
@ -56,7 +56,7 @@ import static org.mockito.Mockito.verify;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
|
||||||
@RequiresDocker
|
@RequiresDocker
|
||||||
public class ValueSetExpansionR4ElasticsearchIT extends BaseJpaTest {
|
public class ValueSetExpansionR4ElasticsearchIT extends BaseJpaTest {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package ca.uhn.fhir.jpa.term;
|
package ca.uhn.fhir.jpa.term;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
@ -10,7 +10,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
* This class runs all parent class tests using Elasticsearch configuration
|
* This class runs all parent class tests using Elasticsearch configuration
|
||||||
*/
|
*/
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
|
||||||
public class ValueSetFreeTextExpansionR4ElasticIT extends AbstractValueSetFreeTextExpansionR4Test {
|
public class ValueSetHSearchExpansionR4ElasticIT extends AbstractValueSetHSearchExpansionR4Test {
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
package ca.uhn.fhir.jpa.term;
|
package ca.uhn.fhir.jpa.term;
|
||||||
|
|
||||||
import ca.uhn.fhir.jpa.test.config.TestHibernateSearchAddInConfig;
|
import ca.uhn.fhir.jpa.test.config.TestHSearchAddInConfig;
|
||||||
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
import ca.uhn.fhir.jpa.test.config.TestR4Config;
|
||||||
import org.junit.jupiter.api.extension.ExtendWith;
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
@ -11,7 +11,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
* There is also a LuceneFilesystem configuration available, for debugging purposes
|
* There is also a LuceneFilesystem configuration available, for debugging purposes
|
||||||
*/
|
*/
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
|
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
|
||||||
public class ValueSetFreeTextExpansionR4LuceneIT extends AbstractValueSetFreeTextExpansionR4Test {
|
public class ValueSetHSearchExpansionR4LuceneIT extends AbstractValueSetHSearchExpansionR4Test {
|
||||||
|
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue