-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed an issue with the _lastUpdated search param not being recognised as a valid sort spec with Elastic Search enabled. #6670
Fixed an issue with the _lastUpdated search param not being recognised as a valid sort spec with Elastic Search enabled. #6670
Conversation
Formatting check succeeded! |
…d as a valid sort spec with Hsearch enabled in CDR
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rel_8_0 #6670 +/- ##
==========================================
Coverage ? 83.58%
Complexity ? 28638
==========================================
Files ? 1798
Lines ? 111325
Branches ? 13979
==========================================
Hits ? 93052
Misses ? 12268
Partials ? 6005 ☔ View full report in Codecov by Sentry. |
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Outdated
Show resolved
Hide resolved
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Outdated
Show resolved
Hide resolved
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Outdated
Show resolved
Hide resolved
...-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImplTest.java
Outdated
Show resolved
Hide resolved
...-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImplTest.java
Outdated
Show resolved
Hide resolved
...-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImplTest.java
Show resolved
Hide resolved
...ver-test-r4/src/test/java/ca/uhn/fhir/jpa/provider/r4/TerminologyUploaderProviderR4Test.java
Show resolved
Hide resolved
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Outdated
Show resolved
Hide resolved
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Show resolved
Hide resolved
...-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImplTest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, u'll need a changelog. ping me when u get to this.
Right so I do have one on the CDR side but wasn't sure on how to go about the HAPI side since the bug was reported on CDR. Do I use the same ticket number for the .yaml file? Should it have the same content? |
...ources/ca/uhn/hapi/fhir/changelog/7_8_0/6697-missing-search-params-with-hsearch-enabled.yaml
Show resolved
Hide resolved
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Show resolved
Hide resolved
...-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImplTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address
Addressed! |
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/search/HSearchSortHelperImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last one
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work, thanks for sticking with it till the completion.
With HSearch enabled and automatic support of default search params turned off, it is observed that a lot of search parameters are missing from the SearchParamRegistry which results in the error 500
HAPI-0389
: Failed to call access method: org.springframework.dao.InvalidDataAccessApiUsageException:HAPI-2523
: Invalid sort specification:_lastUpdated
when using the$apply-codesystem-delta-add
operation.A fall back was added in
HSearchSortHelperImpl.getParamType()
to account for these missing search params.Closes #6697