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:
jmarchionatto 2022-06-28 18:38:05 -04:00 committed by GitHub
parent f4629822f1
commit 84fe58cc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
143 changed files with 569 additions and 643 deletions

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -3,14 +3,14 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-bom</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<packaging>pom</packaging>
<name>HAPI FHIR BOM</name>
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-cli</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../../hapi-deployable-pom</relativePath>
</parent>

View File

@ -23,12 +23,8 @@ package ca.uhn.fhir.jpa.demo;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
import ca.uhn.fhir.jpa.search.HapiLuceneAnalysisConfigurer;
import org.apache.commons.dbcp2.BasicDataSource;
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.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>6.1.0-PRE4-SNAPSHOT</version>
<version>6.1.0-PRE5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -11,7 +11,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -36,7 +36,6 @@ import ca.uhn.fhir.jpa.search.StaleSearchDeletingSvcImpl;
import ca.uhn.fhir.jpa.util.ResourceCountCache;
import ca.uhn.fhir.jpa.validation.JpaValidationSupportChain;
import ca.uhn.fhir.rest.api.IResourceSupportedSvc;
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport;
import org.springframework.batch.core.configuration.annotation.BatchConfigurer;
@ -46,17 +45,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
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
@Import({JpaConfig.class})
public class HapiJpaConfig {

View File

@ -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.TagDefinition;
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.StorageProcessingMessage;
import ca.uhn.fhir.jpa.model.util.JpaConstants;
@ -1889,9 +1889,9 @@ public abstract class BaseHapiFhirDao<T extends IBaseResource> extends BaseStora
} else {
theEntity.setNarrativeText(parseNarrativeTextIntoWords(theResource));
theEntity.setContentText(parseContentTextIntoWords(theContext, theResource));
if (myDaoConfig.isAdvancedLuceneIndexing()) {
ExtendedLuceneIndexData luceneIndexData = myFulltextSearchSvc.extractLuceneIndexData(theResource, theNewParams);
theEntity.setLuceneIndexData(luceneIndexData);
if (myDaoConfig.isAdvancedHSearchIndexing()) {
ExtendedHSearchIndexData hSearchIndexData = myFulltextSearchSvc.extractLuceneIndexData(theResource, theNewParams);
theEntity.setLuceneIndexData(hSearchIndexData);
}
}
}

View File

