protected function resetClient() { $this->sphinxClient->ResetFilters(); $this->sphinxClient->ResetGroupBy(); $this->sphinxClient->ResetOverrides(); $this->sphinxClient->SetLimits(0, 20); $this->sphinxClient->SetArrayResult(true); $this->sphinxClient->SetFieldWeights(array()); $this->sphinxClient->SetIDRange(0, 0); $this->sphinxClient->SetIndexWeights(array()); $this->sphinxClient->SetMatchMode(SPH_MATCH_EXTENDED2); $this->sphinxClient->SetRankingMode(SPH_RANK_NONE); $this->sphinxClient->SetSortMode(SPH_SORT_RELEVANCE, ""); $this->sphinxClient->SetSelect("*"); }
fwrite($file, $client->UpdateAttributes("people", array("birthday"), array(1 => array(191163600)))); fclose($file); // keywords_without_hits $file = fopen("spec/fixtures/data/keywords_without_hits.bin", "w"); fwrite($file, $client->BuildKeywords("pat", "people", false)); fclose($file); // keywords_with_hits $file = fopen("spec/fixtures/data/keywords_with_hits.bin", "w"); fwrite($file, $client->BuildKeywords("pat", "people", true)); fclose($file); // overrides $client->SetOverride("rating", SPH_ATTR_FLOAT, array(1 => 10.0)); $file = fopen("spec/fixtures/data/overrides.bin", "w"); fwrite($file, $client->_reqs[$client->AddQuery("test ")]); fclose($file); $client->ResetOverrides(); // select $client->SetSelect("selecting"); $file = fopen("spec/fixtures/data/select.bin", "w"); fwrite($file, $client->_reqs[$client->AddQuery("test ")]); fclose($file); $client->SetSelect("*"); // filter_array $client->SetFilter("field", array(1, 2, 3)); $file = fopen("spec/fixtures/data/filter_array.bin", "w"); fwrite($file, $client->FilterOutput()); fclose($file); $client->ResetFilters(); // filter_array_exclude $client->SetFilter("field", array(1, 2, 3), true); $file = fopen("spec/fixtures/data/filter_array_exclude.bin", "w");