Put mapping on init_app.

For some features of elastic like facets or date ranges we have to put
mapping before inserting any documents.