-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Issue with combo index search parameter when using date #6566
Conversation
…x. The purpose is to run the 'fix' through the pipelines to see what fails.
Formatting check succeeded! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6566 +/- ##
============================================
- Coverage 83.54% 83.50% -0.05%
- Complexity 27432 28560 +1128
============================================
Files 1707 1797 +90
Lines 106185 111142 +4957
Branches 13397 13961 +564
============================================
+ Hits 88710 92804 +4094
- Misses 11750 12351 +601
- Partials 5725 5987 +262 ☔ View full report in Codecov by Sentry. |
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.
Fix looks good, but there is no test for the specific point of the fix, which is that the combo search is now considered. Please add test for that case.
...sources/ca/uhn/hapi/fhir/changelog/7_8_0/6603-combo-index-sp-not-invoked-with-dateparam.yaml
Outdated
Show resolved
Hide resolved
hapi-fhir-structures-r4/src/test/java/ca/uhn/fhir/rest/param/DateRangeParamR4Test.java
Show resolved
Hide resolved
...sources/ca/uhn/hapi/fhir/changelog/7_8_0/6603-combo-index-sp-not-invoked-with-dateparam.yaml
Outdated
Show resolved
Hide resolved
...r-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ComboNonUniqueParamTest.java
Outdated
Show resolved
Hide resolved
changes were made and approved
the problem:
Given a combo index search parameters configured with a date search parameter components, combo index searching is skipped when a date query parameter value is submitted to the search stack.
root cause:
The root cause of the problem is that when we marshal query string 'birthdate=2021-01-01' into a DateRangeParam before submission to the search layer, a default prefix of 'EQUAL' is assigned to both DateParam objects encapsulated by the dateRangeParam. Due to the presence of the prefix, the search layer skips combo indexes inspection.
The issue described above evolved into harmonising the search logic behaviour in favour of allowing combo indexes inspection even with the 'eq' prefix since date=2021-01-01 is equivalent to date=eq2021-01-01 searches.
what was done:
DateRangeParam
to not default the prefix to 'EQUAL' as doing so would make it impossible for indexes created by a combo search index parameters to be queried during searches;