I'm using Zend_Search_Lucene, in a standalone project not based on ZF. I index content successfully, and search them also, but the problem is that it cannot create the .fnm files
here is the code I am using
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8');
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8_CaseInsensitive());
$this->index = Zend_Search_Lucene::create(self::PATH_INDEX);
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::keyword('id',$content['id'],'UTF-8'));
$doc->addField(Zend_Search_Lucene_Field::text('summary',$summary,'UTF-8'));
$doc->addField(Zend_Search_Lucene_Field::keyword('module',$module,'UTF-8'));
$this->index->addDocument($doc);
I have also tried
$doc->addField(Zend_Search_Lucene_Field::keyword('module',utf_encode($module),'UTF-8'));
My content is searchable but I dunno why it doesn't create the fnm files, it creates the rest like cfs files and fdx, locks, segments ...etc so it's not a directory or permissions problem, the problem is with the locks I guess.
Here is the exception
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'fopen(dict/_1.fnm): failed to open stream: No such file or directory' in Zend/Search/Lucene/Storage/File/Filesystem.php on line 67
Zend_Search_Lucene_Exception: fopen(dict/_1.fnm): failed to open stream: No such file or directory in Zend/Search/Lucene/Storage/File/Filesystem.php on line 67
Call Stack:
0.0882 7819976 1. Zend_Search_Lucene_Proxy->__destruct() Zend/Search/Lucene/Proxy.php:0
0.0882 7819976 2. Zend_Search_Lucene->removeReference() Zend/Search/Lucene/Proxy.php:63
0.0882 7819976 3. Zend_Search_Lucene->_close() Zend/Search/Lucene.php:607
0.0882 7819976 4. Zend_Search_Lucene->commit() Zend/Search/Lucene.php:569
0.0882 7819976 5. Zend_Search_Lucene_Index_Writer->commit() Zend/Search/Lucene.php:1419
0.0882 7819976 6. Zend_Search_Lucene_Index_SegmentWriter_DocumentWriter->close() Zend/Search/Lucene/Index/Writer.php:757
0.0882 7819976 7. Zend_Search_Lucene_Index_SegmentWriter->_dumpFNM() Zend/Search/Lucene/Index/SegmentWriter/DocumentWriter.php:212
0.0882 7820112 8. Zend_Search_Lucene_Storage_Directory_Filesystem->createFile(???) Zend/Search/Lucene/Index/SegmentWriter.php:280
0.0882 7820912 9. Zend_Search_Lucene_Storage_File_Filesystem->__construct(???, ???) Zend/Search/Lucene/Storage/Directory/Filesystem.php:184
Anyhelp will be really appreciated