本文整理汇总了PHP中SphinxClient::ResetOverrides方法的典型用法代码示例。如果您正苦于以下问题:PHP SphinxClient::ResetOverrides方法的具体用法?PHP SphinxClient::ResetOverrides怎么用?PHP SphinxClient::ResetOverrides使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SphinxClient
的用法示例。
在下文中一共展示了SphinxClient::ResetOverrides方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: resetClient
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("*");
}
示例2: array
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");