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

    • Enhancement
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.4.1, Core 2.3.4, Core 2.5.0
    • None
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: