SessionCache systemCache = repository.createSystemSession(context, false);
SystemContent system = new SystemContent(systemCache);
for (String indexName : indexNames) {
IndexDefinition defn = indexes.getIndexDefinitions().get(indexName);
if (defn == null) {
throw new NoSuchIndexException(JcrI18n.indexDoesNotExist.text(indexName, repository.name()));
}
system.remove(defn);
}
system.save();