From aae4e4ab61deab595a6cbcf275b7cce0ae93645f Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 3 May 2010 18:11:19 +0300 Subject: [PATCH] if not deleting an index, don't delete the gateway data... --- .../org/elasticsearch/index/gateway/fs/FsIndexGateway.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexGateway.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexGateway.java index 5ca6dbdfb19..20254fb1efb 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexGateway.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/gateway/fs/FsIndexGateway.java @@ -86,6 +86,9 @@ public class FsIndexGateway extends AbstractIndexComponent implements IndexGatew } @Override public void close(boolean delete) { + if (!delete) { + return; + } try { String[] files = indexGatewayHome.list(); if (files == null || files.length == 0) {