create index and mapping.