diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchIndexExtractor.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchIndexExtractor.java index 989b3fb1395..3b212338602 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchIndexExtractor.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchIndexExtractor.java @@ -77,8 +77,10 @@ public class ExtendedHSearchIndexExtractor { } @Nonnull - public ExtendedHSearchIndexData extract(IBaseResource theResource, ResourceTable theEntity, ResourceIndexedSearchParams theNewParams) { - ExtendedHSearchIndexData retVal = new ExtendedHSearchIndexData(myContext, myJpaStorageSettings, theResource, theEntity); + public ExtendedHSearchIndexData extract( + IBaseResource theResource, ResourceTable theEntity, ResourceIndexedSearchParams theNewParams) { + ExtendedHSearchIndexData retVal = + new ExtendedHSearchIndexData(myContext, myJpaStorageSettings, theResource, theEntity); if (myJpaStorageSettings.isStoreResourceInHSearchIndex()) { retVal.setRawResourceData(myContext.newJsonParser().encodeResourceToString(theResource)); @@ -116,7 +118,6 @@ public class ExtendedHSearchIndexExtractor { .filter(nextParam -> !nextParam.isMissing()) .forEach(nextParam -> retVal.addUriIndexData(nextParam.getParamName(), nextParam.getUri())); - theEntity.getTags().forEach(tag -> { TagDefinition td = tag.getTag(); @@ -148,15 +149,10 @@ public class ExtendedHSearchIndexExtractor { retVal.addCompositeIndexData(nextParam.getSearchParamName(), buildCompositeIndexData(nextParam))); if (theEntity.getUpdated() != null && !theEntity.getUpdated().isEmpty()) { - int ordinal = ResourceIndexedSearchParamDate.calculateOrdinalValue( - theEntity.getUpdatedDate()) + int ordinal = ResourceIndexedSearchParamDate.calculateOrdinalValue(theEntity.getUpdatedDate()) .intValue(); retVal.addDateIndexData( - "_lastUpdated", - theEntity.getUpdatedDate(), - ordinal, - theEntity.getUpdatedDate(), - ordinal); + "_lastUpdated", theEntity.getUpdatedDate(), ordinal, theEntity.getUpdatedDate(), ordinal); } if (!theNewParams.myLinks.isEmpty()) { diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java index daa2bb55dcb..c9b659e5def 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/ExtendedHSearchSearchBuilder.java @@ -111,7 +111,7 @@ public class ExtendedHSearchSearchBuilder { } else { // are the parameter values supported? canUseHibernate = - theParams.get(paramName).stream() + theParams.get(paramName).stream() .flatMap(Collection::stream) .collect(Collectors.toList()) .stream() @@ -164,9 +164,9 @@ public class ExtendedHSearchSearchBuilder { DateRangeParam lastUpdated = theMap.getLastUpdated(); return lastUpdated.getLowerBound() != null - && isParamTypeSupported(lastUpdated.getLowerBound()) - && lastUpdated.getUpperBound() != null - && isParamTypeSupported(lastUpdated.getUpperBound()); + && isParamTypeSupported(lastUpdated.getLowerBound()) + && lastUpdated.getUpperBound() != null + && isParamTypeSupported(lastUpdated.getUpperBound()); } /** diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ExtendedHSearchIndexData.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ExtendedHSearchIndexData.java index ae65a22d23a..ef8f9967286 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ExtendedHSearchIndexData.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ExtendedHSearchIndexData.java @@ -61,10 +61,10 @@ public class ExtendedHSearchIndexData { private ResourceTable myEntity; public ExtendedHSearchIndexData( - FhirContext theFhirContext, - StorageSettings theStorageSettings, - IBaseResource theResource, - ResourceTable theEntity) { + FhirContext theFhirContext, + StorageSettings theStorageSettings, + IBaseResource theResource, + ResourceTable theEntity) { this.myFhirContext = theFhirContext; this.myStorageSettings = theStorageSettings; myResource = theResource;