@ -24,16 +24,16 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneClauseBuilder;
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneIndexExtractor;
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneResourceProjection;
import ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder;
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchClauseBuilder;
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchIndexExtractor;
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchResourceProjection;
import ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder;
import ca.uhn.fhir.jpa.dao.search.IHSearchSortHelper;
import ca.uhn.fhir.jpa.dao.search.LastNOperation;
import ca.uhn.fhir.jpa.dao.search.SearchScrollQueryExecutorAdaptor;
import ca.uhn.fhir.jpa.model.entity.ModelConfig;
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.ValueSetAutocompleteSearch;
import ca.uhn.fhir.jpa.search.builder.ISearchQueryExecutor;
@ -102,7 +102,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
@Autowired
private IHSearchSortHelper myExtendedFulltextSortHelper;
final private ExtendedLuceneSearchBuilder myAdvancedIndexQueryBuilder = new ExtendedLuceneSearchBuilder();
final private ExtendedHSearchSearchBuilder myAdvancedIndexQueryBuilder = new ExtendedHSearchSearchBuilder();
private Boolean ourDisabled;
@ -113,10 +113,10 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
super();
}
public ExtendedLuceneIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
public ExtendedHSearchIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
String resourceType = myFhirContext.getResourceType(theResource);
ResourceSearchParams activeSearchParams = mySearchParamRegistry.getActiveSearchParams(resourceType);
ExtendedLuceneIndexExtractor extractor = new ExtendedLuceneIndexExtractor(
ExtendedHSearchIndexExtractor extractor = new ExtendedHSearchIndexExtractor(
myDaoConfig, myFhirContext, activeSearchParams, mySearchParamExtractor, myModelConfig);
return extractor.extract(theResource,theNewParams);
}
@ -126,7 +126,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
// keep this in sync with the guts of doSearch
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;
}
@ -182,7 +182,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
)
.where(
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)
@ -215,7 +215,7 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
/*
* Handle other supported parameters
*/
if (myDaoConfig.isAdvancedLuceneIndexing() && theParams.getEverythingMode() == null) {
if (myDaoConfig.isAdvancedHSearchIndexing() && theParams.getEverythingMode() == null) {
myAdvancedIndexQueryBuilder.addAndConsumeAdvancedQueryClauses(builder, theResourceType, theParams, mySearchParamRegistry);
}
@ -341,10 +341,10 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
}
SearchSession session = getSearchSession();
List<ExtendedLuceneResourceProjection> rawResourceDataList = session.search(ResourceTable.class)
List<ExtendedHSearchResourceProjection> rawResourceDataList = session.search(ResourceTable.class)
.select(
f -> f.composite(
ExtendedLuceneResourceProjection::new,
ExtendedHSearchResourceProjection::new,
f.field("myId", Long.class),
f.field("myForcedId", String.class),
f.field("myRawResource", String.class))
@ -354,8 +354,8 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
.fetchAllHits(); // matches '_id' from resource index
ArrayList<Long> pidList = new ArrayList<>(thePids);
List<ExtendedLuceneResourceProjection> orderedAsPidsResourceDataList = rawResourceDataList.stream()
.sorted( Ordering.explicit(pidList).onResultOf(ExtendedLuceneResourceProjection::getPid) ).collect( Collectors.toList() );
List<ExtendedHSearchResourceProjection> orderedAsPidsResourceDataList = rawResourceDataList.stream()
.sorted( Ordering.explicit(pidList).onResultOf(ExtendedHSearchResourceProjection::getPid) ).collect( Collectors.toList() );
IParser parser = myFhirContext.newJsonParser();
return orderedAsPidsResourceDataList.stream()

View File

@ -21,7 +21,7 @@ package ca.uhn.fhir.jpa.dao;
*/
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.builder.ISearchQueryExecutor;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@ -67,7 +67,7 @@ public interface IFulltextSearchSvc {
boolean isDisabled();
ExtendedLuceneIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams);
ExtendedHSearchIndexData extractLuceneIndexData(IBaseResource theResource, ResourceIndexedSearchParams theNewParams);
boolean supportsSomeOf(SearchParameterMap myParams);

View File

@ -23,7 +23,6 @@ package ca.uhn.fhir.jpa.dao;
import ca.uhn.fhir.context.*;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
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.util.CodeSystemHash;
import ca.uhn.fhir.jpa.search.lastn.IElasticsearchSvc;
@ -103,7 +102,7 @@ public class ObservationLastNIndexPersistSvc {
indexedObservation.setEffectiveDtm(theEffectiveDtm);
indexedObservation.setIdentifier(resourcePID);
if (myConfig.isStoreResourceInLuceneIndex()) {
if (myConfig.isStoreResourceInHSearchIndex()) {
indexedObservation.setResource(encodeResource(theResource));
}
indexedObservation.setSubject(theSubjectId);

View File

@ -22,10 +22,10 @@ package ca.uhn.fhir.jpa.dao.search;
import ca.uhn.fhir.context.FhirContext;
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.NormalizedQuantitySearchLevel;
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.TemporalPrecisionEnum;
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.PredicateFinalStep;
import org.hibernate.search.engine.search.predicate.dsl.SearchPredicateFactory;
import org.hibernate.search.util.common.data.RangeBoundInclusion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -63,24 +62,23 @@ import java.util.Optional;
import java.util.Set;
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.HibernateSearchIndexWriter.IDX_STRING_NORMALIZED;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_TEXT;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE_NORM;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
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;
import static org.apache.commons.lang3.ObjectUtils.defaultIfNull;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_EXACT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_NORMALIZED;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE_NORM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
public class ExtendedLuceneClauseBuilder {
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedLuceneClauseBuilder.class);
public class ExtendedHSearchClauseBuilder {
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedHSearchClauseBuilder.class);
private static final double QTY_APPROX_TOLERANCE_PERCENT = .10;
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);
public ExtendedLuceneClauseBuilder(FhirContext myFhirContext, ModelConfig theModelConfig,
BooleanPredicateClausesStep<?> myRootClause, SearchPredicateFactory myPredicateFactory) {
public ExtendedHSearchClauseBuilder(FhirContext myFhirContext, ModelConfig theModelConfig,
BooleanPredicateClausesStep<?> myRootClause, SearchPredicateFactory myPredicateFactory) {
this.myFhirContext = myFhirContext;
this.myModelConfig = theModelConfig;
this.myRootClause = myRootClause;
@ -271,7 +269,7 @@ public class ExtendedLuceneClauseBuilder {
/**
* 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
* @return a case and accent normalized version of the input

View File

@ -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.ResourceIndexedSearchParamDate;
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.ResourceIndexedSearchParams;
import ca.uhn.fhir.rest.api.RestSearchParameterTypeEnum;
@ -48,11 +48,11 @@ import java.util.Map;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
/**
* Extract search params for advanced lucene indexing.
* Extract search params for advanced HSearch indexing.
* <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 FhirContext myContext;
@ -60,8 +60,8 @@ public class ExtendedLuceneIndexExtractor {
private final ISearchParamExtractor mySearchParamExtractor;
private final ModelConfig myModelConfig;
public ExtendedLuceneIndexExtractor(DaoConfig theDaoConfig, FhirContext theContext, ResourceSearchParams theActiveParams,
ISearchParamExtractor theSearchParamExtractor, ModelConfig theModelConfig) {
public ExtendedHSearchIndexExtractor(DaoConfig theDaoConfig, FhirContext theContext, ResourceSearchParams theActiveParams,
ISearchParamExtractor theSearchParamExtractor, ModelConfig theModelConfig) {
myDaoConfig = theDaoConfig;
myContext = theContext;
myParams = theActiveParams;
@ -70,10 +70,10 @@ public class ExtendedLuceneIndexExtractor {
}
@NotNull
public ExtendedLuceneIndexData extract(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
ExtendedLuceneIndexData retVal = new ExtendedLuceneIndexData(myContext, myModelConfig);
public ExtendedHSearchIndexData extract(IBaseResource theResource, ResourceIndexedSearchParams theNewParams) {
ExtendedHSearchIndexData retVal = new ExtendedHSearchIndexData(myContext, myModelConfig);
if(myDaoConfig.isStoreResourceInLuceneIndex()) {
if(myDaoConfig.isStoreResourceInHSearchIndex()) {
retVal.setRawResourceData(myContext.newJsonParser().encodeResourceToString(theResource));
}
@ -160,7 +160,7 @@ public class ExtendedLuceneIndexExtractor {
/**
* 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.
myParams.values().stream()
.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 spName = p.getName();
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);
for (IBase nextCoding : codings) {
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);
}
}

View File

@ -26,14 +26,14 @@ import org.apache.commons.lang3.Validate;
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 String myForcedId;
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);
myPid = thePid;
myForcedId = theForcedId;

View File

@ -42,9 +42,9 @@ import java.util.List;
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 = "";
/**
@ -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
ArrayList<String> paramNames = compileParamNames(theParams);
for (String nextParam : paramNames) {

View File

@ -17,14 +17,14 @@ import java.util.Map;
import java.util.Optional;
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.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
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;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_LOWER;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
/**
* Used to build HSearch sort clauses.

View File

@ -30,7 +30,7 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
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

View File

@ -41,7 +41,7 @@ public class LastNOperation {
private final FhirContext myFhirContext;
private final ModelConfig myModelConfig;
private final ISearchParamRegistry mySearchParamRegistry;
private final ExtendedLuceneSearchBuilder myExtendedLuceneSearchBuilder = new ExtendedLuceneSearchBuilder();
private final ExtendedHSearchSearchBuilder myExtendedHSearchSearchBuilder = new ExtendedHSearchSearchBuilder();
public LastNOperation(SearchSession theSession, FhirContext theFhirContext, ModelConfig theModelConfig,
ISearchParamRegistry theSearchParamRegistry) {
@ -61,8 +61,8 @@ public class LastNOperation {
.where(f -> f.bool(b -> {
// Must match observation type
b.must(f.match().field("myResourceType").matching(OBSERVATION_RES_TYPE));
ExtendedLuceneClauseBuilder builder = new ExtendedLuceneClauseBuilder(myFhirContext, myModelConfig, b, f);
myExtendedLuceneSearchBuilder.addAndConsumeAdvancedQueryClauses(builder, OBSERVATION_RES_TYPE, theParams.clone(), mySearchParamRegistry);
ExtendedHSearchClauseBuilder builder = new ExtendedHSearchClauseBuilder(myFhirContext, myModelConfig, b, f);
myExtendedHSearchSearchBuilder.addAndConsumeAdvancedQueryClauses(builder, OBSERVATION_RES_TYPE, theParams.clone(), mySearchParamRegistry);
}))
.aggregation(observationsByCodeKey, f -> f.fromJson(lastNAggregation.toAggregation()))
.fetch(0);

View File

@ -6,8 +6,8 @@
* {@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}.
* 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}
* in {@link ca.uhn.fhir.jpa.dao.search.ExtendedLuceneIndexExtractor#extract(org.hl7.fhir.instance.model.api.IBaseResource, ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams)} ()}
* 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.ExtendedHSearchIndexExtractor#extract(org.hl7.fhir.instance.model.api.IBaseResource, ca.uhn.fhir.jpa.searchparam.extractor.ResourceIndexedSearchParams)} ()}
*
* <h2>Implementation</h2>
* 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.
* 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
* generated in {@link ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder}.
* generated in {@link ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder}.
* <p>
* 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
* update Hibernate Search.
* </p>
@ -26,12 +26,12 @@
* <h2>Operation</h2>
* 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.HibernateSearchIndexWriter
* @see ca.uhn.fhir.jpa.dao.search.ExtendedLuceneSearchBuilder
* @see ca.uhn.fhir.jpa.model.search.ExtendedHSearchIndexData
* @see ca.uhn.fhir.jpa.model.search.HSearchIndexWriter
* @see ca.uhn.fhir.jpa.dao.search.ExtendedHSearchSearchBuilder
* @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;

View File

@ -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" );
}
}
}

View File

@ -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);
}
}

View File

@ -37,8 +37,8 @@ import java.util.List;
import java.util.stream.Collectors;
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.HibernateSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
/**
* Compose the autocomplete aggregation, and parse the results.

View File

@ -21,7 +21,7 @@ package ca.uhn.fhir.jpa.search.autocomplete;
*/
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.ResourceTable;
import com.google.gson.JsonObject;
@ -74,7 +74,7 @@ class TokenAutocompleteSearch {
// compose the query json
SearchQueryOptionsStep<?, ?, SearchLoadingOptionsStep, ?, ?> query = mySession.search(ResourceTable.class)
.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
if (isNotBlank(theResourceName)) {

View File

@ -82,7 +82,7 @@ public class ValueSetAutocompleteOptions {
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 .");
}
if (!theDaoConfig.isAdvancedLuceneIndexing()) {
if (!theDaoConfig.isAdvancedHSearchIndexing()) {
throw new InvalidRequestException(Msg.code(2022) + "$expand with contexDirection='existing' requires Extended Lucene Indexing.");
}
if (theContext == null || theContext.isEmpty()) {

View File

@ -426,7 +426,7 @@ public class SearchBuilder implements ISearchBuilder {
private List<ResourcePersistentId> executeLastNAgainstIndex(Integer theMaximumResults) {
// Can we use our hibernate search generated index on resource to support lastN?:
if (myDaoConfig.isAdvancedLuceneIndexing()) {
if (myDaoConfig.isAdvancedHSearchIndexing()) {
if (myFulltextSearchSvc == null) {
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) {
// is storage enabled?
return myDaoConfig.isStoreResourceInLuceneIndex() &&
return myDaoConfig.isStoreResourceInHSearchIndex() &&
// we don't support history
thePids.stream().noneMatch(p->p.getVersion()!=null) &&
// skip the complexity for metadata in dstu2
@ -950,7 +950,7 @@ public class SearchBuilder implements ISearchBuilder {
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
// to handle lastN?
if (myDaoConfig.isAdvancedLuceneIndexing() && myDaoConfig.isStoreResourceInLuceneIndex()) {
if (myDaoConfig.isAdvancedHSearchIndexing() && myDaoConfig.isStoreResourceInHSearchIndex()) {
List<Long> pidList = thePids.stream().map(ResourcePersistentId::getIdAsLong).collect(Collectors.toList());
// wipmb standardize on ResourcePersistentId

View File

@ -20,8 +20,9 @@ package ca.uhn.fhir.jpa.search.elastic;
* #L%
*/
import ca.uhn.fhir.context.ConfigurationException;
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 org.apache.commons.lang3.StringUtils;
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.indices.PutIndexTemplateRequest;
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.engine.cfg.BackendSettings;
import org.hibernate.search.mapper.orm.automaticindexing.session.AutomaticIndexingSynchronizationStrategyNames;
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.slf4j.Logger;
@ -81,7 +82,8 @@ public class ElasticsearchHibernatePropertiesBuilder {
// the below properties are used for ElasticSearch integration
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.PROTOCOL), myProtocol);

View File

@ -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");
}
}

View File

@ -37,7 +37,7 @@ import java.util.regex.Pattern;
/**
* 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
* {@link DaoConfig#setElasticSearchIndexPrefix(String)}.
* {@link DaoConfig#setHSearchIndexPrefix(String)}.
*/
@Service
public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
@ -63,8 +63,8 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
private String addPrefixIfNecessary(String theCandidateName) {
validateDaoConfigIsPresent();
if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) {
return myDaoConfig.getElasticSearchIndexPrefix() + "-" + theCandidateName;
if (!StringUtils.isBlank(myDaoConfig.getHSearchIndexPrefix())) {
return myDaoConfig.getHSearchIndexPrefix() + "-" + theCandidateName;
} else {
return theCandidateName;
}
@ -86,8 +86,8 @@ public class IndexNamePrefixLayoutStrategy implements IndexLayoutStrategy {
private String removePrefixIfNecessary(String theCandidateUniqueKey) {
validateDaoConfigIsPresent();
if (!StringUtils.isBlank(myDaoConfig.getElasticSearchIndexPrefix())) {
return theCandidateUniqueKey.replace(myDaoConfig.getElasticSearchIndexPrefix() + "-", "");
if (!StringUtils.isBlank(myDaoConfig.getHSearchIndexPrefix())) {
return theCandidateUniqueKey.replace(myDaoConfig.getHSearchIndexPrefix() + "-", "");
} else {
return theCandidateUniqueKey;
}

View File

@ -7,7 +7,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -1,23 +1,14 @@
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.mdm.BaseMdmR4Test;
import ca.uhn.fhir.jpa.mdm.helper.MdmHelperConfig;
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.MdmLinkJson;
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.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.r4.model.Patient;
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.slf4j.Logger;
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.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import java.util.List;
import java.util.Properties;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.model.entity;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
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.SearchParamTextPropertyBinder;
import ca.uhn.fhir.model.primitive.IdDt;
@ -138,7 +138,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
@Transient
@IndexingDependency(derivedFrom = @ObjectPath(@PropertyValue(propertyName = "myVersion")))
@PropertyBinding(binder = @PropertyBinderRef(type = SearchParamTextPropertyBinder.class))
private ExtendedLuceneIndexData myLuceneIndexData;
private ExtendedHSearchIndexData myLuceneIndexData;
@OneToMany(mappedBy = "myResource", cascade = {}, fetch = FetchType.LAZY, orphanRemoval = false)
@OptimisticLock(excluded = true)
@ -772,7 +772,7 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
return myCreatedByMatchUrl;
}
public void setLuceneIndexData(ExtendedLuceneIndexData theLuceneIndexData) {
public void setLuceneIndexData(ExtendedHSearchIndexData theLuceneIndexData) {
myLuceneIndexData = theLuceneIndexData;
}

View File

@ -37,11 +37,11 @@ import java.util.Objects;
import java.util.function.BiConsumer;
/**
* Collects our lucene extended indexing data.
* Collects our HSearch extended indexing data.
*
*/
public class ExtendedLuceneIndexData {
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedLuceneIndexData.class);
public class ExtendedHSearchIndexData {
private static final Logger ourLog = LoggerFactory.getLogger(ExtendedHSearchIndexData.class);
final FhirContext myFhirContext;
final ModelConfig myModelConfig;
@ -56,7 +56,7 @@ public class ExtendedLuceneIndexData {
private String myForcedId;
private String myResourceJSON;
public ExtendedLuceneIndexData(FhirContext theFhirContext, ModelConfig theModelConfig) {
public ExtendedHSearchIndexData(FhirContext theFhirContext, ModelConfig theModelConfig) {
this.myFhirContext = theFhirContext;
this.myModelConfig = theModelConfig;
}
@ -79,7 +79,7 @@ public class ExtendedLuceneIndexData {
* @param theDocument the Hibernate Search document for ResourceTable
*/
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");

View File

@ -36,8 +36,8 @@ import java.util.Map;
* 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.
*/
public class HibernateSearchElementCache {
private static final Logger ourLog = LoggerFactory.getLogger(HibernateSearchElementCache.class);
public class HSearchElementCache {
private static final Logger ourLog = LoggerFactory.getLogger(HSearchElementCache.class);
private final DocumentElement myRoot;
private final Map<String, DocumentElement> myCache = new HashMap<>();
@ -45,7 +45,7 @@ public class HibernateSearchElementCache {
* Create the helper rooted on the given DocumentElement
* @param theRoot the document root
*/
public HibernateSearchElementCache(DocumentElement theRoot) {
public HSearchElementCache(DocumentElement theRoot) {
this.myRoot = theRoot;
}

View File

@ -33,8 +33,8 @@ import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.util.Collection;
public class HibernateSearchIndexWriter {
private static final Logger ourLog = LoggerFactory.getLogger(HibernateSearchIndexWriter.class);
public class HSearchIndexWriter {
private static final Logger ourLog = LoggerFactory.getLogger(HSearchIndexWriter.class);
public static final String IDX_STRING_NORMALIZED = "norm";
public static final String IDX_STRING_EXACT = "exact";
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 ModelConfig myModelConfig;
HibernateSearchIndexWriter(FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theRoot) {
HSearchIndexWriter(FhirContext theFhirContext, ModelConfig theModelConfig, DocumentElement theRoot) {
myFhirContext = theFhirContext;
myModelConfig = theModelConfig;
myNodeCache = new HibernateSearchElementCache(theRoot);
myNodeCache = new HSearchElementCache(theRoot);
}
public DocumentElement getSearchParamIndexNode(String theSearchParamName, String theIndexType) {
return myNodeCache.getObjectElement(SEARCH_PARAM_ROOT, theSearchParamName, theIndexType);
}
public static HibernateSearchIndexWriter forRoot(
public static HSearchIndexWriter forRoot(
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) {

View File

@ -40,17 +40,17 @@ import org.slf4j.LoggerFactory;
import java.time.Instant;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_EXACT;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_LOWER;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_NORMALIZED;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.IDX_STRING_TEXT;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.NUMBER_VALUE;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_CODE_NORM;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
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.URI_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_EXACT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_LOWER;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_NORMALIZED;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.IDX_STRING_TEXT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NUMBER_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE_NORM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE_NORM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.URI_VALUE;
/**
* Allows hibernate search to index
@ -59,7 +59,7 @@ import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.URI_VALUE;
* Coding.display
* 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);
public static final String SEARCH_PARAM_TEXT_PREFIX = "text-";
@ -75,7 +75,7 @@ public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBr
defineIndexingTemplate(thePropertyBindingContext);
thePropertyBindingContext.bridge(ExtendedLuceneIndexData.class, this);
thePropertyBindingContext.bridge(ExtendedHSearchIndexData.class, this);
}
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.
{
IndexSchemaObjectField spfield = indexSchemaElement.objectField(HibernateSearchIndexWriter.SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
IndexSchemaObjectField spfield = indexSchemaElement.objectField(HSearchIndexWriter.SEARCH_PARAM_ROOT, ObjectStructure.FLATTENED);
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();
// TODO MB: the lucene/elastic independent api is hurting a bit here.
@ -219,7 +219,7 @@ public class SearchParamTextPropertyBinder implements PropertyBinder, PropertyBr
}
@Override
public void write(DocumentElement theDocument, ExtendedLuceneIndexData theIndexData, PropertyBridgeWriteContext thePropertyBridgeWriteContext) {
public void write(DocumentElement theDocument, ExtendedHSearchIndexData theIndexData, PropertyBridgeWriteContext thePropertyBridgeWriteContext) {
if (theIndexData != null) {
ourLog.trace("Writing index data for {}", theIndexData);
theIndexData.writeIndexElements(theDocument);

View File

@ -8,7 +8,7 @@ import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
class HibernateSearchElementCacheTest {
class HSearchElementCacheTest {
static class TestDocumentElement implements DocumentElement {
final TestDocumentElement myParent;
@ -49,7 +49,7 @@ class HibernateSearchElementCacheTest {
}
TestDocumentElement myRoot = new TestDocumentElement(null);
HibernateSearchElementCache mySvc = new HibernateSearchElementCache(myRoot);
HSearchElementCache mySvc = new HSearchElementCache(myRoot);
@Test
public void emptyPathReturnsRoot() {

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<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>
</parent>

View File

@ -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.dao.IFhirSystemDao;
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.bulk.export.api.IBulkDataExportJobSchedulingHelper;
import ca.uhn.fhir.jpa.config.JpaConfig;
@ -270,7 +269,7 @@ public abstract class BaseJpaTest extends BaseTest {
myFhirInstanceValidator.invalidateCaches();
}
DaoConfig defaultConfig = new DaoConfig();
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());

View File

@ -60,7 +60,7 @@ import static org.junit.jupiter.api.Assertions.fail;
TestJPAConfig.class,
JpaBatch2Config.class,
Batch2JobsConfig.class,
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
TestHSearchAddInConfig.DefaultLuceneHeap.class
})
public class TestDstu2Config {
private static final Logger ourLog = LoggerFactory.getLogger(TestDstu2Config.class);
@ -83,7 +83,7 @@ public class TestDstu2Config {
}
@Autowired
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
private Exception myLastStackTrace;
private String myLastStackTraceThreadName;

View File

@ -63,13 +63,13 @@ import static org.junit.jupiter.api.Assertions.fail;
TestJPAConfig.class,
JpaBatch2Config.class,
Batch2JobsConfig.class,
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
TestHSearchAddInConfig.DefaultLuceneHeap.class
})
public class TestDstu3Config {
static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TestDstu3Config.class);
@Autowired
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
private Exception myLastStackTrace;
@Bean

View File

@ -23,7 +23,7 @@ package ca.uhn.fhir.jpa.test.config;
import ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl;
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
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.lastn.ElasticsearchSvcImpl;
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.
* Use Elasticsearch instead via docker by adding {@link Elasticsearch} to the test Contexts;
*/
public class TestHibernateSearchAddInConfig {
private static final Logger ourLog = LoggerFactory.getLogger(TestHibernateSearchAddInConfig.class);
public class TestHSearchAddInConfig {
private static final Logger ourLog = LoggerFactory.getLogger(TestHSearchAddInConfig.class);
/**
* Add Hibernate Search config to JPA properties.
*/
public interface IHibernateSearchConfigurer {
public interface IHSearchConfigurer {
void apply(Properties theJPAProperties);
}
@ -74,7 +74,7 @@ public class TestHibernateSearchAddInConfig {
@Bean
@Primary
IHibernateSearchConfigurer hibernateSearchConfigurer() throws IOException {
IHSearchConfigurer hibernateSearchConfigurer() throws IOException {
ourLog.warn("Hibernate Search: using lucene - filesystem");
// replace by existing directory for debugging purposes
@ -84,7 +84,8 @@ public class TestHibernateSearchAddInConfig {
Map<String, String> luceneProperties = new HashMap<>();
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_ROOT), dirPath);
ourLog.info("Using lucene root dir: {}", dirPath);
@ -112,12 +113,13 @@ public class TestHibernateSearchAddInConfig {
public static class DefaultLuceneHeap {
@Bean
IHibernateSearchConfigurer hibernateSearchConfigurer() {
IHSearchConfigurer hibernateSearchConfigurer() {
ourLog.warn("Hibernate Search: using lucene - local-heap");
Map<String, String> luceneHeapProperties = new HashMap<>();
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(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
luceneHeapProperties.put(HibernateOrmMapperSettings.ENABLED, "true");
@ -140,7 +142,7 @@ public class TestHibernateSearchAddInConfig {
@Configuration
public static class NoFT {
@Bean
IHibernateSearchConfigurer hibernateSearchConfigurer() {
IHSearchConfigurer hibernateSearchConfigurer() {
ourLog.info("Hibernate Search is disabled");
return (theProperties) -> theProperties.put("hibernate.search.enabled", "false");
}
@ -164,7 +166,7 @@ public class TestHibernateSearchAddInConfig {
public static class Elasticsearch {
@Bean
@Primary // override the default
IHibernateSearchConfigurer hibernateSearchConfigurer(ElasticsearchContainer theContainer) {
IHSearchConfigurer hibernateSearchConfigurer(ElasticsearchContainer theContainer) {
return (theProperties) -> {
int httpPort = theContainer.getMappedPort(9200);//9200 is the HTTP port
String host = theContainer.getHost();

View File

@ -64,7 +64,7 @@ import static org.junit.jupiter.api.Assertions.fail;
JpaR4Config.class,
HapiJpaConfig.class,
TestJPAConfig.class,
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class,
TestHSearchAddInConfig.DefaultLuceneHeap.class,
JpaBatch2Config.class,
Batch2JobsConfig.class
})
@ -93,7 +93,7 @@ public class TestR4Config {
private final Deque<Exception> myLastStackTrace = new LinkedList<>();
@Autowired
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
private boolean myHaveDumpedThreads;
@Bean

View File

@ -59,7 +59,7 @@ import static org.junit.jupiter.api.Assertions.fail;
TestJPAConfig.class,
JpaBatch2Config.class,
Batch2JobsConfig.class,
TestHibernateSearchAddInConfig.DefaultLuceneHeap.class
TestHSearchAddInConfig.DefaultLuceneHeap.class
})
public class TestR5Config {
@ -86,7 +86,7 @@ public class TestR5Config {
}
@Autowired
TestHibernateSearchAddInConfig.IHibernateSearchConfigurer hibernateSearchConfigurer;
TestHSearchAddInConfig.IHSearchConfigurer hibernateSearchConfigurer;
@Autowired
private Environment myEnvironment;
private Exception myLastStackTrace;

View File

@ -4,7 +4,7 @@ import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
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.lastn.ElasticsearchRestClientFactory;
import ca.uhn.fhir.jpa.search.elastic.TestElasticsearchContainerHelper;
@ -47,7 +47,7 @@ public class ElasticsearchWithPrefixConfig {
@Bean
public DaoConfig daoConfig() {
DaoConfig daoConfig = new DaoConfig();
daoConfig.setElasticSearchIndexPrefix(ElasticsearchPrefixTest.ELASTIC_PREFIX);
daoConfig.setHSearchIndexPrefix(ElasticsearchPrefixTest.ELASTIC_PREFIX);
return daoConfig;
}
@ -105,7 +105,8 @@ public class ElasticsearchWithPrefixConfig {
String host = elasticContainer().getHost();
// the below properties are used for ElasticSearch integration
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.PROTOCOL), "http");
extraProperties.put(HibernateOrmMapperSettings.SCHEMA_MANAGEMENT_STRATEGY, SchemaManagementStrategyName.CREATE.externalRepresentation());

View File

@ -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.searchparam.SearchParamConstants;
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.model.api.IResource;
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;
@SuppressWarnings("unchecked")
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu2SearchNoFtTest.class);
@Autowired

View File

@ -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.ResourceVersionConflictException;
import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.hamcrest.Matchers;
import org.hamcrest.core.StringContains;
@ -84,13 +83,11 @@ import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static org.apache.commons.lang3.StringUtils.defaultString;
@ -2689,7 +2686,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test {
@Test
public void testStringParamWhichIsTooLong() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
Organization org = new Organization();
String str = "testStringParamLong__lvdaoy843s89tll8gvs89l4s3gelrukveilufyebrew8r87bv4b77feli7fsl4lv3vb7rexloxe7olb48vov4o78ls7bvo7vb48o48l4bb7vbvx";

View File

@ -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.searchparam.SearchParameterMap;
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.server.util.ISearchParamRegistry;
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.assertNotEquals;
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
public class FhirResourceDaoDstu3PhoneticSearchNoFtTest extends BaseJpaDstu3Test {
public static final String GALE = "Gale";
public static final String GAIL = "Gail";

View File

@ -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.EverythingModeEnum;
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.model.api.Include;
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.mockito.Mockito.mock;
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
@SuppressWarnings("unchecked")
public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3SearchNoFtTest.class);

View File

@ -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.searchparam.SearchParameterMap;
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.DateOrListParam;
import ca.uhn.fhir.rest.param.DateParam;
@ -54,7 +54,7 @@ import static org.mockito.Mockito.when;
@ExtendWith(SpringExtension.class)
@RequiresDocker
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
abstract public class BaseR4SearchLastN extends BaseJpaTest {
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.
if (!dataLoaded || patient0Id == null) {
// enabled to also create extended lucene index during creation of test data
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
Patient pt = new Patient();
pt.addName().setFamily("Lastn").addGiven("Arthur");
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_CODE_INDEX);
// turn off the setting enabled earlier
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}
}

View File

@ -364,7 +364,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testDoubleMatchingOnAnd_Search() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
createUniqueIndexPatientIdentifier();
Patient pt = new Patient();
@ -1043,7 +1043,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testSearchSynchronousUsingUniqueComposite() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
createUniqueBirthdateAndGenderSps();
Patient pt1 = new Patient();
@ -1186,7 +1186,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testUniqueValuesAreIndexed_Reference_UsingModifierSyntax() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
createUniqueNameAndManagingOrganizationSps();
Organization org = new Organization();
@ -1549,7 +1549,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testReplaceOneWithAnother() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
createUniqueBirthdateAndGenderSps();
Patient pt1 = new Patient();

View File

@ -45,7 +45,7 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
public void beforeDisableResultReuse() {
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
myDaoConfig.setAllowContainsSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}
/**

View File

@ -36,7 +36,7 @@ public class FhirResourceDaoR4SearchLastNIT extends BaseR4SearchLastN {
@AfterEach
public void reset() {
SearchBuilder.setMaxPageSize50ForTest(false);
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
}
@Test
@ -101,7 +101,7 @@ public class FhirResourceDaoR4SearchLastNIT extends BaseR4SearchLastN {
@Test
public void testLastN_onEnablingStoringObservationWithIndexMapping_shouldSkipLoadingResourceFromDB() throws IOException {
// Enable flag
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
// Create Data
Patient pt = new Patient();

View File

@ -8,19 +8,19 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
/**
* 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)
public class FhirResourceDaoR4SearchLastNUsingExtendedLuceneIndexAsyncIT extends FhirResourceDaoR4SearchLastNAsyncIT {
public class FhirResourceDaoR4SearchLastNUsingExtendedHSearchIndexAsyncIT extends FhirResourceDaoR4SearchLastNAsyncIT {
@BeforeEach
public void enableAdvancedLuceneIndexing() {
myDaoConfig.setAdvancedLuceneIndexing(true);
public void enableAdvancedHSearchIndexing() {
myDaoConfig.setAdvancedHSearchIndexing(true);
}
@AfterEach
public void disableAdvancedLuceneIndex() {
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
public void disableAdvancedHSearchIndex() {
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
}
}

View File

@ -22,25 +22,25 @@ import static org.mockito.Mockito.verify;
/**
* 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.
*/
@ExtendWith(SpringExtension.class)
public class FhirResourceDaoR4SearchLastNUsingExtendedLuceneIndexIT extends FhirResourceDaoR4SearchLastNIT {
public class FhirResourceDaoR4SearchLastNUsingExtendedHSearchIndexIT extends FhirResourceDaoR4SearchLastNIT {
// awkward override so we can spy
@SpyBean
@Autowired(required = false)
IFulltextSearchSvc myFulltestSearchSvc;
@BeforeEach
public void enableAdvancedLuceneIndexing() {
myDaoConfig.setAdvancedLuceneIndexing(true);
public void enableAdvancedHSearchIndexing() {
myDaoConfig.setAdvancedHSearchIndexing(true);
}
@AfterEach
public void disableAdvancedLuceneIndex() {
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
public void disableAdvancedHSearchIndex() {
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
}
/**

View File

@ -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.EverythingModeEnum;
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.TestUtil;
import ca.uhn.fhir.model.api.Include;
@ -196,7 +196,7 @@ import static org.mockito.Mockito.verify;
@SuppressWarnings({"unchecked", "Duplicates"})
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestHibernateSearchAddInConfig.NoFT.class})
@ContextConfiguration(classes = {TestHSearchAddInConfig.NoFT.class})
public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchNoFtTest.class);
@Autowired

View File

@ -152,7 +152,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test {
public void beforeInitialize() {
myDaoConfig.setReuseCachedSearchResultsForMillis(null);
myDaoConfig.setDisableHashBasedSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}
@Test

View File

@ -94,7 +94,7 @@ public class FhirResourceDaoR4SearchOptimizedTest extends BaseJpaR4Test {
mySearchCoordinatorSvcImpl.setLoadingThrottleForUnitTests(null);
mySearchCoordinatorSvcImpl.setSyncSizeForUnitTests(SearchCoordinatorSvcImpl.DEFAULT_SYNC_SIZE);
myCaptureQueriesListener.setCaptureQueryStackTrace(true);
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}
@AfterEach

View File

@ -30,7 +30,7 @@ public class FhirResourceDaoR4SearchSqlTest extends BaseJpaR4Test {
@BeforeEach
public void before() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}
@AfterEach

View File

@ -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.ITermReadSvcR4;
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.parser.DataFormatException;
import ca.uhn.fhir.parser.IParser;
@ -123,7 +123,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@RequiresDocker
@ContextConfiguration(classes = {
TestR4Config.class,
TestHibernateSearchAddInConfig.Elasticsearch.class,
TestHSearchAddInConfig.Elasticsearch.class,
DaoTestDataBuilder.Config.class,
TestDaoSearch.Config.class
})
@ -217,15 +217,15 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableContainsAndLucene() {
myDaoConfig.setAllowContainsSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
}
@AfterEach
public void restoreContains() {
DaoConfig defaultConfig = new DaoConfig();
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
}
@Test
@ -914,12 +914,12 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
}
@AfterEach
public void resetResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
}
@ -1557,12 +1557,12 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
}
@AfterEach
public void resetResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
}
@Test
@ -1694,7 +1694,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
myOldObsId = myTestDataBuilder.createObservation(List.of(
myTestDataBuilder.withObservationCode("http://example.com/", "theCodeOld"),
@ -1707,7 +1707,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@AfterEach
public void resetResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
}
@Test
@ -1810,7 +1810,7 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableResourceStorage() {
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
}
@ -1858,8 +1858,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableContainsAndLucene() {
myDaoConfig.setAllowContainsSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
}
@ -1868,8 +1868,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
public void restoreContains() {
DaoConfig defaultConfig = new DaoConfig();
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
}
@ -2253,8 +2253,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
@BeforeEach
public void enableContainsAndLucene() {
myDaoConfig.setAllowContainsSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_SUPPORTED);
}
@ -2263,8 +2263,8 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest {
public void restoreContains() {
DaoConfig defaultConfig = new DaoConfig();
myDaoConfig.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
myDaoConfig.setAdvancedLuceneIndexing(defaultConfig.isAdvancedLuceneIndexing());
myDaoConfig.setStoreResourceInLuceneIndex(defaultConfig.isStoreResourceInLuceneIndex());
myDaoConfig.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
myDaoConfig.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
myDaoConfig.getModelConfig().setNormalizedQuantitySearchLevel(
defaultConfig.getModelConfig().getNormalizedQuantitySearchLevel() );
}

View File

@ -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.bulk.export.api.IBulkDataExportJobSchedulingHelper;
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.searchparam.SearchParameterMap;
import ca.uhn.fhir.jpa.sp.ISearchParamPresenceSvc;
import ca.uhn.fhir.jpa.term.api.ITermReadSvc;
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.parser.IParser;
import ca.uhn.fhir.rest.api.EncodingEnum;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.param.StringParam;
import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.param.TokenParamModifier;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
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.IIdType;
import org.hl7.fhir.r4.model.AllergyIntolerance;
@ -61,8 +57,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.persistence.EntityManager;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.List;
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;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
@DirtiesContext
public class FhirResourceDaoR4SearchWithLuceneDisabledTest extends BaseJpaTest {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchWithLuceneDisabledTest.class);
public class FhirResourceDaoR4SearchWithHSearchDisabledTest extends BaseJpaTest {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchWithHSearchDisabledTest.class);
@Autowired
protected DaoConfig myDaoConfig;
@Autowired

View File

@ -6,7 +6,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
import ca.uhn.fhir.jpa.dao.TestDaoSearch;
import ca.uhn.fhir.jpa.searchparam.MatchUrlService;
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.storage.test.BaseDateSearchDaoTests;
import ca.uhn.fhir.storage.test.DaoTestDataBuilder;
@ -36,7 +36,7 @@ import static org.hamcrest.Matchers.not;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {
TestR4Config.class,
TestHibernateSearchAddInConfig.NoFT.class,
TestHSearchAddInConfig.NoFT.class,
DaoTestDataBuilder.Config.class,
TestDaoSearch.Config.class
})

View File

@ -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.term.api.ITermCodeSystemStorageSvc;
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.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
@ -51,7 +51,7 @@ import static org.mockito.Mockito.when;
@ExtendWith(SpringExtension.class)
@RequiresDocker
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
public class FhirResourceDaoR4TerminologyElasticsearchIT extends BaseJpaTest {
public static final String URL_MY_CODE_SYSTEM = "http://example.com/my_code_system";

View File

@ -123,7 +123,6 @@ import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@ -3647,7 +3646,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
@Test
public void testSortByString01() {
myDaoConfig.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
Patient p = new Patient();
String string = "testSortByString01";

View File

@ -676,7 +676,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
@Test
public void testReindexingSingleStringHashValueIsDeleted() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
Patient p = new Patient();
p.addName().setFamily("family1");
final IIdType id = myPatientDao.create(p, mySrd).getId().toUnqualifiedVersionless();

View File

@ -9,7 +9,7 @@ import ca.uhn.fhir.jpa.dao.TestDaoSearch;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
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.model.api.IQueryParameterType;
import ca.uhn.fhir.rest.param.ParamPrefixEnum;
@ -46,11 +46,11 @@ import javax.persistence.EntityManager;
import java.util.Collections;
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.HibernateSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_PARAM_NAME;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_SYSTEM;
import static ca.uhn.fhir.jpa.model.search.HibernateSearchIndexWriter.QTY_VALUE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.NESTED_SEARCH_PARAM_ROOT;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_CODE;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_PARAM_NAME;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_SYSTEM;
import static ca.uhn.fhir.jpa.model.search.HSearchIndexWriter.QTY_VALUE;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
/**
@ -60,12 +60,12 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
@RequiresDocker
@ContextConfiguration(classes = {
TestR4Config.class,
TestHibernateSearchAddInConfig.Elasticsearch.class,
TestHSearchAddInConfig.Elasticsearch.class,
DaoTestDataBuilder.Config.class,
TestDaoSearch.Config.class
})
@Disabled
public class HibernateSearchSandboxTest extends BaseJpaTest {
public class HSearchSandboxTest extends BaseJpaTest {
@Autowired
private EntityManager myEntityManager;
@ -104,7 +104,7 @@ public class HibernateSearchSandboxTest extends BaseJpaTest {
@BeforeEach
public void enableContainsAndLucene() {
myDaoConfig.setAllowContainsSearches(true);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
}

View File

@ -104,7 +104,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
@BeforeEach
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
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
ourLog.info("Running with Timezone {}", TimeZone.getDefault().getID());

View File

@ -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.ObservationJson;
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.rest.param.ReferenceAndListParam;
import ca.uhn.fhir.rest.param.ReferenceOrListParam;
@ -63,7 +63,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@ExtendWith(SpringExtension.class)
@RequiresDocker
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class PersistObservationIndexedSearchParamLastNR4IT {

View File

@ -26,7 +26,7 @@ public class SearchWithInterceptorR4Test extends BaseJpaR4Test {
@Test
public void testRawSql_Search() {
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
IAnonymousInterceptor interceptor = (pointcut, params) -> {
RequestDetails requestDetails = params.get(RequestDetails.class);

View File

@ -8,7 +8,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
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.util.StopWatch;
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;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
@DirtiesContext
public class SyntheaPerfTest extends BaseJpaTest {

View File

@ -2,13 +2,11 @@ package ca.uhn.fhir.jpa.dao.r5;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
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.param.HasAndListParam;
import ca.uhn.fhir.rest.param.HasOrListParam;
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.Patient;
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.springframework.test.context.ContextConfiguration;
import java.util.Collections;
import java.util.Date;
import java.util.stream.Collectors;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.NoFT.class)
@ContextConfiguration(classes = TestHSearchAddInConfig.NoFT.class)
@SuppressWarnings({"Duplicates"})
public class FhirResourceDaoR5SearchNoFtTest extends BaseJpaR5Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR5SearchNoFtTest.class);

View File

@ -10,15 +10,15 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
class ExtendedLuceneResourceProjectionTest {
class ExtendedHSearchResourceProjectionTest {
final FhirContext myFhirContext = FhirContext.forR4();
final IParser myParser = myFhirContext.newJsonParser();
ExtendedLuceneResourceProjection myProjection;
ExtendedHSearchResourceProjection myProjection;
IBaseResource myResource;
@Test
public void basicBodyReceivesId() {
myProjection = new ExtendedLuceneResourceProjection(22, null, "{ \"resourceType\":\"Observation\"}");
myProjection = new ExtendedHSearchResourceProjection(22, null, "{ \"resourceType\":\"Observation\"}");
myResource = myProjection.toResource(myParser);
@ -28,7 +28,7 @@ class ExtendedLuceneResourceProjectionTest {
@Test
public void forcedIdOverridesPid() {
myProjection = new ExtendedLuceneResourceProjection(22, "force-id", "{ \"resourceType\":\"Observation\"}");
myProjection = new ExtendedHSearchResourceProjection(22, "force-id", "{ \"resourceType\":\"Observation\"}");
myResource = myProjection.toResource(myParser);

View File

@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public class TerminologyFreetextIndexingProviderTest {
public class TerminologyHSearchIndexingProviderTest {
private final FhirContext myContext = FhirContext.forR4();

View File

@ -54,7 +54,7 @@ public class MultitenantBatchOperationR4Test extends BaseMultitenantResourceProv
@BeforeEach
public void disableAdvanceIndexing() {
// advanced indexing doesn't support partitions
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
}

View File

@ -2,7 +2,7 @@ package ca.uhn.fhir.jpa.provider.r4;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
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.test.utilities.docker.RequiresDocker;
import org.apache.commons.io.IOUtils;
@ -49,7 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@ExtendWith(SpringExtension.class)
@RequiresDocker
@ContextConfiguration(classes = TestHibernateSearchAddInConfig.Elasticsearch.class)
@ContextConfiguration(classes = TestHSearchAddInConfig.Elasticsearch.class)
public class ResourceProviderR4ElasticTest extends BaseResourceProviderR4Test {
private static final Logger ourLog = LoggerFactory.getLogger(ResourceProviderR4ElasticTest.class);
@ -61,15 +61,15 @@ public class ResourceProviderR4ElasticTest extends BaseResourceProviderR4Test {
@BeforeEach
public void beforeEach() {
myDaoConfig.setLastNEnabled(true);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setStoreResourceInLuceneIndex(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
myDaoConfig.setStoreResourceInHSearchIndex(true);
}
@AfterEach
public void afterEach() {
myDaoConfig.setLastNEnabled(new DaoConfig().isLastNEnabled());
myDaoConfig.setAdvancedLuceneIndexing(new DaoConfig().isAdvancedLuceneIndexing());
myDaoConfig.setStoreResourceInLuceneIndex(new DaoConfig().isStoreResourceInLuceneIndex());
myDaoConfig.setAdvancedHSearchIndexing(new DaoConfig().isAdvancedHSearchIndexing());
myDaoConfig.setStoreResourceInHSearchIndex(new DaoConfig().isStoreResourceInHSearchIndex());
}

View File

@ -7,7 +7,7 @@ import ca.uhn.fhir.jpa.provider.ValueSetOperationProvider;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.jpa.subscription.match.config.WebsocketDispatcherConfig;
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.parser.StrictErrorHandler;
import ca.uhn.fhir.rest.api.EncodingEnum;
@ -53,11 +53,11 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
@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 String ourServerBase;

View File

@ -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.sp.ISearchParamPresenceSvc;
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.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
@ -52,7 +52,7 @@ import static org.hamcrest.Matchers.not;
@RequiresDocker
@ContextConfiguration(classes = {
TestR4Config.class,
TestHibernateSearchAddInConfig.Elasticsearch.class,
TestHSearchAddInConfig.Elasticsearch.class,
DaoTestDataBuilder.Config.class
})
public class TokenAutocompleteElasticsearchIT extends BaseJpaTest {
@ -94,7 +94,7 @@ public class TokenAutocompleteElasticsearchIT extends BaseJpaTest {
@BeforeEach
public void beforePurgeDatabase() {
purgeDatabase(myDaoConfig, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataScheduleHelper);
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
}
@Override

View File

@ -39,7 +39,7 @@ class ValueSetAutocompleteOptionsTest {
final private DaoConfig myDaoConfig = new DaoConfig();
{
myDaoConfig.setAdvancedLuceneIndexing(true);
myDaoConfig.setAdvancedHSearchIndexing(true);
}
@Test
@ -170,7 +170,7 @@ class ValueSetAutocompleteOptionsTest {
@Test
public void whenAdvancedIndexingOff() {
// given
myDaoConfig.setAdvancedLuceneIndexing(false);
myDaoConfig.setAdvancedHSearchIndexing(false);
assertParseThrowsInvalidRequestWithErrorCode(ERROR_REQUIRES_EXTENDED_INDEXING);
}

View File

@ -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.model.CanonicalSubscription;
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.model.api.TemporalPrecisionEnum;
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;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.NoFT.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.NoFT.class})
public class InMemorySubscriptionMatcherR4Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(InMemorySubscriptionMatcherR4Test.class);

View File

@ -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.ITermReadSvcR4;
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.rest.api.server.storage.ResourcePersistentId;
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.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Answers;
import org.mockito.Mock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
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.ReflectionTestUtils;
import org.springframework.transaction.PlatformTransactionManager;
@ -87,10 +92,10 @@ import static org.mockito.Mockito.when;
* and remove the abstract qualifier
*/
//@ExtendWith(SpringExtension.class)
//@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
//@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
public abstract class AbstractValueSetFreeTextExpansionR4Test extends BaseJpaTest {
private static final Logger ourLog = LoggerFactory.getLogger(AbstractValueSetFreeTextExpansionR4Test.class);
//@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
//@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
public abstract class AbstractValueSetHSearchExpansionR4Test extends BaseJpaTest {
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_2 = "http://example.com/my_code_system2";

View File

@ -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.svc.ISearchCoordinatorSvc;
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.BaseJpaTest;
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
@ -56,7 +56,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
@RequiresDocker
public class ValueSetExpansionR4ElasticsearchIT extends BaseJpaTest {

View File

@ -1,6 +1,6 @@
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 org.junit.jupiter.api.extension.ExtendWith;
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
*/
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.Elasticsearch.class})
public class ValueSetFreeTextExpansionR4ElasticIT extends AbstractValueSetFreeTextExpansionR4Test {
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.Elasticsearch.class})
public class ValueSetHSearchExpansionR4ElasticIT extends AbstractValueSetHSearchExpansionR4Test {
}

View File

@ -1,6 +1,6 @@
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 org.junit.jupiter.api.extension.ExtendWith;
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
*/
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {TestR4Config.class, TestHibernateSearchAddInConfig.DefaultLuceneHeap.class})
public class ValueSetFreeTextExpansionR4LuceneIT extends AbstractValueSetFreeTextExpansionR4Test {
@ContextConfiguration(classes = {TestR4Config.class, TestHSearchAddInConfig.DefaultLuceneHeap.class})
public class ValueSetHSearchExpansionR4LuceneIT extends AbstractValueSetHSearchExpansionR4Test {
}

Some files were not shown because too many files have changed in this diff Show More