finish elasticsearch configuration