Event creation and indexing in elasticsearch