private function applyOptions(ESphinxSearchCriteria $queryCriteria)
 {
     if ($queryCriteria->booleanSimplify !== null) {
         $this->sphinxClient->SetQueryFlag('boolean_simplify', $queryCriteria->booleanSimplify);
     }
     if (($revScan = $queryCriteria->getReverseScan()) !== null) {
         $this->sphinxClient->SetQueryFlag('reverse_scan', $revScan ? 1 : 0);
     }
     if (($sortMode = $queryCriteria->getSortMethod()) !== null) {
         $this->sphinxClient->SetQueryFlag('sort_method', $sortMode);
     }
     if ($queryCriteria->globalIdf !== null) {
         $this->sphinxClient->SetQueryFlag('global_idf', $queryCriteria->globalIdf);
     }
     if (($idf = $queryCriteria->getIdf()) !== null) {
         $this->sphinxClient->SetQueryFlag('idf', $idf);
     }
 }
Beispiel #2
0
<?php

require "spec/fixtures/sphinxapi.php";
$cl = new SphinxClient();
$cl->SetQueryFlag('reverse_scan', 1);
$cl->SetQueryFlag('sort_method', 'kbuffer');
$cl->SetQueryFlag('max_predicted_time', 15);
$cl->SetQueryFlag('boolean_simplify', true);
$cl->SetQueryFlag('idf', 'plain');
$cl->Query('query');