diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/SearchBundleEntryParts.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/SearchBundleEntryParts.java index e8f97336610..70eb0b63f69 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/SearchBundleEntryParts.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/bundle/SearchBundleEntryParts.java @@ -30,10 +30,10 @@ public class SearchBundleEntryParts { public SearchBundleEntryParts(String theFullUrl, IBaseResource theResource, String theSearchMode) { myFullUrl = theFullUrl; myResource = theResource; - if ("match".equalsIgnoreCase(theSearchMode)) { - mySearchMode = BundleEntrySearchModeEnum.MATCH; - } else { + if (BundleEntrySearchModeEnum.INCLUDE.getCode().equalsIgnoreCase(theSearchMode)) { mySearchMode = BundleEntrySearchModeEnum.INCLUDE; + } else { + mySearchMode = BundleEntrySearchModeEnum.MATCH; } } diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4987-searchbundle-parts-are-labeled-by-default-as-include-instead-of-match.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4987-searchbundle-parts-are-labeled-by-default-as-include-instead-of-match.yaml new file mode 100644 index 00000000000..9fd9b211760 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_8_0/4987-searchbundle-parts-are-labeled-by-default-as-include-instead-of-match.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 4987 +title: "Search bundle entry parts were being created as `INCLUDE` unless explicitly indicated as `MATCH`. + This has been fixed. Now they are created as `MATCH` unless explicitly indicated as `INCLUDE`."