Fix ES API
Add first draft for ES sample