I just installed on my server SphinxQL Vendor (I'm new to this) and I have a problem - I can't find a way to make the script work via random select.
This is my code:
require "./classes/vendor/autoload.php";
use Foolz\SphinxQL\SphinxQL;
use Foolz\SphinxQL\Connection;
// create a SphinxQL Connection object to use with SphinxQL
$conn = new Connection();
$conn->setParams(array('host' => '127.0.0.1', 'port' => 9306));
$query = SphinxQL::create($conn)->select('*')
->from('documents_titles')
->match('title','welcome')
->orderBy('title', $direction = 'RAND()');
$result = $query->execute();
var_dump($result);
I have tried many ways to make it random but no luck.