diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 1d11db11e80..68c007a1290 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 8d4dac888ef..208819cb36f 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 43df2e2b214..170b1eab71f 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties
index def641589f0..6e6a62f1b0e 100644
--- a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties
+++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/i18n/hapi-messages.properties
@@ -163,6 +163,7 @@ ca.uhn.fhir.jpa.term.TermConceptMappingSvcImpl.matchesFound=Matches found
ca.uhn.fhir.jpa.term.TermConceptMappingSvcImpl.noMatchesFound=No Matches found
ca.uhn.fhir.jpa.term.TermConceptMappingSvcImpl.onlyNegativeMatchesFound=Only negative matches found
+ca.uhn.fhir.jpa.dao.FulltextSearchSvcImpl.fullTextSearchingNotPossible=Fulltext searching is not enabled on this server, can not support the parameter(s): {0}
ca.uhn.fhir.jpa.dao.JpaResourceDaoSearchParameter.invalidSearchParamExpression=The expression "{0}" can not be evaluated and may be invalid: {1}
ca.uhn.fhir.jpa.search.builder.QueryStack.textModifierDisabledForSearchParam=The :text modifier is disabled for this search parameter
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 1eb93287a5e..bd23f65175d 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -4,7 +4,7 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
pom
HAPI FHIR BOM
@@ -12,7 +12,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index a3e43a48a50..3cb89480f52 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index fab897561a8..4f5afc89046 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 99309197db0..edfcdbe5148 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index 9eb4b10c00a..6216c8253cc 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-apache-http5/pom.xml b/hapi-fhir-client-apache-http5/pom.xml
index f38adc3014b..202e46281ae 100644
--- a/hapi-fhir-client-apache-http5/pom.xml
+++ b/hapi-fhir-client-apache-http5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index 88edde5fc22..8c2cbc9adaf 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index 5d7c72e9da9..a43eb2ee48a 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index 380ff4df5f6..ac8c1c1edf6 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index c2aac03bba4..b5a5c1fc195 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index d3be55b7927..28f8b998f16 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/6426-allow-disabling-fulltext.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/6426-allow-disabling-fulltext.yaml
new file mode 100644
index 00000000000..f670d8bcf0d
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/6426-allow-disabling-fulltext.yaml
@@ -0,0 +1,11 @@
+---
+type: add
+issue: 6426
+title: "Previously, it was not possible to enable Hibernate Search but not use it
+ for fulltext indexing. This meant that you could not enable HS-based terminology
+ services without also enabling fulltext indexing of all resources. A new setting
+ has been added to the JpaStorageSettings bean
+ called `HibernateSearchIndexFullText` which controls whether HS will be used for
+ fulltext indexing. The existing property `AdvancedHSearchIndexing` has also been
+ deprecated and a new equivalent (but better named) property
+ called `HibernateSearchIndexSearchParams`."
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
index fd1d5d2cd55..d232f171908 100644
--- a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_8_0/changes.yaml
@@ -5,6 +5,7 @@
(dependent HAPI modules listed in brackets):
- org.hl7.fhir.core (Base): 6.3.25 -> 6.4.0
+ - H2 (JPA): 2.2.224 -> 2.3.232
- spring-boot-bom (Base): 3.2.6 -> 3.3.5
- spring-retry (Base): 2.0.6 -> 2.0.10
- spring-data-bom (Base): 2023.1.6 -> 2024.0.5
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 278d5dcbc31..074ff916f45 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 2767d9f7c6a..c71f3483f8a 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index 07e09a9d734..5a985463b9f 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index 968dccbd64b..06277ace97a 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
index 396eee7275b..9c3c1872bcd 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
@@ -56,6 +56,7 @@ import ca.uhn.fhir.jpa.model.cross.IResourceLookup;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.model.entity.BaseHasResource;
import ca.uhn.fhir.jpa.model.entity.BaseTag;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
import ca.uhn.fhir.jpa.model.entity.ResourceLink;
@@ -161,8 +162,6 @@ import static org.apache.commons.lang3.StringUtils.trim;
public abstract class BaseHapiFhirDao extends BaseStorageResourceDao
implements IDao, IJpaDao, ApplicationContextAware {
- public static final long INDEX_STATUS_INDEXED = 1L;
- public static final long INDEX_STATUS_INDEXING_FAILED = 2L;
public static final String NS_JPA_PROFILE = "https://github.com/hapifhir/hapi-fhir/ns/jpa/profile";
private static final Logger ourLog = LoggerFactory.getLogger(BaseHapiFhirDao.class);
private static boolean ourValidationDisabledForUnitTest;
@@ -907,7 +906,7 @@ public abstract class BaseHapiFhirDao extends BaseStora
entity.setUpdated(theDeletedTimestampOrNull);
entity.setNarrativeText(null);
entity.setContentText(null);
- entity.setIndexStatus(INDEX_STATUS_INDEXED);
+ entity.setIndexStatus(getEntityIndexedStatusEnum());
changed = populateResourceIntoEntity(theTransactionDetails, theRequest, theResource, entity, true);
} else {
@@ -981,7 +980,7 @@ public abstract class BaseHapiFhirDao extends BaseStora
entity.setUpdated(theTransactionDetails.getTransactionDate());
}
newParams.populateResourceTableSearchParamsPresentFlags(entity);
- entity.setIndexStatus(INDEX_STATUS_INDEXED);
+ entity.setIndexStatus(getEntityIndexedStatusEnum());
}
if (myFulltextSearchSvc != null && !myFulltextSearchSvc.isDisabled()) {
@@ -1122,6 +1121,22 @@ public abstract class BaseHapiFhirDao extends BaseStora
return entity;
}
+ /**
+ * This methor returns the {@link EntityIndexStatusEnum} value that should be
+ * used for a successfully fully indexed resource. This method will return
+ * {@link EntityIndexStatusEnum#INDEXED_ALL} or {@link EntityIndexStatusEnum#INDEXED_RDBMS_ONLY}
+ * depending on configuration.
+ */
+ @Nonnull
+ private EntityIndexStatusEnum getEntityIndexedStatusEnum() {
+ if (myStorageSettings.isHibernateSearchIndexFullText()
+ || myStorageSettings.isHibernateSearchIndexSearchParams()) {
+ return EntityIndexStatusEnum.INDEXED_ALL;
+ } else {
+ return EntityIndexStatusEnum.INDEXED_RDBMS_ONLY;
+ }
+ }
+
/**
* Make sure that the match URL was actually appropriate for the supplied
* resource, if so configured, or do it only for first version, since technically it
@@ -1666,9 +1681,11 @@ public abstract class BaseHapiFhirDao extends BaseStora
theEntity.setNarrativeText(null);
theEntity.setContentText(null);
} else {
- theEntity.setNarrativeText(parseNarrativeTextIntoWords(theResource));
- theEntity.setContentText(parseContentTextIntoWords(theContext, theResource));
- if (myStorageSettings.isAdvancedHSearchIndexing()) {
+ if (myStorageSettings.isHibernateSearchIndexFullText()) {
+ theEntity.setNarrativeText(parseNarrativeTextIntoWords(theResource));
+ theEntity.setContentText(parseContentTextIntoWords(theContext, theResource));
+ }
+ if (myStorageSettings.isHibernateSearchIndexSearchParams()) {
ExtendedHSearchIndexData hSearchIndexData =
myFulltextSearchSvc.extractLuceneIndexData(theResource, theEntity, theNewParams);
theEntity.setLuceneIndexData(hSearchIndexData);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
index 7457467562d..67855bcad01 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java
@@ -51,6 +51,7 @@ import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.model.entity.BaseHasResource;
import ca.uhn.fhir.jpa.model.entity.BaseTag;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.PartitionablePartitionId;
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryProvenanceEntity;
@@ -1670,7 +1671,7 @@ public abstract class BaseHapiFhirResourceDao extends B
} catch (Exception e) {
ourLog.warn("Failure during reindex: {}", e.toString());
theReindexOutcome.addWarning("Failed to reindex resource " + entity.getIdDt() + ": " + e);
- myResourceTableDao.updateIndexStatus(entity.getId(), INDEX_STATUS_INDEXING_FAILED);
+ myResourceTableDao.updateIndexStatus(entity.getId(), EntityIndexStatusEnum.INDEXING_FAILED);
}
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java
index 2493e97e4ec..225dc32612c 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java
@@ -51,6 +51,7 @@ import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
+import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
@@ -264,6 +265,20 @@ public class FulltextSearchSvcImpl implements IFulltextSearchSvc {
String theResourceType,
SearchParameterMap theParams,
IResourcePersistentId theReferencingPid) {
+
+ if (theParams.containsKey(Constants.PARAM_TEXT) || theParams.containsKey(Constants.PARAM_CONTENT)) {
+ if (!myStorageSettings.isHibernateSearchIndexFullText()) {
+ String params = theParams.keySet().stream()
+ .filter(t -> t.equals(Constants.PARAM_TEXT) || t.equals(Constants.PARAM_CONTENT))
+ .sorted()
+ .collect(Collectors.joining(", "));
+ String msg = myFhirContext
+ .getLocalizer()
+ .getMessage(FulltextSearchSvcImpl.class, "fullTextSearchingNotPossible", params);
+ throw new InvalidRequestException(Msg.code(2566) + msg);
+ }
+ }
+
return f.bool(b -> {
ExtendedHSearchClauseBuilder builder =
new ExtendedHSearchClauseBuilder(myFhirContext, myStorageSettings, b, f);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java
index a081668cdae..cd599b947b6 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/data/IResourceTableDao.java
@@ -20,6 +20,7 @@
package ca.uhn.fhir.jpa.dao.data;
import ca.uhn.fhir.jpa.dao.data.custom.IForcedIdQueries;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
@@ -121,7 +122,7 @@ public interface IResourceTableDao
@Modifying
@Query("UPDATE ResourceTable t SET t.myIndexStatus = :status WHERE t.myId = :id")
- void updateIndexStatus(@Param("id") Long theId, @Param("status") Long theIndexStatus);
+ void updateIndexStatus(@Param("id") Long theId, @Param("status") EntityIndexStatusEnum theIndexStatus);
@Modifying
@Query("UPDATE ResourceTable t SET t.myUpdated = :updated WHERE t.myId = :id")
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java
index 5f056979fea..1a4f8af2ce0 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/TermConcept.java
@@ -19,15 +19,16 @@
*/
package ca.uhn.fhir.jpa.entity;
-import ca.uhn.fhir.context.support.IValidationSupport;
-import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink.RelationshipTypeEnum;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.search.DeferConceptIndexingRoutingBinder;
import ca.uhn.fhir.util.ValidateUtil;
import com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.Nonnull;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
+import jakarta.persistence.EnumType;
+import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.GeneratedValue;
@@ -52,6 +53,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.Length;
+import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.search.engine.backend.types.Projectable;
import org.hibernate.search.engine.backend.types.Searchable;
import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.PropertyBinderRef;
@@ -60,6 +62,7 @@ import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextFi
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding;
+import org.hibernate.type.SqlTypes;
import org.hl7.fhir.r4.model.Coding;
import java.io.Serializable;
@@ -168,8 +171,13 @@ public class TermConcept implements Serializable {
@GenericField
private Long myId;
+ /**
+ * See {@link EntityIndexStatusEnum} for values
+ */
@Column(name = "INDEX_STATUS", nullable = true)
- private Long myIndexStatus;
+ @Enumerated(EnumType.ORDINAL)
+ @JdbcTypeCode(SqlTypes.TINYINT)
+ private EntityIndexStatusEnum myIndexStatus;
@Deprecated(since = "7.2.0")
@Lob
@@ -360,11 +368,11 @@ public class TermConcept implements Serializable {
return this;
}
- public Long getIndexStatus() {
+ public EntityIndexStatusEnum getIndexStatus() {
return myIndexStatus;
}
- public TermConcept setIndexStatus(Long theIndexStatus) {
+ public TermConcept setIndexStatus(EntityIndexStatusEnum theIndexStatus) {
myIndexStatus = theIndexStatus;
return this;
}
@@ -499,24 +507,6 @@ public class TermConcept implements Serializable {
return b.build();
}
- public List toValidationProperties() {
- List retVal = new ArrayList<>();
- for (TermConceptProperty next : getProperties()) {
- switch (next.getType()) {
- case STRING:
- retVal.add(new IValidationSupport.StringConceptProperty(next.getKey(), next.getValue()));
- break;
- case CODING:
- retVal.add(new IValidationSupport.CodingConceptProperty(
- next.getKey(), next.getCodeSystem(), next.getValue(), next.getDisplay()));
- break;
- default:
- throw new IllegalStateException(Msg.code(830) + "Don't know how to handle " + next.getType());
- }
- }
- return retVal;
- }
-
/**
* Returns a view of {@link #getChildren()} but containing the actual child codes
*/
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
index 1fe997f35c3..a8ad93a4cab 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
@@ -153,6 +153,19 @@ public class HapiFhirJpaMigrationTasks extends BaseMigrationTasks {
.modifyColumn("20241023.50", "PACKAGE_DESC")
.nullable()
.withType(ColumnTypeEnum.STRING, 512);
+
+ // This will require a full table scan just to reduce a field size,
+ // so don't run it by default
+ version.onTable("HFJ_RESOURCE")
+ .modifyColumn("20241030.10", "SP_INDEX_STATUS")
+ .nullable()
+ .withType(ColumnTypeEnum.TINYINT)
+ .heavyweightSkipByDefault();
+ version.onTable("TRM_CONCEPT")
+ .modifyColumn("20241030.20", "INDEX_STATUS")
+ .nullable()
+ .withType(ColumnTypeEnum.TINYINT)
+ .heavyweightSkipByDefault();
}
/**
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
index 6bf97cbcfd8..40b94bed03d 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImpl.java
@@ -23,11 +23,11 @@ import ca.uhn.fhir.batch2.model.JobInstanceStartRequest;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
-import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.dao.data.IResourceReindexJobDao;
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
import ca.uhn.fhir.jpa.entity.ResourceReindexJobEntity;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.sched.HapiJob;
import ca.uhn.fhir.jpa.model.sched.IHasScheduledJobs;
@@ -432,7 +432,7 @@ public class ResourceReindexingSvcImpl implements IResourceReindexingSvc, IHasSc
txTemplate.execute((TransactionCallback) theStatus -> {
ourLog.info("Marking resource with PID {} as indexing_failed", theId);
- myResourceTableDao.updateIndexStatus(theId.getId(), BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED);
+ myResourceTableDao.updateIndexStatus(theId.getId(), EntityIndexStatusEnum.INDEXING_FAILED);
Query q = myEntityManager.createQuery("DELETE FROM ResourceTag t WHERE t.myResource.myId = :id");
q.setParameter("id", theId.getId());
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java
index f1024fac50a..07f708d5a9a 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermCodeSystemStorageSvcImpl.java
@@ -26,7 +26,6 @@ import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
import ca.uhn.fhir.jpa.api.svc.ResolveIdentityMode;
-import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemVersionDao;
@@ -41,6 +40,7 @@ import ca.uhn.fhir.jpa.entity.TermConceptDesignation;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink;
import ca.uhn.fhir.jpa.entity.TermConceptProperty;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.term.api.ITermCodeSystemStorageSvc;
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
@@ -680,7 +680,7 @@ public class TermCodeSystemStorageSvcImpl implements ITermCodeSystemStorageSvc {
}
theConcept.setCodeSystemVersion(theCodeSystem);
- theConcept.setIndexStatus(BaseHapiFhirDao.INDEX_STATUS_INDEXED);
+ theConcept.setIndexStatus(EntityIndexStatusEnum.INDEXED_ALL);
if (theConceptsStack.size() <= myStorageSettings.getDeferIndexingForCodesystemsOfSize()) {
saveConcept(theConcept);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermConceptDaoSvc.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermConceptDaoSvc.java
index 1927de43500..60a7e836af2 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermConceptDaoSvc.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermConceptDaoSvc.java
@@ -19,7 +19,6 @@
*/
package ca.uhn.fhir.jpa.term;
-import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptDesignationDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptPropertyDao;
@@ -27,6 +26,7 @@ import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.entity.TermConceptDesignation;
import ca.uhn.fhir.jpa.entity.TermConceptParentChildLink;
import ca.uhn.fhir.jpa.entity.TermConceptProperty;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -70,7 +70,7 @@ public class TermConceptDaoSvc {
if (theConcept.getId() == null || theConcept.getIndexStatus() == null) {
retVal++;
- theConcept.setIndexStatus(BaseHapiFhirDao.INDEX_STATUS_INDEXED);
+ theConcept.setIndexStatus(EntityIndexStatusEnum.INDEXED_ALL);
theConcept.setUpdated(new Date());
theConcept.flagForLegacyLobSupport(mySupportLegacyLob);
myConceptDao.save(theConcept);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
index 457fe4ff3e5..25dd7fadd88 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermReadSvcImpl.java
@@ -43,8 +43,6 @@ import ca.uhn.fhir.jpa.dao.IJpaStorageResourceParser;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemDao;
import ca.uhn.fhir.jpa.dao.data.ITermCodeSystemVersionDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptDao;
-import ca.uhn.fhir.jpa.dao.data.ITermConceptDesignationDao;
-import ca.uhn.fhir.jpa.dao.data.ITermConceptPropertyDao;
import ca.uhn.fhir.jpa.dao.data.ITermValueSetConceptDao;
import ca.uhn.fhir.jpa.dao.data.ITermValueSetConceptDesignationDao;
import ca.uhn.fhir.jpa.dao.data.ITermValueSetConceptViewDao;
@@ -218,12 +216,6 @@ public class TermReadSvcImpl implements ITermReadSvc, IHasScheduledJobs {
@Autowired
protected ITermConceptDao myConceptDao;
- @Autowired
- protected ITermConceptPropertyDao myConceptPropertyDao;
-
- @Autowired
- protected ITermConceptDesignationDao myConceptDesignationDao;
-
@Autowired
protected ITermValueSetDao myTermValueSetDao;
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
index 92e9ef0a472..3e9d9ca7636 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java b/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
index 957a4b2702a..3d37c1f3f6c 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
@@ -28,6 +28,7 @@ import ca.uhn.fhir.jpa.search.BaseSourceSearchParameterTestCases;
import ca.uhn.fhir.jpa.search.CompositeSearchParameterTestCases;
import ca.uhn.fhir.jpa.search.QuantitySearchParameterTestCases;
import ca.uhn.fhir.jpa.search.builder.SearchBuilder;
+import ca.uhn.fhir.jpa.search.lastn.ElasticsearchRestClientFactory;
import ca.uhn.fhir.jpa.search.lastn.ElasticsearchSvcImpl;
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@@ -61,6 +62,9 @@ import ca.uhn.fhir.validation.ValidationResult;
import ca.uhn.test.util.LogbackTestExtension;
import ca.uhn.test.util.LogbackTestExtensionAssert;
import ch.qos.logback.classic.Level;
+import co.elastic.clients.elasticsearch.ElasticsearchClient;
+import co.elastic.clients.elasticsearch.cat.IndicesResponse;
+import co.elastic.clients.elasticsearch.cat.count.CountRecord;
import jakarta.annotation.Nonnull;
import jakarta.persistence.EntityManager;
import org.apache.commons.lang3.RandomStringUtils;
@@ -97,6 +101,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
import org.junit.jupiter.params.provider.EnumSource;
import org.mockito.Mock;
import org.mockito.Mockito;
@@ -268,18 +273,10 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
@BeforeEach
public void enableContainsAndLucene() {
myStorageSettings.setAllowContainsSearches(true);
- myStorageSettings.setAdvancedHSearchIndexing(true);
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ myStorageSettings.setHibernateSearchIndexSearchParams(true);
}
- @AfterEach
- public void restoreContains() {
- JpaStorageSettings defaultConfig = new JpaStorageSettings();
- myStorageSettings.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
- myStorageSettings.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
- myStorageSettings.setStoreResourceInHSearchIndex(defaultConfig.isStoreResourceInHSearchIndex());
- }
-
-
class ElasticPerformanceTracingInterceptor {
private final List messages = new ArrayList<>();
@@ -309,6 +306,36 @@ public class FhirResourceDaoR4SearchWithElasticSearchIT extends BaseJpaTest impl
assertThat(originalLastUpdated).isEqualTo(newLastUpdated);
}
+ @ParameterizedTest
+ @CsvSource(value = {
+ "false, false",
+ "false, true",
+ "true, false",
+ "true, true",
+ })
+ public void testIndexingEnabledAndDisabled(boolean theHibernateSearchIndexFullText, boolean theHibernateSearchIndexSearchParams) throws IOException {
+ // Setup
+ myStorageSettings.setHibernateSearchIndexFullText(theHibernateSearchIndexFullText);
+ myStorageSettings.setHibernateSearchIndexSearchParams(theHibernateSearchIndexSearchParams);
+
+ ElasticsearchClient elasticsearchHighLevelRestClient = ElasticsearchRestClientFactory.createElasticsearchHighLevelRestClient(
+ "http", myElasticsearchContainer.getHost() + ":" + myElasticsearchContainer.getMappedPort(9200), "", "");
+ int initialCount = elasticsearchHighLevelRestClient.cat().count().valueBody().stream().mapToInt(next -> Integer.parseInt(next.count())).sum();
+
+ // Test
+ createPatient(withFamily("SIMPSON"));
+
+ // Verify
+ int newCount = elasticsearchHighLevelRestClient.cat().count().valueBody().stream().mapToInt(next -> Integer.parseInt(next.count())).sum();
+ int added = newCount - initialCount;
+ if (theHibernateSearchIndexFullText || theHibernateSearchIndexSearchParams) {
+ assertEquals(1, added);
+ } else {
+ assertEquals(0, added);
+ }
+ }
+
+
@Test
public void testFullTextSearchesArePerformanceLogged() {
diff --git a/hapi-fhir-jpaserver-hfql/pom.xml b/hapi-fhir-jpaserver-hfql/pom.xml
index 6b218c55977..03020c749fe 100644
--- a/hapi-fhir-jpaserver-hfql/pom.xml
+++ b/hapi-fhir-jpaserver-hfql/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-ips/pom.xml b/hapi-fhir-jpaserver-ips/pom.xml
index d5fc4b533e7..91a9cecbd61 100644
--- a/hapi-fhir-jpaserver-ips/pom.xml
+++ b/hapi-fhir-jpaserver-ips/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index fd9d80a4093..a67c25f9418 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 803de6c2647..a608bec5e66 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/EntityIndexStatusEnum.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/EntityIndexStatusEnum.java
new file mode 100644
index 00000000000..524d66c372f
--- /dev/null
+++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/EntityIndexStatusEnum.java
@@ -0,0 +1,18 @@
+package ca.uhn.fhir.jpa.model.entity;
+
+public enum EntityIndexStatusEnum {
+ /**
+ * Only indexed in the relational database
+ */
+ INDEXED_RDBMS_ONLY,
+
+ /**
+ * Indexed in relational and fulltext databases
+ */
+ INDEXED_ALL,
+
+ /**
+ * Indexing failed - This should only happen if a resource is being reindexed and the reindexing fails
+ */
+ INDEXING_FAILED;
+}
diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java
index 41258153ee1..bdb2135df93 100644
--- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java
+++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java
@@ -31,6 +31,8 @@ import com.google.common.annotations.VisibleForTesting;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
+import jakarta.persistence.EnumType;
+import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
@@ -51,6 +53,7 @@ import org.hibernate.Session;
import org.hibernate.annotations.GenerationTime;
import org.hibernate.annotations.GeneratorType;
import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.JdbcTypeCode;
import org.hibernate.annotations.OptimisticLock;
import org.hibernate.search.engine.backend.types.Projectable;
import org.hibernate.search.engine.backend.types.Searchable;
@@ -64,6 +67,7 @@ import org.hibernate.search.mapper.pojo.mapping.definition.annotation.ObjectPath
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding;
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyValue;
import org.hibernate.tuple.ValueGenerator;
+import org.hibernate.type.SqlTypes;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.r4.model.InstantType;
@@ -139,8 +143,10 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
private Long myId;
@Column(name = "SP_INDEX_STATUS", nullable = true)
+ @Enumerated(EnumType.ORDINAL)
+ @JdbcTypeCode(SqlTypes.TINYINT)
@OptimisticLock(excluded = true)
- private Long myIndexStatus;
+ private EntityIndexStatusEnum myIndexStatus;
// TODO: Removed in 5.5.0. Drop in a future release.
@Column(name = "RES_LANGUAGE", length = MAX_LANGUAGE_LENGTH, nullable = true)
@@ -461,11 +467,11 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas
myId = theId;
}
- public Long getIndexStatus() {
+ public EntityIndexStatusEnum getIndexStatus() {
return myIndexStatus;
}
- public void setIndexStatus(Long theIndexStatus) {
+ public void setIndexStatus(EntityIndexStatusEnum theIndexStatus) {
myIndexStatus = theIndexStatus;
}
diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ResourceTableRoutingBinder.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ResourceTableRoutingBinder.java
index b8da8e4a269..614b7a30f8a 100644
--- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ResourceTableRoutingBinder.java
+++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ResourceTableRoutingBinder.java
@@ -19,6 +19,7 @@
*/
package ca.uhn.fhir.jpa.model.search;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import org.hibernate.search.mapper.pojo.bridge.RoutingBridge;
import org.hibernate.search.mapper.pojo.bridge.binding.RoutingBindingContext;
@@ -41,7 +42,8 @@ public class ResourceTableRoutingBinder implements RoutingBinder {
Object theO,
ResourceTable theResourceTable,
RoutingBridgeRouteContext theRoutingBridgeRouteContext) {
- if (theResourceTable.getDeleted() == null && theResourceTable.getIndexStatus() != null) {
+ if (theResourceTable.getDeleted() == null
+ && theResourceTable.getIndexStatus() == EntityIndexStatusEnum.INDEXED_ALL) {
theDocumentRoutes.addRoute();
} else {
theDocumentRoutes.notIndexed();
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index ae660effed3..bdea0519f95 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index 8786b761128..c1286d1be8c 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml
index 012fcebea85..aea7d456937 100644
--- a/hapi-fhir-jpaserver-test-dstu2/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
index 573225d62cb..e5f2ea3e09c 100644
--- a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
+++ b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
@@ -27,8 +27,11 @@ public class FhirResourceDaoDstu2SearchFtTest extends BaseJpaDstu2Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu2SearchFtTest.class);
+ @Override
@BeforeEach
- public void beforeDisableResultReuse() {
+ public void before() throws Exception {
+ super.before();
+ myStorageSettings.setHibernateSearchIndexFullText(true);
myStorageSettings.setReuseCachedSearchResultsForMillis(null);
}
diff --git a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSearchDaoDstu2Test.java b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSearchDaoDstu2Test.java
index 2430b8b71f0..5909d1c1750 100644
--- a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSearchDaoDstu2Test.java
+++ b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSearchDaoDstu2Test.java
@@ -10,6 +10,7 @@ import ca.uhn.fhir.rest.api.server.SystemRequestDetails;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +23,14 @@ public class FhirSearchDaoDstu2Test extends BaseJpaDstu2Test {
@Autowired
private IFulltextSearchSvc mySearchDao;
+ @Override
+ @BeforeEach
+ public void before() throws Exception {
+ super.before();
+
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ }
+
@Test
public void testContentSearch() {
Long id1;
diff --git a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java
index 69d51f118bb..97654a3dc39 100644
--- a/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java
+++ b/hapi-fhir-jpaserver-test-dstu2/src/test/java/ca/uhn/fhir/jpa/provider/ResourceProviderDstu2Test.java
@@ -1014,6 +1014,8 @@ public class ResourceProviderDstu2Test extends BaseResourceProviderDstu2Test {
@Test
public void testEverythingInstanceWithContentFilter() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Patient pt1 = new Patient();
pt1.addName().addFamily("Everything").addGiven("Arthur");
IIdType ptId1 = myPatientDao.create(pt1, mySrd).getId().toUnqualifiedVersionless();
diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml
index 32c32ebb399..12a19d9ebf4 100644
--- a/hapi-fhir-jpaserver-test-dstu3/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
index 38dce826530..64afb62925a 100644
--- a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
+++ b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
@@ -34,8 +34,12 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoDstu3SearchFtTest.class);
+ @Override
@BeforeEach
- public void beforeDisableResultReuse() {
+ public void before() throws Exception {
+ super.before();
+
+ myStorageSettings.setHibernateSearchIndexFullText(true);
myStorageSettings.setReuseCachedSearchResultsForMillis(null);
}
diff --git a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSearchDaoDstu3Test.java b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSearchDaoDstu3Test.java
index 957b3ffb024..19372903d3a 100644
--- a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSearchDaoDstu3Test.java
+++ b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSearchDaoDstu3Test.java
@@ -11,6 +11,7 @@ import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
import org.hl7.fhir.dstu3.model.Organization;
import org.hl7.fhir.dstu3.model.Patient;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -22,7 +23,15 @@ public class FhirSearchDaoDstu3Test extends BaseJpaDstu3Test {
@Autowired
private IFulltextSearchSvc mySearchDao;
-
+
+ @Override
+ @BeforeEach
+ public void before() throws Exception {
+ super.before();
+
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ }
+
@Test
public void testContentSearch() {
Long id1;
diff --git a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderCustomSearchParamDstu3Test.java b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderCustomSearchParamDstu3Test.java
index 6e1511543c8..9e0491aca97 100644
--- a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderCustomSearchParamDstu3Test.java
+++ b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderCustomSearchParamDstu3Test.java
@@ -4,6 +4,7 @@ import ca.uhn.fhir.batch2.jobs.reindex.ReindexJobParameters;
import ca.uhn.fhir.batch2.model.JobInstance;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.entity.StorageSettings;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@@ -186,9 +187,9 @@ public class ResourceProviderCustomSearchParamDstu3Test extends BaseResourceProv
IIdType obsId = myObservationDao.create(obs2, mySrd).getId().toUnqualifiedVersionless();
ResourceTable res = myResourceTableDao.findById(patId.getIdPartAsLong()).orElseThrow(IllegalStateException::new);
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, res.getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, res.getIndexStatus());
res = myResourceTableDao.findById(obsId.getIdPartAsLong()).orElseThrow(IllegalStateException::new);
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, res.getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, res.getIndexStatus());
SearchParameter fooSp = new SearchParameter();
fooSp.addBase("Patient");
diff --git a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
index debff2e7be5..cdb13a8c33b 100644
--- a/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
+++ b/hapi-fhir-jpaserver-test-dstu3/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
@@ -1344,6 +1344,8 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
@Test
public void testEmptySearch() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Bundle responseBundle;
responseBundle = myClient.search().forResource(Patient.class).returnBundle(Bundle.class).execute();
@@ -1484,6 +1486,8 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
@Test
public void testEverythingInstanceWithContentFilter() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Patient pt1 = new Patient();
pt1.addName().setFamily("Everything").addGiven("Arthur");
IIdType ptId1 = myPatientDao.create(pt1, mySrd).getId().toUnqualifiedVersionless();
@@ -2161,6 +2165,8 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
@SuppressWarnings("unused")
@Test
public void testFullTextSearch() throws Exception {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Observation obs1 = new Observation();
obs1.getCode().setText("Systolic Blood Pressure");
obs1.setStatus(ObservationStatus.FINAL);
diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml
index 85b5fd7ae27..a276e3e3b1c 100644
--- a/hapi-fhir-jpaserver-test-r4/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/BulkDataErrorAbuseTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/BulkDataErrorAbuseTest.java
index 3fdee151801..71f82b5da39 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/BulkDataErrorAbuseTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/batch2/BulkDataErrorAbuseTest.java
@@ -206,7 +206,7 @@ public class BulkDataErrorAbuseTest extends BaseResourceProviderR4Test {
// we either do this, or shutdown the completion service in an
// "inelegant" manner, dropping all threads (which we aren't doing)
ourLog.error("Failed after checking " + count + " futures");
- errors.add(ex.getMessage());
+ errors.add(ex.toString());
}
}
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ComboUniqueParamTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ComboUniqueParamTest.java
index 107eb89fc00..afec0d46141 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ComboUniqueParamTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ComboUniqueParamTest.java
@@ -1,13 +1,13 @@
package ca.uhn.fhir.jpa.dao.r4;
import ca.uhn.fhir.batch2.api.IJobCoordinator;
-import ca.uhn.fhir.batch2.jobs.reindex.ReindexAppCtx;
import ca.uhn.fhir.batch2.jobs.reindex.ReindexJobParameters;
import ca.uhn.fhir.batch2.model.JobInstanceStartRequest;
import ca.uhn.fhir.context.ComboSearchParamType;
import ca.uhn.fhir.context.RuntimeSearchParam;
import ca.uhn.fhir.i18n.Msg;
import ca.uhn.fhir.jpa.batch.models.Batch2JobStartResponse;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedComboStringUnique;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
@@ -58,8 +58,6 @@ import java.util.UUID;
import java.util.stream.Collectors;
import static ca.uhn.fhir.batch2.jobs.reindex.ReindexUtils.JOB_REINDEX;
-import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.INDEX_STATUS_INDEXED;
-import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -427,7 +425,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testHashesCalculated() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueIndexPatientIdentifier();
Patient pt = new Patient();
@@ -584,7 +582,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
}
private Pair prepareDoubleMatchingSearchParameterAndPatient() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueIndexPatientIdentifier();
Patient pt = new Patient();
@@ -1025,9 +1023,8 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
// 1 patient, 1 coverage, 3 search parameters
assertEquals(5, resources.size(), resourceIds);
for (int i = 0; i < resources.size(); i++) {
- int indexStatus = resources.get(i).getIndexStatus().intValue();
- assertEquals(INDEX_STATUS_INDEXED, indexStatus, "Expected resource " + i + " to have index status INDEXED but was " +
- (indexStatus == INDEX_STATUS_INDEXING_FAILED ? "FAILED" : "UNKNOWN(" + indexStatus + ")"));
+ EntityIndexStatusEnum indexStatus = resources.get(i).getIndexStatus();
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, indexStatus, "Expected resource " + i + " to have index status INDEXED but was " + indexStatus.name());
}
});
@@ -1224,7 +1221,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testOrQuery() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueGenderFamilyComboSp();
Patient pt1 = new Patient();
@@ -1263,7 +1260,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testSearchSynchronousUsingUniqueComposite() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueGenderFamilyComboSp();
Patient pt1 = new Patient();
@@ -1409,7 +1406,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testUniqueValuesAreIndexed_Reference_UsingModifierSyntax() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueNameAndManagingOrganizationSps();
Organization org = new Organization();
@@ -1828,7 +1825,7 @@ public class FhirResourceDaoR4ComboUniqueParamTest extends BaseComboParamsR4Test
@Test
public void testReplaceOneWithAnother() {
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
createUniqueGenderFamilyComboSp();
Patient pt1 = new Patient();
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
index cc2eb123dc5..2054f21ecff 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
@@ -40,11 +40,15 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4SearchFtTest.class);
+ @Override
@BeforeEach
- public void beforeDisableResultReuse() {
+ public void before() throws Exception {
+ super.before();
+
myStorageSettings.setReuseCachedSearchResultsForMillis(null);
myStorageSettings.setAllowContainsSearches(true);
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
}
/**
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java
index 475238805bf..d48db4143d7 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java
@@ -14,6 +14,7 @@ import ca.uhn.fhir.jpa.dao.JpaResourceDao;
import ca.uhn.fhir.jpa.dao.tx.IHapiTransactionService;
import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
@@ -165,9 +166,6 @@ import static org.junit.jupiter.api.Assertions.fail;
@SuppressWarnings({"unchecked", "deprecation", "Duplicates"})
public class FhirResourceDaoR4Test extends BaseJpaR4Test {
- @Autowired
- IHapiTransactionService myHapiTransactionService;
-
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4Test.class);
@AfterEach
@@ -190,7 +188,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
private List extractNames(IBundleProvider theSearch) {
ArrayList retVal = new ArrayList<>();
- for (IBaseResource next : theSearch.getResources(0, theSearch.size())) {
+ for (IBaseResource next : theSearch.getResources(0, theSearch.sizeOrThrowNpe())) {
Patient nextPt = (Patient) next;
retVal.add(nextPt.getName().get(0).getNameAsSingleString());
}
@@ -291,7 +289,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
assertThat(myResourceIndexedSearchParamTokenDao.countForResourceId(id1.getIdPartAsLong())).isGreaterThan(0);
Optional tableOpt = myResourceTableDao.findById(id1.getIdPartAsLong());
assertTrue(tableOpt.isPresent());
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, tableOpt.get().getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, tableOpt.get().getIndexStatus());
});
runInTransaction(() -> {
@@ -314,7 +312,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
runInTransaction(() -> {
Optional tableOpt = myResourceTableDao.findById(id1.getIdPartAsLong());
assertTrue(tableOpt.isPresent());
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, tableOpt.get().getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, tableOpt.get().getIndexStatus());
assertThat(myResourceIndexedSearchParamTokenDao.countForResourceId(id1.getIdPartAsLong())).isLessThanOrEqualTo(0);
});
}
@@ -401,7 +399,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
assertThat(myResourceIndexedSearchParamTokenDao.countForResourceId(id1.getIdPartAsLong())).isGreaterThan(0);
Optional tableOpt = myResourceTableDao.findById(id1.getIdPartAsLong());
assertTrue(tableOpt.isPresent());
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, tableOpt.get().getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, tableOpt.get().getIndexStatus());
});
/*
@@ -424,7 +422,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
runInTransaction(() -> {
Optional tableOpt = myResourceTableDao.findById(id1.getIdPartAsLong());
assertTrue(tableOpt.isPresent());
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, tableOpt.get().getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, tableOpt.get().getIndexStatus());
assertThat(myResourceIndexedSearchParamTokenDao.countForResourceId(id1.getIdPartAsLong())).isLessThanOrEqualTo(0);
});
@@ -3678,7 +3676,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test {
@Test
public void testSortByString01() {
myStorageSettings.setIndexMissingFields(JpaStorageSettings.IndexEnabledEnum.ENABLED);
- myStorageSettings.setAdvancedHSearchIndexing(false);
+ myStorageSettings.setHibernateSearchIndexSearchParams(false);
Patient p = new Patient();
String string = "testSortByString01";
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java
index 1b4a5adbef2..ce5a5d497d8 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSearchDaoR4Test.java
@@ -45,12 +45,15 @@ public class FhirSearchDaoR4Test extends BaseJpaR4Test implements IR4SearchIndex
@Autowired
private DataSource myDataSource;
+ @Override
@BeforeEach
public void before() throws Exception {
super.before();
SearchBuilder.setMaxPageSizeForTest(10);
+ myStorageSettings.setHibernateSearchIndexFullText(true);
}
+
@AfterEach
public void after() {
SearchBuilder.setMaxPageSizeForTest(null);
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java
index 36ab6da5ae3..68b554c789c 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java
@@ -9,6 +9,7 @@ import ca.uhn.fhir.interceptor.api.Pointcut;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.NormalizedQuantitySearchLevel;
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
@@ -589,13 +590,13 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
sleepUntilTimeChange();
ResourceTable entity = new TransactionTemplate(myTxManager).execute(t -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
- assertEquals(Long.valueOf(1), entity.getIndexStatus());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, entity.getIndexStatus());
Long jobId = myResourceReindexingSvc.markAllResourcesForReindexing();
myResourceReindexingSvc.forceReindexingPass();
entity = new TransactionTemplate(myTxManager).execute(t -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
- assertEquals(Long.valueOf(1), entity.getIndexStatus());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, entity.getIndexStatus());
// Just make sure this doesn't cause a choke
myResourceReindexingSvc.forceReindexingPass();
@@ -632,7 +633,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest {
myResourceReindexingSvc.forceReindexingPass();
entity = new TransactionTemplate(myTxManager).execute(theStatus -> myEntityManager.find(ResourceTable.class, id.getIdPartAsLong()));
- assertEquals(Long.valueOf(2), entity.getIndexStatus());
+ assertEquals(EntityIndexStatusEnum.INDEXING_FAILED, entity.getIndexStatus());
}
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java
index f2ede78fa6e..7643aecf79c 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java
@@ -16,6 +16,7 @@ import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.batch.models.Batch2JobStartResponse;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.PartitionablePartitionId;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTag;
@@ -29,6 +30,7 @@ import ca.uhn.fhir.jpa.model.entity.ResourceTag;
import ca.uhn.fhir.jpa.model.entity.SearchParamPresentEntity;
import ca.uhn.fhir.jpa.model.util.JpaConstants;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
+import ca.uhn.fhir.jpa.searchparam.submit.interceptor.SearchParamValidatingInterceptor;
import ca.uhn.fhir.jpa.util.SqlQuery;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
@@ -3322,8 +3324,8 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test {
myResourceReindexingSvc.forceReindexingPass();
runInTransaction(() -> {
- assertNotEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED, myResourceTableDao.findById(patientIdNull.getIdPartAsLong()).get().getIndexStatus());
- assertNotEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED, myResourceTableDao.findById(patientId1.getIdPartAsLong()).get().getIndexStatus());
+ assertNotEquals(EntityIndexStatusEnum.INDEXING_FAILED, myResourceTableDao.findById(patientIdNull.getIdPartAsLong()).get().getIndexStatus());
+ assertNotEquals(EntityIndexStatusEnum.INDEXING_FAILED, myResourceTableDao.findById(patientId1.getIdPartAsLong()).get().getIndexStatus());
});
}
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobTest.java
index d70ff1085e9..7f7ae073648 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/delete/job/DeleteExpungeJobTest.java
@@ -16,6 +16,7 @@ import org.hl7.fhir.r4.model.DiagnosticReport;
import org.hl7.fhir.r4.model.Observation;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.Reference;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -29,6 +30,14 @@ public class DeleteExpungeJobTest extends BaseJpaR4Test {
@Autowired
private Batch2JobHelper myBatch2JobHelper;
+ @Override
+ @BeforeEach
+ public void before() throws Exception {
+ super.before();
+
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ }
+
@Test
public void testDeleteExpunge() {
// setup
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderCustomSearchParamR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderCustomSearchParamR4Test.java
index 1f80074267c..39e3746dc52 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderCustomSearchParamR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderCustomSearchParamR4Test.java
@@ -8,6 +8,7 @@ import ca.uhn.fhir.interceptor.api.Pointcut;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.entity.Search;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedSearchParamString;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.model.search.SearchStatusEnum;
@@ -224,9 +225,9 @@ public class ResourceProviderCustomSearchParamR4Test extends BaseResourceProvide
runInTransaction(() -> {
ResourceTable res = myResourceTableDao.findById(patId.getIdPartAsLong()).orElseThrow(IllegalStateException::new);
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, res.getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, res.getIndexStatus());
res = myResourceTableDao.findById(obsId.getIdPartAsLong()).orElseThrow(IllegalStateException::new);
- assertEquals(BaseHapiFhirDao.INDEX_STATUS_INDEXED, res.getIndexStatus().longValue());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, res.getIndexStatus());
});
SearchParameter fooSp = new SearchParameter();
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4EverythingTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4EverythingTest.java
index 137c8cad7d6..859f2d861a9 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4EverythingTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4EverythingTest.java
@@ -200,6 +200,8 @@ public class ResourceProviderR4EverythingTest extends BaseResourceProviderR4Test
@Test
public void testEverythingInstanceWithContentFilter() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Patient pt1 = new Patient();
pt1.addName().setFamily("Everything").addGiven("Arthur");
IIdType ptId1 = myPatientDao.create(pt1, mySrd).getId().toUnqualifiedVersionless();
@@ -977,6 +979,8 @@ public class ResourceProviderR4EverythingTest extends BaseResourceProviderR4Test
@Test
public void testFulltextEverythingWithIdAndContent() throws IOException {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Patient p = new Patient();
p.setId("FOO");
p.addName().setFamily("FAMILY");
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
index 28ee7ab19d1..66d4ee244ba 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
@@ -2045,6 +2045,8 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
@Test
public void testEmptySearch() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Bundle responseBundle;
responseBundle = myClient.search().forResource(Patient.class).returnBundle(Bundle.class).execute();
@@ -2147,6 +2149,8 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
@SuppressWarnings("unused")
@Test
public void testFullTextSearch() throws Exception {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
IParser parser = myFhirContext.newJsonParser();
Observation obs1 = new Observation();
@@ -2180,6 +2184,8 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
@Test
public void testFulltextSearchWithIdAndContent() throws IOException {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+
Patient p = new Patient();
p.setId("FOO");
p.addName().setFamily("FAMILY");
@@ -2203,6 +2209,43 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertThat(ids).isEmpty();
}
+ @ParameterizedTest
+ @ValueSource(strings = {
+ "/Patient?_text=HELLO",
+ "/Patient?_content=HELLO",
+ "/Patient?_content=HELLO&_text=HELLO",
+ "/Patient?_id=FOO&_content=HELLO",
+ "/Patient/A/$everything?_content=HELLO"
+ })
+ public void testFullTextIndexingDisabled(String theUri) throws IOException {
+ // Setup
+ myStorageSettings.setHibernateSearchIndexFullText(false);
+ createPatient(withId("A"), withActiveTrue());
+
+ // Test
+ HttpGet get = new HttpGet(myServerBase + theUri);
+ try (CloseableHttpResponse response = ourHttpClient.execute(get)) {
+
+ // Verify
+ String resp = IOUtils.toString(response.getEntity().getContent(), StandardCharsets.UTF_8);
+ assertEquals(400, response.getStatusLine().getStatusCode(), resp);
+ String expectedParams = null;
+ if (theUri.contains("_content")) {
+ expectedParams = "_content";
+ }
+ if (theUri.contains("_text")) {
+ if (expectedParams != null) {
+ expectedParams += ", _text";
+ } else {
+ expectedParams = "_text";
+ }
+ }
+ assertThat(resp).contains("Fulltext searching is not enabled on this server, can not support the parameter(s): " + expectedParams);
+ }
+
+ }
+
+
@Test
public void testGetResourceCountsOperation() throws Exception {
String methodName = "testMetaOperations";
@@ -2723,8 +2766,8 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
}
/**
- * See issue #52
- */
+ * See issue #52
+ */
@Test
public void testImagingStudyResources() throws Exception {
IGenericClient client = myClient;
@@ -2954,8 +2997,8 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
/**
- * See #793
- */
+ * See #793
+ */
@Test
public void testIncludeCountDoesntIncludeIncludes() {
Organization org = new Organization();
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/reindex/ReindexStepV1Test.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/reindex/ReindexStepV1Test.java
index 8075789db8d..231590ee35d 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/reindex/ReindexStepV1Test.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/reindex/ReindexStepV1Test.java
@@ -10,6 +10,7 @@ import ca.uhn.fhir.batch2.jobs.reindex.v1.ReindexStepV1;
import ca.uhn.fhir.batch2.model.JobInstance;
import ca.uhn.fhir.batch2.model.WorkChunk;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.jpa.test.BaseJpaR4Test;
import org.hl7.fhir.instance.model.api.IIdType;
@@ -24,14 +25,13 @@ import org.mockito.Captor;
import org.mockito.Mock;
import org.springframework.beans.factory.annotation.Autowired;
-import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.INDEX_STATUS_INDEXED;
-import static ca.uhn.fhir.jpa.dao.BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
+@SuppressWarnings("removal")
public class ReindexStepV1Test extends BaseJpaR4Test {
@Autowired
@@ -289,10 +289,10 @@ public class ReindexStepV1Test extends BaseJpaR4Test {
runInTransaction(() -> {
ResourceTable table = myResourceTableDao.findById(idPatientToInvalidate).orElseThrow();
- assertEquals(INDEX_STATUS_INDEXING_FAILED, table.getIndexStatus());
+ assertEquals(EntityIndexStatusEnum.INDEXING_FAILED, table.getIndexStatus());
table = myResourceTableDao.findById(id0).orElseThrow();
- assertEquals(INDEX_STATUS_INDEXED, table.getIndexStatus());
+ assertEquals(EntityIndexStatusEnum.INDEXED_RDBMS_ONLY, table.getIndexStatus());
});
}
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java
index 0b1db7db706..45b4c3b11bb 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/search/reindex/ResourceReindexingSvcImplTest.java
@@ -10,6 +10,7 @@ import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.dao.data.IResourceReindexJobDao;
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
import ca.uhn.fhir.jpa.entity.ResourceReindexJobEntity;
+import ca.uhn.fhir.jpa.model.entity.EntityIndexStatusEnum;
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import org.apache.commons.lang3.time.DateUtils;
@@ -280,7 +281,7 @@ public class ResourceReindexingSvcImplTest {
// verify
assertEquals(0, count);
- verify(myResourceTableDao, times(1)).updateIndexStatus(eq(0L), eq(BaseHapiFhirDao.INDEX_STATUS_INDEXING_FAILED));
+ verify(myResourceTableDao, times(1)).updateIndexStatus(eq(0L), eq(EntityIndexStatusEnum.INDEXING_FAILED));
}
@Test
diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml
index 6346b8cac83..6b78cf73c0c 100644
--- a/hapi-fhir-jpaserver-test-r4b/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml
index bbb7ccef96f..99ecfbe7fe1 100644
--- a/hapi-fhir-jpaserver-test-r5/pom.xml
+++ b/hapi-fhir-jpaserver-test-r5/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index df8458955b2..dae6e06108f 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaTest.java b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaTest.java
index 410ef62c648..f2b35b33d45 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaTest.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/main/java/ca/uhn/fhir/jpa/test/BaseJpaTest.java
@@ -37,7 +37,6 @@ import ca.uhn.fhir.jpa.bulk.export.api.IBulkDataExportJobSchedulingHelper;
import ca.uhn.fhir.jpa.config.JpaConfig;
import ca.uhn.fhir.jpa.dao.BaseHapiFhirDao;
import ca.uhn.fhir.jpa.dao.IFulltextSearchSvc;
-import ca.uhn.fhir.jpa.dao.JpaPersistedResourceValidationSupport;
import ca.uhn.fhir.jpa.dao.data.INpmPackageVersionDao;
import ca.uhn.fhir.jpa.dao.data.IResourceHistoryTableDao;
import ca.uhn.fhir.jpa.dao.data.IResourceHistoryTagDao;
@@ -61,7 +60,6 @@ import ca.uhn.fhir.jpa.dao.data.ITermConceptParentChildLinkDao;
import ca.uhn.fhir.jpa.dao.data.ITermConceptPropertyDao;
import ca.uhn.fhir.jpa.dao.data.ITermValueSetConceptDao;
import ca.uhn.fhir.jpa.dao.data.ITermValueSetDao;
-import ca.uhn.fhir.jpa.dao.mdm.MdmLinkDaoJpaImpl;
import ca.uhn.fhir.jpa.entity.MdmLink;
import ca.uhn.fhir.jpa.entity.TermConcept;
import ca.uhn.fhir.jpa.entity.TermConceptDesignation;
@@ -71,6 +69,7 @@ import ca.uhn.fhir.jpa.entity.TermValueSet;
import ca.uhn.fhir.jpa.entity.TermValueSetConcept;
import ca.uhn.fhir.jpa.entity.TermValueSetConceptDesignation;
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
+import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTag;
@@ -95,7 +94,6 @@ import ca.uhn.fhir.jpa.search.cache.ISearchResultCacheSvc;
import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc;
import ca.uhn.fhir.jpa.subscription.match.registry.SubscriptionLoader;
import ca.uhn.fhir.jpa.subscription.match.registry.SubscriptionRegistry;
-import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.term.api.ITermDeferredStorageSvc;
import ca.uhn.fhir.jpa.util.CircularQueueCaptureQueriesListener;
import ca.uhn.fhir.jpa.util.MemoryCacheService;
@@ -110,7 +108,6 @@ import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import ca.uhn.fhir.system.HapiSystemProperties;
import ca.uhn.fhir.test.BaseTest;
import ca.uhn.fhir.test.utilities.LoggingExtension;
-import ca.uhn.fhir.test.utilities.ProxyUtil;
import ca.uhn.fhir.test.utilities.UnregisterScheduledProcessor;
import ca.uhn.fhir.test.utilities.server.SpringContextGrabbingTestExecutionListener;
import ca.uhn.fhir.util.BundleUtil;
@@ -421,9 +418,10 @@ public abstract class BaseJpaTest extends BaseTest {
JpaStorageSettings defaultConfig = new JpaStorageSettings();
myStorageSettings.setAccessMetaSourceInformationFromProvenanceTable(defaultConfig.isAccessMetaSourceInformationFromProvenanceTable());
- myStorageSettings.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
myStorageSettings.setAllowContainsSearches(defaultConfig.isAllowContainsSearches());
myStorageSettings.setDeleteEnabled(defaultConfig.isDeleteEnabled());
+ myStorageSettings.setHibernateSearchIndexSearchParams(defaultConfig.isHibernateSearchIndexSearchParams());
+ myStorageSettings.setHibernateSearchIndexFullText(defaultConfig.isHibernateSearchIndexFullText());
myStorageSettings.setIncludeHashIdentityForTokenSearches(defaultConfig.isIncludeHashIdentityForTokenSearches());
myStorageSettings.setMarkResourcesForReindexingUponSearchParameterChange(defaultConfig.isMarkResourcesForReindexingUponSearchParameterChange());
myStorageSettings.setMaximumIncludesToLoadPerPage(defaultConfig.getMaximumIncludesToLoadPerPage());
diff --git a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StandardQueriesLuceneTest.java b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StandardQueriesLuceneTest.java
index 31ce2f00f93..2efc28c8c9e 100644
--- a/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StandardQueriesLuceneTest.java
+++ b/hapi-fhir-jpaserver-test-utilities/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4StandardQueriesLuceneTest.java
@@ -83,14 +83,9 @@ public class FhirResourceDaoR4StandardQueriesLuceneTest extends BaseJpaTest
// todo mb create an extension to restore via clone or xstream + BeanUtils.copyProperties().
@BeforeEach
void setUp() {
+ myStorageSettings.setHibernateSearchIndexFullText(true);
+ myStorageSettings.setHibernateSearchIndexSearchParams(true);
purgeDatabase(myStorageSettings, mySystemDao, myResourceReindexingSvc, mySearchCoordinatorSvc, mySearchParamRegistry, myBulkDataScheduleHelper);
- myStorageSettings.setAdvancedHSearchIndexing(true);
- }
-
- @AfterEach
- void tearDown() {
- JpaStorageSettings defaultConfig = new JpaStorageSettings();
- myStorageSettings.setAdvancedHSearchIndexing(defaultConfig.isAdvancedHSearchIndexing());
}
@Override
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 28dad2b99a5..0635c46359c 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/BaseConfig.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/BaseConfig.java
new file mode 100644
index 00000000000..dd4a8eb0513
--- /dev/null
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/BaseConfig.java
@@ -0,0 +1,23 @@
+package ca.uhn.fhirtest.config;
+
+import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
+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.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+@Configuration
+public abstract class BaseConfig {
+
+ protected void configureLuceneProperties(Properties extraProperties, String fhirLuceneLocation) {
+ extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
+ extraProperties.put(
+ BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
+ HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
+ extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
+ extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), fhirLuceneLocation);
+ extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ }
+}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/CommonJpaStorageSettingsConfigurer.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/CommonJpaStorageSettingsConfigurer.java
index 4bf5ec2e9c7..aaf87ff11ad 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/CommonJpaStorageSettingsConfigurer.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/CommonJpaStorageSettingsConfigurer.java
@@ -4,6 +4,9 @@ import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
public class CommonJpaStorageSettingsConfigurer {
public CommonJpaStorageSettingsConfigurer(JpaStorageSettings theStorageSettings) {
+ theStorageSettings.setHibernateSearchIndexFullText(false);
+ theStorageSettings.setHibernateSearchIndexSearchParams(false);
+
theStorageSettings.setIndexOnUpliftedRefchains(true);
theStorageSettings.setMarkResourcesForReindexingUponSearchParameterChange(false);
theStorageSettings.setLanguageSearchParameterEnabled(true);
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestAuditConfig.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestAuditConfig.java
index 7d68437d1f5..054e9f07411 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestAuditConfig.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestAuditConfig.java
@@ -6,6 +6,7 @@ import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
import ca.uhn.fhir.jpa.config.HapiJpaConfig;
import ca.uhn.fhir.jpa.config.r4.JpaR4Config;
import ca.uhn.fhir.jpa.config.util.HapiEntityManagerFactoryUtil;
+import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
@@ -69,6 +70,12 @@ public class TestAuditConfig {
return retVal;
}
+ @Bean
+ public SubscriptionSettings subscriptionSettings() {
+ SubscriptionSettings retVal = new SubscriptionSettings();
+ return retVal;
+ }
+
@Bean(name = "myPersistenceDataSourceR4")
public DataSource dataSource() {
BasicDataSource retVal = new BasicDataSource();
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
index 9e1e0aba26d..ac413259321 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
@@ -7,8 +7,7 @@ import ca.uhn.fhir.jpa.config.JpaDstu2Config;
import ca.uhn.fhir.jpa.config.util.HapiEntityManagerFactoryUtil;
import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
-import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
-import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
+import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgresDialect;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
@@ -18,9 +17,6 @@ import ca.uhn.fhirtest.interceptor.PublicSecurityInterceptor;
import jakarta.persistence.EntityManagerFactory;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
-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.hl7.fhir.dstu2.model.Subscription;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -41,13 +37,13 @@ import javax.sql.DataSource;
@Configuration
@Import({CommonConfig.class, JpaDstu2Config.class, HapiJpaConfig.class})
@EnableTransactionManagement()
-public class TestDstu2Config {
+public class TestDstu2Config extends BaseConfig {
public static final String FHIR_LUCENE_LOCATION_DSTU2 = "fhir.lucene.location.dstu2";
- private String myDbUsername = System.getProperty(TestR5Config.FHIR_DB_USERNAME);
- private String myDbPassword = System.getProperty(TestR5Config.FHIR_DB_PASSWORD);
- private String myFhirLuceneLocation = System.getProperty(FHIR_LUCENE_LOCATION_DSTU2);
+ private final String myDbUsername = System.getProperty(TestR5Config.FHIR_DB_USERNAME);
+ private final String myDbPassword = System.getProperty(TestR5Config.FHIR_DB_PASSWORD);
+ private final String myFhirLuceneLocation = System.getProperty(FHIR_LUCENE_LOCATION_DSTU2);
@Bean
public PublicSecurityInterceptor securityInterceptor() {
@@ -106,14 +102,12 @@ public class TestDstu2Config {
retVal.setPassword(myDbPassword);
TestR5Config.applyCommonDatasourceParams(retVal);
- DataSource dataSource = ProxyDataSourceBuilder.create(retVal)
+ return ProxyDataSourceBuilder.create(retVal)
// .logQueryBySlf4j(SLF4JLogLevel.INFO, "SQL")
.logSlowQueryBySlf4j(10000, TimeUnit.MILLISECONDS)
.afterQuery(new CurrentThreadCaptureQueriesListener())
.countQuery()
.build();
-
- return dataSource;
}
@Primary
@@ -142,7 +136,7 @@ public class TestDstu2Config {
if (CommonConfig.isLocalTestMode()) {
extraProperties.put("hibernate.dialect", HapiFhirH2Dialect.class.getName());
} else {
- extraProperties.put("hibernate.dialect", HapiFhirPostgres94Dialect.class.getName());
+ extraProperties.put("hibernate.dialect", HapiFhirPostgresDialect.class.getName());
}
extraProperties.put("hibernate.format_sql", "false");
extraProperties.put("hibernate.show_sql", "false");
@@ -153,21 +147,13 @@ public class TestDstu2Config {
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
- extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
- extraProperties.put(
- BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
- HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
- extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ configureLuceneProperties(extraProperties, myFhirLuceneLocation);
return extraProperties;
}
/**
* Bean which validates incoming requests
- *
- * @param theInstanceValidator
*/
@Bean
@Lazy
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java
index 5d27be23752..754db2949ec 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu3Config.java
@@ -9,7 +9,6 @@ import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
-import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
@@ -19,9 +18,6 @@ import ca.uhn.fhirtest.interceptor.PublicSecurityInterceptor;
import jakarta.persistence.EntityManagerFactory;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
-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.hl7.fhir.dstu2.model.Subscription;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -42,7 +38,7 @@ import javax.sql.DataSource;
@Configuration
@Import({CommonConfig.class, JpaDstu3Config.class, HapiJpaConfig.class})
@EnableTransactionManagement()
-public class TestDstu3Config {
+public class TestDstu3Config extends BaseConfig {
public static final String FHIR_LUCENE_LOCATION_DSTU3 = "fhir.lucene.location.dstu3";
private String myDbUsername = System.getProperty(TestR5Config.FHIR_DB_USERNAME);
@@ -154,13 +150,7 @@ public class TestDstu3Config {
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
- extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
- extraProperties.put(
- BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
- HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
- extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ configureLuceneProperties(extraProperties, myFhirLuceneLocation);
return extraProperties;
}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4BConfig.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4BConfig.java
index 6cbb003cd29..b2904fe3c99 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4BConfig.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4BConfig.java
@@ -5,10 +5,10 @@ import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
import ca.uhn.fhir.jpa.config.HapiJpaConfig;
import ca.uhn.fhir.jpa.config.r4b.JpaR4BConfig;
import ca.uhn.fhir.jpa.config.util.HapiEntityManagerFactoryUtil;
+import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
-import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
@@ -18,9 +18,7 @@ import ca.uhn.fhirtest.interceptor.PublicSecurityInterceptor;
import jakarta.persistence.EntityManagerFactory;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
-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.hl7.fhir.dstu2.model.Subscription;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,7 +40,7 @@ import javax.sql.DataSource;
@Configuration
@Import({CommonConfig.class, JpaR4BConfig.class, HapiJpaConfig.class})
@EnableTransactionManagement()
-public class TestR4BConfig {
+public class TestR4BConfig extends BaseConfig {
public static final String FHIR_DB_USERNAME = "fhir.db.username";
public static final String FHIR_DB_PASSWORD = "fhir.db.password";
public static final String FHIR_LUCENE_LOCATION_R4B = "fhir.lucene.location.r4b";
@@ -116,6 +114,16 @@ public class TestR4BConfig {
return retVal;
}
+ @Bean
+ public SubscriptionSettings subscriptionSettings() {
+ SubscriptionSettings retVal = new SubscriptionSettings();
+ retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
+ retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
+ retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
+ retVal.setWebsocketContextPath("/websocketR4B");
+ return retVal;
+ }
+
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory(
ConfigurableListableBeanFactory theConfigurableListableBeanFactory,
@@ -145,13 +153,7 @@ public class TestR4BConfig {
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
- extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
- extraProperties.put(
- BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
- HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
- extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ configureLuceneProperties(extraProperties, myFhirLuceneLocation);
return extraProperties;
}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java
index f76a13e64c7..c8b66949a88 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR4Config.java
@@ -14,7 +14,6 @@ import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
-import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
@@ -24,9 +23,6 @@ import ca.uhn.fhirtest.interceptor.PublicSecurityInterceptor;
import jakarta.persistence.EntityManagerFactory;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
-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.hl7.fhir.dstu2.model.Subscription;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
@@ -47,7 +43,7 @@ import javax.sql.DataSource;
@Configuration
@Import({CommonConfig.class, JpaR4Config.class, HapiJpaConfig.class})
@EnableTransactionManagement()
-public class TestR4Config {
+public class TestR4Config extends BaseConfig {
public static final String FHIR_LUCENE_LOCATION_R4 = "fhir.lucene.location.r4";
public static final Integer COUNT_SEARCH_RESULTS_UP_TO = 50000;
@@ -154,13 +150,8 @@ public class TestR4Config {
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
- extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
- extraProperties.put(
- BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
- HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
- extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ configureLuceneProperties(extraProperties, myFhirLuceneLocation);
+
return extraProperties;
}
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java
index d237e1c5484..24d1f11901d 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java
+++ b/hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestR5Config.java
@@ -9,7 +9,6 @@ import ca.uhn.fhir.jpa.model.config.SubscriptionSettings;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect;
import ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
-import ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers;
import ca.uhn.fhir.jpa.util.CurrentThreadCaptureQueriesListener;
import ca.uhn.fhir.jpa.validation.ValidationSettings;
import ca.uhn.fhir.rest.server.interceptor.RequestValidatingInterceptor;
@@ -19,9 +18,6 @@ import ca.uhn.fhirtest.interceptor.PublicSecurityInterceptor;
import jakarta.persistence.EntityManagerFactory;
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder;
import org.apache.commons.dbcp2.BasicDataSource;
-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.hl7.fhir.dstu2.model.Subscription;
import org.hl7.fhir.r5.utils.validation.constants.ReferenceValidationPolicy;
import org.slf4j.Logger;
@@ -44,7 +40,7 @@ import javax.sql.DataSource;
@Configuration
@Import({CommonConfig.class, JpaR5Config.class, HapiJpaConfig.class})
@EnableTransactionManagement()
-public class TestR5Config {
+public class TestR5Config extends BaseConfig {
public static final String FHIR_DB_USERNAME = "fhir.db.username";
public static final String FHIR_DB_PASSWORD = "fhir.db.password";
public static final String FHIR_LUCENE_LOCATION_R5 = "fhir.lucene.location.r5";
@@ -164,13 +160,7 @@ public class TestR5Config {
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
- extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
- extraProperties.put(
- BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER),
- HapiHSearchAnalysisConfigurers.HapiLuceneAnalysisConfigurer.class.getName());
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
- extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
- extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
+ configureLuceneProperties(extraProperties, myFhirLuceneLocation);
return extraProperties;
}
diff --git a/hapi-fhir-server-cds-hooks/pom.xml b/hapi-fhir-server-cds-hooks/pom.xml
index 8433325091e..96215b6e721 100644
--- a/hapi-fhir-server-cds-hooks/pom.xml
+++ b/hapi-fhir-server-cds-hooks/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 100c95c4456..98d026139bd 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index a19f14009c6..686ac332447 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index 420f6e8c201..464dda93e5a 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
index b2ea7a0426e..8bd71d73f38 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
index 5266813fde1..8a5fdaa6e56 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
@@ -21,7 +21,7 @@
ca.uhn.hapi.fhir
hapi-fhir-caching-api
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
index 42d04c0dba6..de9722dcc59 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
index 1ea7bba5ba5..d3ae0167ec7 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir
ca.uhn.hapi.fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../pom.xml
diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml
index 1b44fea207d..5d612aa2de0 100644
--- a/hapi-fhir-serviceloaders/pom.xml
+++ b/hapi-fhir-serviceloaders/pom.xml
@@ -5,7 +5,7 @@
hapi-deployable-pom
ca.uhn.hapi.fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index 831176729ec..0ebb37f06c0 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index 4979bf31eee..b69e798a324 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index cb8367a1cb4..034aa1f3715 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index f1ebbfe4206..038f6928a01 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 09fbd8614b0..763ad59f6ba 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index 88d653f661d..85f71381499 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 8a0b28f1947..ac854015f83 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index acca02156a7..701b7aaa08b 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml
index 821ae1ade61..0f0bf3671d7 100644
--- a/hapi-fhir-storage-batch2-jobs/pom.xml
+++ b/hapi-fhir-storage-batch2-jobs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml
index 03237d275b6..3d1a1aa0b3e 100644
--- a/hapi-fhir-storage-batch2-test-utilities/pom.xml
+++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index d25d7eb087d..b2756e43a94 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml
index 30bf9c7631e..9e4712a6c9f 100644
--- a/hapi-fhir-storage-cr/pom.xml
+++ b/hapi-fhir-storage-cr/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index 7fc3f054ca3..dbe8272694c 100644
--- a/hapi-fhir-storage-mdm/pom.xml
+++ b/hapi-fhir-storage-mdm/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 41eb4d4cb37..16103ffd3ea 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index eb4b180e7a0..bc03958cc1c 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/config/JpaStorageSettings.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/config/JpaStorageSettings.java
index ed7b90b9da9..16a5ebe8679 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/config/JpaStorageSettings.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/config/JpaStorageSettings.java
@@ -273,7 +273,15 @@ public class JpaStorageSettings extends StorageSettings {
*
* @since 5.6.0
*/
- private boolean myAdvancedHSearchIndexing = false;
+ private boolean myHibernateSearchIndexSearchParams = false;
+
+ /**
+ * Activates hibernate search indexing of fulltext data from resources, which
+ * is used to support the {@literal _text} and {@literal _content} Search Parameters.
+ *
+ * @since 8.0.0
+ */
+ private boolean myHibernateSearchIndexFullText = false;
/**
* @since 5.7.0
@@ -2192,12 +2200,35 @@ public class JpaStorageSettings extends StorageSettings {
}
/**
- * Is HSearch indexing enabled beyond _contains or _text?
+ * @deprecated Use {@link #isHibernateSearchIndexSearchParams()} instead
+ */
+ @Deprecated(since = "8.0.0", forRemoval = true)
+ public boolean isAdvancedHSearchIndexing() {
+ return isHibernateSearchIndexSearchParams();
+ }
+
+ /**
+ * @deprecated Use {@link #setHibernateSearchIndexSearchParams(boolean)} instead
+ */
+ @Deprecated(since = "8.0.0", forRemoval = true)
+ public void setAdvancedHSearchIndexing(boolean theAdvancedHSearchIndexing) {
+ setHibernateSearchIndexSearchParams(theAdvancedHSearchIndexing);
+ }
+
+ /**
+ * Is HSearch indexing enabled beyond {@literal _content} or {@literal _text}?
+ * If this setting is enabled, other search parameters will also be indexed using
+ * Hibernate Search, allowing more kinds of searches to be performed using the
+ * fulltext engine.
+ *
+ *
+ * Note that this property was called "setAdvancedHSearchIndexing" prior to HAPI FHIR 8.0.0
+ *
*
* @since 5.6.0
*/
- public boolean isAdvancedHSearchIndexing() {
- return myAdvancedHSearchIndexing;
+ public boolean isHibernateSearchIndexSearchParams() {
+ return myHibernateSearchIndexSearchParams;
}
/**
@@ -2206,11 +2237,36 @@ public class JpaStorageSettings extends StorageSettings {
* String, token, and reference parameters can be indexed in HSearch.
* This extends token search to support :text searches, as well as supporting
* :contains and :text on string parameters.
+ *
+ *
+ * Note that this property was called "setAdvancedHSearchIndexing" prior to HAPI FHIR 8.0.0
+ *
*
* @since 5.6.0
*/
- public void setAdvancedHSearchIndexing(boolean theAdvancedHSearchIndexing) {
- this.myAdvancedHSearchIndexing = theAdvancedHSearchIndexing;
+ public void setHibernateSearchIndexSearchParams(boolean theAdvancedHSearchIndexing) {
+ this.myHibernateSearchIndexSearchParams = theAdvancedHSearchIndexing;
+ }
+
+ /**
+ * Is hibernate search indexing of fulltext data from resources enabled?
+ * This setting activates hibernate search indexing of fulltext data from resources, which
+ * is used to support the {@literal _text} and {@literal _content} Search Parameters.
+ *
+ * @since 8.0.0
+ */
+ public boolean isHibernateSearchIndexFullText() {
+ return myHibernateSearchIndexFullText;
+ }
+
+ /**
+ * Activates hibernate search indexing of fulltext data from resources, which
+ * is used to support the {@literal _text} and {@literal _content} Search Parameters.
+ *
+ * @since 8.0.0
+ */
+ public void setHibernateSearchIndexFullText(boolean theHibernateSearchIndexFullText) {
+ myHibernateSearchIndexFullText = theHibernateSearchIndexFullText;
}
/**
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 5d7b84d9166..bd2eccc753c 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 0e9b15d163c..88cb576d513 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index c5746e3c44c..565a7330300 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index c943eced69f..bec073ebccc 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 18f8947f121..b50caa47f60 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml
index 4f566773c50..03a387dfd35 100644
--- a/hapi-fhir-structures-r4b/pom.xml
+++ b/hapi-fhir-structures-r4b/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 2ae8c634a99..bb9ff2ae0c6 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index ba0f6dd23f6..83d1886e4f3 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index 4bbf45129fa..7180bb324f6 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index ca4059aaa31..bce3561132f 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index 064225caa85..68a15102c68 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index 49758416c31..55d2e0499cb 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index f0758bf8574..c44085a5642 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml
index 386922144d3..348ecbf35e5 100644
--- a/hapi-fhir-validation-resources-r4b/pom.xml
+++ b/hapi-fhir-validation-resources-r4b/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index fc459c91179..2253e34fc20 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 92d2e60b49f..ead5bea633f 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 05c3fdd10cb..b5b686ad4a3 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index d23e4b65b07..1f7f99918e9 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 0e12614c049..43908f53265 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
@@ -1283,7 +1283,7 @@
com.h2database
h2
- 2.2.224
+ 2.3.232
com.helger.commons
@@ -2664,7 +2664,7 @@
ca.uhn.hapi.fhir
hapi-tinder-plugin
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index ed677e14d85..a25642b475f 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index ac51bfd2625..1382613c55e 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 3b4df9e63cd..2b96cb11cb2 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 7.7.12-SNAPSHOT
+ 7.7.13-SNAPSHOT
../../pom.xml