Skip to content
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

Merged
merged 14 commits into from
Jan 16, 2025

Conversation

epeartree
Copy link
Collaborator

@epeartree epeartree commented Dec 18, 2024

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:

  • Modified class 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;
  • added utility method and comment to return a prefix of 'equal' when performing computation based on prefix value;
  • Modified class SearchBuilder to allow combo indexes inspection when a date query string is prefixed with 'eq';
  • Added a unit test to class FhirResourceDaoR4ComboNonUniqueParamTest;
  • added changelog;

…x. The purpose is to run the 'fix' through the pipelines to see what fails.
Copy link

github-actions bot commented Dec 18, 2024

Formatting check succeeded!

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.50%. Comparing base (406db33) to head (106c0ce).
Report is 162 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jmarchionatto jmarchionatto left a 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.

@epeartree epeartree dismissed jmarchionatto’s stale review January 16, 2025 13:07

changes were made and approved

@epeartree epeartree merged commit 69cb38f into master Jan 16, 2025
65 of 67 checks passed
@epeartree epeartree deleted the ehp_20241218-dateParam branch January 16, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combo Index Search Parameter functionality does not work correctly with date query parameter values
3 participants