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