When adding charms or bundles to mongo, index in ES if configured.

Also add EnsureID to ElasticSearch.
Isn't entity already a pointer?
So we are passing the address of the pointer type?