}
public void recreateIndex() {
deleteIndex();
final Client client = this.getClient();
final InputStream mappings = Thread.currentThread().getContextClassLoader().getResourceAsStream("mappings.json");
final InputStream index_settings = Thread.currentThread().getContextClassLoader().getResourceAsStream("index_settings.json");
try {
client.admin().indices().prepareCreate("photon").setSettings(IOUtils.toString(index_settings)).execute().actionGet();
client.admin().indices().preparePutMapping("photon").setType("place").setSource(IOUtils.toString(mappings)).execute().actionGet();
} catch(IOException e) {
log.error("cannot setup index, elastic search config files not readable", e);
}
}