<?php
try {
$swish = new Swish("index.swish-e");
$search = $swish->prepare("search query");
$results = $search->execute();
echo "Found: ", $results->hits, " hits\n";
$results = $search->execute("new search");
echo "Found: ", $results->hits, " hits\n";
} catch (SwishException $e) {
echo $e->getMessage(), "\n";
}
?>
The above example will output
something similar to:
Found: 2 hits
Found: 5 hits