}
public void deleteIndex(final String indexName) throws Exception {
//set this up so we can wait for it later
final CountDownLatch latch = new CountDownLatch(1);
indexerModel.getIndexers(new IndexerModelListener() {
@Override
public void process(IndexerModelEvent event) {
if (indexName.equals(event.getIndexerName())
&& IndexerModelEventType.INDEXER_DELETED.equals(event.getType())) {
latch.countDown();