Zend Lucene Delete Document Issue

For programming and general questions on Zend Framework

Zend Lucene Delete Document Issue

Postby pramodrs on Fri Dec 28, 2012 12:57 pm

I am trying to delete a document using zend lucene. The following is my code

$index = Zend_Search_Lucene::open('data/index');
foreach ($index->find('pk:' . $this->getId()) as $hit) {
$index->delete($hit->id);
}
$index->commit();
When I run this and checked my index folder there is a new file created like this _f4t5_1.del

But when I do a search, the deleted document is available in the search and also checked the

$index->numDocs();

This method also returns the same count before and after delete.

Any help is appreciated.
pramodrs
 
Posts: 1
Joined: Fri Dec 28, 2012 12:55 pm

Return to Zend Framework

Who is online

Users browsing this forum: Google [Bot] and 5 guests