Query provides a set of methods to facilitate the specification of different clauses
in a SELECT statement. These methods can be chained together.
By calling Query::createCommand, we can get a Command instance which can be further
used to perform/execute the Sphinx query.
For example,
php
$query = new Query();
$query->select('id, group_id')
->from('idx_item')
->limit(10);
build and execute the query
$command = $query->createCommand();
$command->sql returns the actual SQL
$rows = $command->queryAll();
Since Sphinx does not store the original indexed text, the snippets for the rows in query result
should be build separately via another query. You can simplify this workflow using [[snippetCallback]].
Warning: even if you do not set any query limit, implicit LIMIT 0,20 is present by default!