Updating and refactoring elasticsearch methods into the service instead