Consultez la FAQ sur le ZF avant de poster une question
Vous n'êtes pas identifié.
Salut tout le monde :
J'ai suivi le tuto suivant pour construire un moteur de recherche avec lucene
http://prematureoptimization.org/talks/ … -SE-07.pdf
ça n'a pas marché et j'ai trouvé l'erreur suivante :
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'fopen(APP_ROOT/var/index/segments) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory' in C:\wamp\www\zf-crawler\library\Zend\Search\Lucene\Storage\File\Filesystem.php:64 Stack trace: #0 C:\wamp\www\zf-crawler\library\Zend\Search\Lucene\Storage\Directory\Filesystem.php(338): Zend_Search_Lucene_Storage_File_Filesystem->__construct('APP_ROOT/var/in...') #1 C:\wamp\www\zf-crawler\library\Zend\Search\Lucene.php(235): Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('segments') #2 C:\wamp\www\zf-crawler\library\Zend\Search\Lucene.php(182): Zend_Search_Lucene->__construct('APP_ROOT/var/in...', false) #3 C:\wamp\www\zf-crawler\application\controllers\SearchController.php(11): Zend_Search_Lucene::open('APP_ROOT/var/in...') #4 C:\wamp\www\zf-crawler\library\Zend\Controller\Action.php(499): SearchController->indexAction() #5 C:\wamp\www\zf-crawler\library\Zend\Controller\Dispatcher\Standard.php(242 in C:\wamp\www\zf-crawler\library\Zend\Search\Lucene\Storage\File\Filesystem.php on line 64
Si quelqun peut m'aider SVP
Hors ligne
Si APP_ROOT est (sensé être) une constante
fopen(APP_ROOT/var/index/segments)
D'après ce que je vois ça serait une erreur très bête: la constante APP_ROOT n'a pas l'air d'être défini (elle est donc interprété comme une string ayant la valeur 'APP_ROOT'
Hors ligne
Ausssi j'ai compri comme ça
mais j'ai défini cette variable
define('APP_ROOT', realpath(dirname(dirname(__FILE__))));
en fait j'ai trouvé l'in a créer un dossier ki la appelé APP_ROOT et a crée les sous dossiers aussi
En fait l'erreur c'est sur cette ligne exactement
$index = Zend_Search_Lucene::open(APP_ROOT.'\var');
Dernière modification par Nessma (10-01-2008 16:22:08)
Hors ligne