You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When updating a search parameter, if the Resources's normalized String (ex: last name) starts with the same letter under the new algorithm as the old, the update will not happen and searches will only work under the old normalized String. If the first letter is different, searching works as expected.
To Reproduce
Steps to reproduce the behavior:
Create a phonetic search parameter "query-1-param" for Patient resource using the search algorithm "DOUBLE_METAPHONE" with expression "expression": "name.family | name.given.first() | telecom.where(system='email').value.first()"
Create a patient with a first name and last name of "John Doe"
Update/PUT that index to a new algorithm: "NYSIIS_LONG"
Create another patient with a first name and last name of "John Doe"
Trigger a reindex on all resources or all patient resources
Search on query-1-param of "JAN" (the new normalized String.
Expected behavior
Searching on JAN should return both patients. In this case, it only returns the first patient.
Screenshots
N/A
Environment (please complete the following information):
Latest hapi-fhir in master
Additional context
The normalized Strings in table/column hfj_spidx_string.sp_value_normalized are the following:
old algorithm:
first: JN
last. T
new algorithm:
first: JAN
last: D
Because of the equals/hashCode implementation and the normalized hash String, which takes into account only the single letter, the search parameter update from "JN" to "JAN" will not be recognized as a difference, and the database row will remain as "JN" for the second patient after reindexing, whereas it should have been updated to "JAN"
The text was updated successfully, but these errors were encountered:
NOTE: Before filing a ticket, please see the following URL:
https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help
Describe the bug
When updating a search parameter, if the Resources's normalized String (ex: last name) starts with the same letter under the new algorithm as the old, the update will not happen and searches will only work under the old normalized String. If the first letter is different, searching works as expected.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Searching on JAN should return both patients. In this case, it only returns the first patient.
Screenshots
N/A
Environment (please complete the following information):
Additional context
The normalized Strings in table/column hfj_spidx_string.sp_value_normalized are the following:
old algorithm:
first: JN
last. T
new algorithm:
first: JAN
last: D
Because of the equals/hashCode implementation and the normalized hash String, which takes into account only the single letter, the search parameter update from "JN" to "JAN" will not be recognized as a difference, and the database row will remain as "JN" for the second patient after reindexing, whereas it should have been updated to "JAN"
The text was updated successfully, but these errors were encountered: