Fix test initialisation to work better with ElasticSearch.

Creating the index and mapping was broken before.
Merge commit 'd033f74'