Skip to main content.
home | support | download

Back to List Archive

swishphp and limiting results (-L)

From: pinunki <pinunki(at)not-real.gmail.com>
Date: Tue Nov 07 2006 - 00:54:15 GMT
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?

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 Mon Nov 6 16:54:18 2006