fix #399 : call flush of elasticsearch

This commit is contained in:
Shinsuke Sugaya 2016-02-28 19:10:31 +09:00
parent 8085e1752d
commit 63057b9a10

View file

@ -444,6 +444,11 @@ public class FessEsClient implements Client {
@Override
@PreDestroy
public void close() {
try {
client.admin().indices().prepareFlush().setForce(true).execute().actionGet();
} catch (Exception e) {
logger.warn("Failed to flush indices.", e);
}
try {
client.close();
} catch (final ElasticsearchException e) {