Hi,
I am trying to implement Zend_Search_Lucene on our site.
I am trying to create the index like this.
function updateAction(){
set_time_limit(0);
$index = Zend_Search_Lucene::create('./system/search/my-index');
$products = new Products();
$productsRS = $products->fetchAll();
foreach($productsRS as $product){
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::Keyword('productTitle',$product->productTitle));
$index->addDocument($doc);
}
$index->commit();
}
but usually I get
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with
message
'rename(./system/search/my-index/segments.new,./system/search/my-index/segments)
message. Once I just refreshed and it created the index without further
error. I managed to browse the index using Luke.
PS: This is a windows xp machine with full permission for everyone on
"my-index" directory.