Skip to main content.
home | support | download

Back to List Archive

Re: swishphp and limiting results (-L)

From: Steve Halasz <debian(at)not-real.adkgis.org>
Date: Tue Nov 07 2006 - 16:50:10 GMT
On Mon, 2006-11-06 at 16:53 -0800, pinunki wrote:
> Hi,
> 
> I want use the php module to do a query equivalent to this one (which
> seems to work fine from the command line) :
> 
> swish-e -f myindex.index -w 'word' -L swishlastmodified 1146956975 1170000000
> 
> i.e. return pages with 'word' in them that were last modified between 2 dates.
> 
> I've tried some php code like this, but all it does is hang apache2!!!
> 
> $swish = swishe('myindex.index');
> $search = $swish->new_search_object('word');
> $search->set_search_limit('swishlastmodified','1146956975','1170000000');
> $search->set_sort('swishdocpath asc swishrank desc');
> $swishResults = $search->execute();
> 
> Quite possibly I could have it wrong, given that swishphp seems to have NO docs.
> 
> Queries like this work fine for me:
> 
> $swish = swishe('myindex.index');
> $swishResults = $swish->query('word');
> 
> Can anyone help me?

I can't help. But I can report that I encountered the same problem. The
first access would work, but then all subsequent accesses would crash.
query() works fine though.

Debian Etch/Testing
PHP 4.4.2
apache2-mpm-prefork 2.0.55
swish-e-2.5.4-2006-09-21

Steve

> 
> Here's my platform details:
> 
> PHP Version 5.1.6-5
> Linux 2.6.17-2-k7 #1 SMP
> Apache/2.2.3 (Debian) PHP/5.1.6-5
> swishe support	enabled
> SWISH-E 2.4.4
> 
> cheers,
> Hamish
Received on Tue Nov 7 08:50:20 2006