вам нужно удалить запись перед ее обновлением, так работает Lucene.Вы не можете обновлять существующую запись.
это то, как вы удаляете запись
$index = Zend_Search_Lucene::open('data/index');//'data/index' is the file that lucene generated
$query = new Zend_Search_Lucene_Search_Query_Term(new
Zend_Search_Lucene_Index_Term($listing_id, 'listing_id'));// 'listing_id' is a field i added when creating index for the first time. $listing_id is the id value of the row i want to delete
$hits = $index->find($query);
foreach ($hits as $hit) {
$index->delete($hit->id);// $hit->id is not listing_id, it's lucene unique index of the row that has listing_id = $listing_id
}
Теперь вы можете сделать обновление, которое по сути является вставкой :), так работает lucene.