+ -
当前位置:首页 → 问答吧 → 急切!!关于使用zf的search lucene创建索引的问题

急切!!关于使用zf的search lucene创建索引的问题

时间:2007-08-10

来源:互联网

在从数据库取出数据创建索引过程中

$index->addDocument($doc);  

在添加到几百条数据的时候就会报错,错误信息如下:

Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'rename(index/segments.new,index/segments) [<a href='function.rename'>function.rename</a>]: Permission denied' in F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene\Storage\Directory\Filesystem.php:255 Stack trace: #0 F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene\Index\Writer.php(393): Zend_Search_Lucene_Storage_Directory_Filesystem->renameFile('segments.new', 'segments') #1 F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene\Index\Writer.php(443): Zend_Search_Lucene_Index_Writer->_updateSegments() #2 F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene\Index\Writer.php(223): Zend_Search_Lucene_Index_Writer->commit() #3 F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene.php(978): Zend_Search_Lucene_Index_Writer->addDocument(Object(Zend_Search_Lucene_Document)) #4 C:\Program Files\ASF\Apache2.2\htdocs\zf\createindex.php(52): Zend_Search_Lucene->addDocum in F:\work\tools\ForLinux\ZendFramework-1.0.1\library\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 255

请问有谁知道原因嘛?怎么解决?

谢谢。

作者: williamlu1981   发布时间: 2007-08-10

从报错的结果上来看似乎是权限不足~~~你的 index 生成用的 cli 么?

作者: mikespook   发布时间: 2007-08-10

我就是按照zf的说明做的
$index = new Zend_Search_Lucene('index', true);

作者: williamlu1981   发布时间: 2007-08-10

自己解决了
原来是卡巴斯基惹得祸~~~
:@

作者: williamlu1981   发布时间: 2007-08-10

热门下载

更多