Skip to content

Instantly share code, notes, and snippets.

@joshsmith
Created September 30, 2010 02:10
Show Gist options
  • Save joshsmith/603912 to your computer and use it in GitHub Desktop.
Save joshsmith/603912 to your computer and use it in GitHub Desktop.
<?php
$s = new SphinxClient;
$s->setServer("localhost", 9312);
$s->setMatchMode(SPH_MATCH_ANY);
$s->setSortMode(SPH_SORT_RELEVANCE);
$s->setMaxQueryTime(3);
$s->setLimits(0,10);
$s->addQuery('test', 'test1');
$result = $s->runQueries();
var_dump($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment