Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-6007

When save person attribute type, only update search index if "searchable" property is saved

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Core 2.4.1, Core 2.3.4, Core 2.5.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      When saving a Person Attribute Type, the PersonAttributeType search index is updated (because the searchable property of that attribute may have changed):

      https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/api/impl/PersonServiceImpl.java#L187

      For databases with large numbers of persons/patients, rebuilding the search could take 20-30 minutes (or more).

      So, we should explicitly test if the searchable property has changed, and only update the index if this is the case.

      (Ideally, the index update could be asynchronous as well, but we can handle that in a separate ticket)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              mogoodrich Mark Goodrich
              Reporter:
              mogoodrich Mark Goodrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: