Is there any way by which I can delete the index file created by the Zend_Search_Lucene? If its not possible kindly suggest a method to delete the indexed data. I've tried it from the code. But failed. And when I tried to delete the index file from the Zend Studio its giving me an error as "Resource is out of sync with the system". I couldn't even do it from the applications folder. Please, can any one help me?
$hits = $index->find('path:' . $indexpath);
foreach ($hits as $key =>$hit)
{
$index->delete($key);
}
$indexSize = $index->count();
$documents = $index->numDocs();
for ($count = 0; $count < $index->maxDoc(); $count++)
{
if ($index->isDeleted($count))
{
echo "Document deleted.\n";
}
}