Refactor mapping of mongodb operations to elasticsearch

Elasticsearch doesn't have to know how mongodb works or where the
documents come from.