I want to delete all the previously created indices. I am using Lucene.net.
Lucene.net
I tried the following:
Term term = new Term
As Jokin said, the easiest was is to delete all of the files within the directory. i.e.;
DirectoryInfo directoryInfo = new DirectoryInfo(@"IndexLocation"); Parallel.ForEach(directoryInfo.GetFiles(), file => { file.Delete(); });