Files
pecl-search_engine-swish/swish.php
Antony Dovgal e7c623e189 major update
simplify API, add tests
2007-02-07 20:06:43 +00:00

22 lines
307 B
PHP

<?php
$h = new Swish("index.swish-e");
$s = $h->prepare();
$s->setSort('swishrank desc');
$results = $s->execute("for");
echo "There are ", $results->hits, " hits\n";
while ($r = $results->nextResult()) {
printf("%s %d %s\n",
$r->swishdocpath,
$r->swishrank,
$r->name
);
};
echo "Done\n";
?>