From 5718e27fcf472a4c360fd4b091f58ab007f1859e Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 19 May 2010 22:00:27 +0300 Subject: [PATCH] add clean index to indices --- .../main/java/org/elasticsearch/indices/IndicesService.java | 5 +++++ .../org/elasticsearch/indices/InternalIndicesService.java | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/IndicesService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/IndicesService.java index ab10216f454..323d8520b18 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/IndicesService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/IndicesService.java @@ -60,4 +60,9 @@ public interface IndicesService extends Iterable, LifecycleCompone IndexService createIndex(String index, Settings settings, String localNodeId) throws ElasticSearchException; void deleteIndex(String index) throws ElasticSearchException; + + /** + * Cleans the index without actually deleting any content for it. + */ + void cleanIndex(String index) throws ElasticSearchException; } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java index dc7a8bf2272..5b2606a043f 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/indices/InternalIndicesService.java @@ -201,7 +201,11 @@ public class InternalIndicesService extends AbstractLifecycleComponent