change all the method in order to use the new elasticsearach engine