I want to index a field using mongodb-erlang (https://github.com/comtihon/mongodb-erlang). The sample code works in shell but crashed when i called from code. Anyone have an idea about this issue? I'm using mongo 2.6.5
mongo:ensure_index(DBConn, conversations, {key, {page_id, 1}, unique, true, dropDups, true})
Thanks
I have used mongodb-erlang for more than one year, and the sample code is as follows: