Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z zend search lucene
wiewiorek
post
Post #1





Grupa: Zarejestrowani
Postów: 247
Pomógł: 11
Dołączył: 5.09.2009

Ostrzeżenie: (0%)
-----


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:
  1. require_once 'Zend/Search/Lucene.php';
  2.  
  3. // Create index
  4. $index = Zend_Search_Lucene::create('indexes/products');
  5.  
  6. mysql_connect ("localhost", "root", "");
  7. mysql_query("SET NAMES utf8;");
  8. $query = "SELECT id, tytul FROM strony";
  9. $result = mysql_query($query);
  10. while($row = mysql_fetch_array($result, MYSQL_ASSOC))
  11. {
  12. $doc = new Zend_Search_Lucene_Document();
  13.  
  14. // Store document URL to identify it in the search results
  15. $doc->addField(Zend_Search_Lucene_Field::UnIndexed('id', $row['id']));
  16.  
  17. // Index document title
  18. $doc->addField(Zend_Search_Lucene_Field::Text('tytul', $row['tytul']));
  19.  
  20. // Add document to the index
  21. $index->addDocument($doc);
  22. }
  23.  
  24. // Optimize index.
  25. $index->optimize();


I nie działa - mam błąd:
  1. 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
  2.  
  3. 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
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 07:08