Added method to create mapping for field before indexing