Usiłuję wykorzystać zend search lucene do wyszukiwania pełnotekstowego - w tym celu pobrałem bibliotekę ZF - umieściłem katalog Zend (w którym jest m. in. katalog Search a w nim katalog Lucene) na serwerze. W pliku index.php mam kod:
require_once 'Zend/Search/Lucene.php';
// Create index
$index = Zend_Search_Lucene::create('indexes/products');
$query = "SELECT id, tytul FROM strony";
{
$doc = new Zend_Search_Lucene_Document();
// Store document URL to identify it in the search results
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('id', $row['id']));
// Index document title
$doc->addField(Zend_Search_Lucene_Field::Text('tytul', $row['tytul']));
// Add document to the index
$index->addDocument($doc);
}
// Optimize index.
$index->optimize();
I nie działa - mam błąd:
Warning: Zend_Search_Lucene_Storage_Directory_Filesystem::require_once(Zend/Search/Lucene/Storage/File/Filesystem.php) [function.Zend-Search-Lucene-Storage-Directory-Filesystem-require-once]: failed to open stream: No such file or directory in C:\Program Files\WebServ\httpd\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 348
Fatal error: Zend_Search_Lucene_Storage_Directory_Filesystem::require_once() [function.require]: Failed opening required 'Zend/Search/Lucene/Storage/File/Filesystem.php' (include_path='.;C:\Program Files\WebServ\php\pear') in C:\Program Files\WebServ\httpd\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 348
O co może chodzić ?
Ten post edytował wiewiorek 21.09.2010, 18:57:27