diff --git a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java index 1004e9d785b..750b6188b65 100644 --- a/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java +++ b/hapi-fhir-jpaserver-searchparam/src/main/java/ca/uhn/fhir/jpa/searchparam/extractor/BaseSearchParamExtractor.java @@ -319,20 +319,6 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.URI); } -// @Override -// public SearchParamSet extractSearchParamCoords(IBaseResource theResource) { -// IExtractor extractor = (params, searchParam, value, path) -> { -// if (value.getClass().equals(myLocationPositionDefinition.getImplementingClass())) { -// String resourceType = toRootTypeName(theResource); -// addCoords_Position(resourceType, params, searchParam, value); -// } else { -// addUnexpectedDatatypeWarning(params, searchParam, value); -// } -// }; -// -// return extractSearchParams(theResource, extractor, RestSearchParameterTypeEnum.TOKEN); -// } - @Override public SearchParamSet extractSearchParamDates(IBaseResource theResource) { IExtractor extractor = (params, searchParam, value, path) -> { @@ -396,6 +382,10 @@ public abstract class BaseSearchParamExtractor implements ISearchParamExtractor public SearchParamSet extractSearchParamQuantity(IBaseResource theResource) { IExtractor extractor = (params, searchParam, value, path) -> { + if (value.getClass().equals(myLocationPositionDefinition.getImplementingClass())) { + return; + } + String nextType = toRootTypeName(value); String resourceType = toRootTypeName(theResource); switch (nextType) { diff --git a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java index 9607d7594e7..85e82cd36ef 100644 --- a/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java +++ b/hapi-fhir-jpaserver-searchparam/src/test/java/ca/uhn/fhir/jpa/searchparam/extractor/SearchParamExtractorMegaTest.java @@ -191,7 +191,7 @@ public class SearchParamExtractorMegaTest { theIndexesCounter.addAndGet(set.size()); set = theExtractor.extractSearchParamQuantity(resource); - assertEquals(0, set.getWarnings().size()); + assertEquals(String.join("\n", set.getWarnings()), 0, set.getWarnings().size()); theIndexesCounter.addAndGet(set.size()); set = theExtractor.extractSearchParamTokens(resource);