Make elasticsearch optional