Note that there are some explanatory texts on larger screens.

plurals
  1. POInclude zend framework into php project zend_search_lucene
    primarykey
    data
    text
    <p>I've searched for many info on the internet, also tried many various suggestions, but nothing seems to work as I need. So here is the problem: I want to use Zend_Search_Lucene to perform search in database, but I've stuck at the very begining.. creating Index and getting Zend to work at all. Im on shared Hostgator host and using this php code to generate my index:</p> <pre><code>include ('/home/username/public_html/website/config.php'); $path = '/usr/local/Zend'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); require_once('Zend/Loader.php'); Zend_Loader::registerAutoload(); require_once ('Zend/Search/Lucene.php'); $index = Zend_Search_Lucene::create('/home/username/public_html/website/tmpbuild'); $con = mysql_connect("".$dbhost."","".$dbusername."","".$dbpass.""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("".$dbname."", $con); $sql = ('SELECT * FROM rasti_failai'); while($eilute = mysql_fetch_array($sql)) { $filenamesql = $eilute['failu_name']; $dydissql = $eilute['dydis']; $hostas = $eilute['hostas']; $datasql = $eilute['data']; $aprasymassql = $eilute['header']; $titlesql = $eilute['aprasymas']; $url = $eilute['url']; $links = $eilute['links']; $document = new Zend_Search_Lucene_Document (); $document-&gt;addField(Zend_Search_Lucene_Field::unIndexed('ID', $eilute['ID'])); $document-&gt;addField(Zend_Search_Lucene_Field::Text('failu_name', $eilute['failu_name'])); $document-&gt;addField(Zend_Search_Lucene_Field::UnStored('dydis', $eilute['dydis'])); $document-&gt;addField(Zend_Search_Lucene_Field::UnStored('hostas', $eilute['hostas'])); $document-&gt;addField(Zend_Search_Lucene_Field::UnStored('header', $eilute['header'])); $document-&gt;addField(Zend_Search_Lucene_Field::UnStored('aprasymas', $eilute['aprasymas'])); $document-&gt;addField(Zend_Search_Lucene_Field::UnStored('url', $eilute['url'])); $index-&gt;addDocument($document); } $index-&gt;commit(); echo $index-&gt;count() . " documents have been indexed.\n"; </code></pre> <p>But it seems I can't get Zend framework to work, as Im getting this error:</p> <pre><code>Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /home/username/public_html/website/adminp/lucene.php on line 15 Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/Zend') in /home/username/public_html/website/adminp/lucene.php on line 15 </code></pre> <p>My host has zend framework (tho I dont know exact version, but I think hostgator uses latest one, and Im using php5) installed, and support says its in /usr/local/Zend directory.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload