android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Add support for reindexing old data whenever new custom SearchParameter are added

Open LZRS opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Whenever custom SearchParameters are changed, new data saved/updated to the DB would have their fields indexed but previously saved data wouldn't. Searches performed would then lead to partial results. Workarounds for this have been getting all currently saved resources and re-saving them back to the DB

Describe the solution you'd like Have an interface method that could configure reindexing of old data

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Relates to https://github.com/google/android-fhir/issues/2769

Would you like to work on the issue? Yes

LZRS avatar Jan 16 '25 11:01 LZRS

This is not so trivial. What is the priority for this feature?

Also on first thoughts, i guess this can require search-param-state management (versioning and/or db table). Any thoughts on this or other solutions in mind @LZRS ?

MJ1998 avatar Jan 19 '25 13:01 MJ1998

This is not so trivial. What is the priority for this feature?

I'd say it's of medium priority at the moment

Also on first thoughts, i guess this can require search-param-state management (versioning and/or db table). Any thoughts on this or other solutions in mind @LZRS ?

Yeah, I was also thinking along the same lines, to use a db table for the state management. But looking at other implementations such as this one, maybe it might be easier to just add a FhirEngine reindex interface method that would take some parameters and schedule a reindex job.

LZRS avatar Jan 20 '25 11:01 LZRS