Question

Hi guys working with Zend search lucene and im getting the following warning and error:

   Warning: require_once(Zend/Search/Lucene/Storage/File/Filesystem.php): failed to open stream: No such file or directory in G:\xampp\htdocs\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 349

Fatal error: require_once(): Failed opening required 'Zend/Search/Lucene/Storage/File/Filesystem.php' (include_path='.;\xampp\php\PEAR') in G:\xampp\htdocs\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 349

i think its this line that is making it happen:

$index = Zend_Search_Lucene::create('LuceneData/');

can anyone give me some advice on what is going on? thanks.

Was it helpful?

Solution

You have to add your Zend Library to include path.

If your Zend Framework is in G:\xampp\htdocs\includes\Zend, then you have to include it so:

<?php
$path = 'G:\xampp\htdocs\includes\Zend';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

Also you should give absolute path for Lucene data. For example:

$index = Zend_Search_Lucene::create('/var/searchindex/LuceneData/');

The folder /var/searchindex/LuceneData/ should exist and be writable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top