servinglynk / hslynk-open-source-docs

Contains wiki documentation, and issue tracker for the HSLynk Open Human Services Data Exchange Platform project. Code is in a different repo: https://github.com/servinglynk/hslynk-open-source . API docs are at https://docs.hslynk.com . General website is at:
http://www.hslynk.com/
Mozilla Public License 2.0
9 stars 3 forks source link

Search returns duplicate records after purging the reloading the data #903

Closed logicsandeep closed 3 years ago

logicsandeep commented 3 years ago

I recently purged that data from project group TT0013 and reuploaded the data. After calling the search API I discovered 2 records for certain clients. API: https://api.hslynk.com/hmis-clientapi/rest/search/clients?q=snow+Straw&startIndex=0&maxItems=30 I did not expect to see client to id : ae40aa03-2bf0-431d-976f-52c16606fe62

I also understand what is the root cause here. We need to purge records in the ES database when we purge records in the hmis db. Acceptance Criteria: We need API/process to refresh data in ES to meet the following acceptance criteria

  1. Delete records from ES by projectGroupCode, I suspect we still might be having data related to purged project group in ES.
  2. Delete data by a date range for a project group in ES.
logicsandeep commented 3 years ago

This issue is fixed. via data migration and cleaning up ES database.