move elasticsearch connection to the model, add configuration settings for elasticsearch to the config directory