View Single Post
  #1 (permalink)  
Old 10-02-2007, 08:40 PM
garett garett is offline
Junior Member
 
Join Date: Oct 2007
Posts: 2
Default Problems with Zend_Search_Lucene

I've spent a few hours trying to figure this one out. I've done a lot of googl'ing but I can't seem to find anyone who has had this same problem.

First, the problem only exists on my web server (Redhat Enterprise 3). When I try it on my local Ubuntu Feisty Fawn desktop it works fine.

I get the following PHP Warnings when running the "CreateIndex.php" demo:

PHP Warning: Invalid argument supplied for foreach() in /home/garett/lucene/ZendFramework-1.0.1/library/Zend/Search/Lucene/Index/Writer.php on line 238

Repeated for every single document it tries to index.

This is the content of the index directory:

$ ls index
_0.fdt _1.fdt _2.fdt _3.fdt _4.fdt _5.fdt _6.fdt _7.fdt _8.fdt _9.fdt deletable segments
_0.fdx _1.fdx _2.fdx _3.fdx _4.fdx _5.fdx _6.fdx _7.fdx _8.fdx _9.fdx index.lock

So something is clearly going wrong during the index creation.

Then when running the search-index.php demo (modified to use the index created by CreateIndex.php) I get the following warnings:

PHP Warning: flock(): 152 is not a valid stream resource in /home/garett/lucene/ZendFramework-1.0.2/library/Zend/Search/Lucene/Storage/File/Filesystem.php on line 211

And, as you would probably guess, reports no documents indexed and no results for query.

I'm using PHP 5.2.1 on both machines (the redhat server and my ubuntu desktop).

Any ideas ?
Reply With Quote