JavaScript Editor Javascript debugger     Website design 


Set the phrase delimiter ()
void SwishSearch->setPhraseDelimiter ( string delimiter )


This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.



Phrase delimiter character. The default delimiter is double-quotes.

Return Values

No value is returned.


Example 2519. Basic SwishSearch->setPhraseDelimiter() example


try {

$swish = new Swish("index.swish-e");
$search = $swish->prepare();

$results = $search->execute('"every time"'); //looking for "every time"
echo "First query found: ", $results->hits, " hits\n";

$results = $search->execute("'every time'"); //the same query, but using different delimiter
echo "Second query found: ", $results->hits, " hits\n";

$results = $search->execute("'every time'"); //looking for "every" and "time"
echo "Third query found: ", $results->hits, " hits\n";

//let's look at parsed words

} catch (
SwishException $e) {
$e->getMessage(), "\n";


The above example will output something similar to:

First query found: 1 hits
Second query found: 1 hits
Third query found: 2 hits
array(2) {
 string(5) "every"
 string(4) "time"