Custom elasticsearch api.