Lucene indexes are built if the value for global property search.indexVersion is different from OpenmrsConstatnts.SEARCH_INDEX_VERSION. However in Context.java in public synchronized static void startup(Properties props) by the time getContextDAO().setupSearchIndex() call is made, omods are not yet up. Any concept, that is created through a migration task in any of the omods, is not indexed. Is it the expected behaviour?
In Bahmni we create few concepts through migrations. So we will now have to rebuild indexes from UI. On productions dumps(with ~ 5 lakh patients) it takes 45 min to rebuild indexes. Indexing happens fine in the backend but as it takes 45 min, there is a time out issue which raises a false alarm saying “There was a problem rebuilding search index” on UI even though it is still indexing in the backend. So the users will have to randomly try searching concepts/patients to check if indexing is done.
Can you please suggest if there is a better way to get around this? @raff @dkayiwa @darius