elasticsearch fixes; metadata compiler fixes