Add method to create a document from a model instance
Add event listeners for tracking ORM events for indices.