I'm getting the same type of errors:

Got some weird results when trying to add documents to an index.

Have a table with 200 000 records.
I query the database and loop through the records and tries to add docs to
the index using these lines:

$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::Keyword('docid', $row['IMA_ID']));
$doc->addField(Zend_Search_Lucene_Field::UnStored('words',
$row['IMA_TEXT']));
$index->addDocument($doc);

IMA_ID is integer
IMA_TEXT are the words to be indexed

Have tried several times to get it to work, but it allways stops after a
short time.
Below are the errors I got:

Obviously this has been reported before... so it is not only me experiencing
these problems?
Using Zend Framework 0.8.0, on Win XP, and apache 2....

Why is this happening?

On first run I got this error:
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'fopen(c:/lucene/lucene/segments) 
[ function.fopen function.fopen ]: failed to open stream: Permission denied'
in 
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php:63
Stack trace: 
#0
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\Directory\Filesystem.php(278):
Zend_Search_Lucene_Storage_File_Filesystem->__construct('c:/lucene/lucen...') 
#1 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(480):
Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('segments',
false) 
#2 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(217):
Zend_Search_Lucene_Index_Writer->_newSegmentName() 
#3 C:\www\htdocs\ZendFramework\Zend\Search\Lucene.php(915):
Zend_Search_Lucene_Index_Writer->addDocument(Object(Zend_Search_Lucene_Document))
 
#4 C:\www\htdocs\lucene\lucene-test.php(241):
Zend_Search_Lucene->addDocument(Object(Zend_Search_Lucene_Document)) 
#5 {main} thrown in
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php
on line 63

**********************************************************
Now I start count successful $index->addDocument($doc); 
and write the counter to a file to see how far it gets before bailing out
**********************************************************

Second run 
This time 1001 docs where added before failure):
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'fopen(c:/lucene/lucene/segments) 
[ function.fopen function.fopen ]: failed to open stream: Permission denied'
in 
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php:63
Stack trace: 
#0
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\Directory\Filesystem.php(278):
Zend_Search_Lucene_Storage_File_Filesystem->__construct('c:/lucene/lucen...') 
#1 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(480):
Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('segments',
false) 
#2 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(217):
Zend_Search_Lucene_Index_Writer->_newSegmentName() 
#3 C:\www\htdocs\ZendFramework\Zend\Search\Lucene.php(915):
Zend_Search_Lucene_Index_Writer->addDocument(Object(Zend_Search_Lucene_Document))
 
#4 C:\www\htdocs\lucene\lucene-test.php(269):
Zend_Search_Lucene->addDocument(Object(Zend_Search_Lucene_Document)) 
#5 {main} thrown in
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php
on line 63

Third run:
This time 1170 docs where added before failure
and a blank page where sent to client... weird!

Fourth run:
This time 1001 docs where added before failure
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'fopen(c:/lucene/lucene/segments) 
[ function.fopen function.fopen ]: failed to open stream: Permission denied'
in 
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php:63
Stack trace: 
#0
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\Directory\Filesystem.php(278):
Zend_Search_Lucene_Storage_File_Filesystem->__construct('c:/lucene/lucen...') 
#1 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(480):
Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('segments',
false) 
#2 C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Index\Writer.php(217):
Zend_Search_Lucene_Index_Writer->_newSegmentName() 
#3 C:\www\htdocs\ZendFramework\Zend\Search\Lucene.php(915):
Zend_Search_Lucene_Index_Writer->addDocument(Object(Zend_Search_Lucene_Document))
 
#4 C:\www\htdocs\lucene\lucene-test.php(269):
Zend_Search_Lucene->addDocument(Object(Zend_Search_Lucene_Document)) 
#5 {main} thrown in
C:\www\htdocs\ZendFramework\Zend\Search\Lucene\Storage\File\Filesystem.php
on line 63
-- 
View this message in context: 
http://www.nabble.com/Zend_Search_Lucene-errors-tf3205213s16154.html#a9203404
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to