create index and mapping first to ensure all relevant nodes see the mapping