RTGOV-467 Sort out elasticsearch mapping initialization conflict from mu...

...ltiple threads, and some build issues