Jump to content

Recommended Posts

Hi folks,

I'm new on using Zend framework. I wanted to use Zend_Lucene to achieve a small books engine on my web site. I downloaded the Full package and included it into my Netbeans 7 and it's went fine, then, I read the get started tutorial of the official site of Zend_Lucene, I could do the indexing but with some errors:

Here is my code:

require_once('ZendFramework-1.11.7/library/Zend/Search/Lucene.php');
$indexPath = 'C:\wamp\www\witswork\Documents';
$index = Zend_Search_Lucene::create($indexPath);

$index = Zend_Search_Lucene::open($indexPath);

$query = new Zend_Search_Lucene_Search_Query_MultiTerm();
$doc = new Zend_Search_Lucene_Document();
$doc->addField(Zend_Search_Lucene_Field::UnIndexed('url', "Plan.docx"));
$doc->addField(Zend_Search_Lucene_Field::Text('title', "Plan"));

$hits = $index->find($query);
$index->addDocument($doc);
$index->commit();

 

These file have been created:

And here is the error: _0.cfs, segments_2, optimization.lock.file, read.lock.file, read-lock-processing.lock.file, write.lock.file and segments.gen.

 

And this is the error appears after running my code and creating the indexer:

Warning: require_once(Zend/Search/Lucene/Storage/File/Filesystem.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\witswork\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 349

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Search/Lucene/Storage/File/Filesystem.php' (include_path='.;C:\php5\pear;ZendFramework-1.11.7/library/Zend') in C:\wamp\www\witswork\Zend\Search\Lucene\Storage\Directory\Filesystem.php on line 349

 

I read that this requires including the library into my include_path, I sneaked around my Netbeans and I thought that I got it, here a screenshot:

[image is attached with the post]

 

Please support my issue, I need it for a graduating project!

Thanks in advance!

Regards!

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/240199-zend_lucene-error/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.