add clean index to indices
This commit is contained in:
parent
d1acef1e09
commit
5718e27fcf
|
@ -60,4 +60,9 @@ public interface IndicesService extends Iterable<IndexService>, 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;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,11 @@ public class InternalIndicesService extends AbstractLifecycleComponent<IndicesSe
|
|||
return indexService;
|
||||
}
|
||||
|
||||
public synchronized void deleteIndex(String index) throws ElasticSearchException {
|
||||
@Override public synchronized void cleanIndex(String index) throws ElasticSearchException {
|
||||
deleteIndex(index, false);
|
||||
}
|
||||
|
||||
@Override public synchronized void deleteIndex(String index) throws ElasticSearchException {
|
||||
deleteIndex(index, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue