How to use the erlang client for elastic search (example code)?

Hi all,

have anyone used the erlang client for elastic search as below:

i am confused on how to use the erlang api, it would be great if there is example code to demo how to use it.

thanks,
-zhisun