private static bool DeleteIndex(string indexName)
{
// Delete the index if it exists
try
{
_searchClient.Indexes.Delete(indexName);
}
catch (Exception ex)
{
Console.WriteLine("Error deleting index: {0}\r\n", ex.Message.ToString());
Console.WriteLine("Did you remember to add your SearchServiceName and SearchServiceApiKey to the app.config?\r\n");
return false;
}
return true;
}