当前位置: 首页>>代码示例>>PHP>>正文


PHP SphinxClient::ResetOverrides方法代码示例

本文整理汇总了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("*");
 }
开发者ID:jerrylsxu,项目名称:yii-sphinx,代码行数:15,代码来源:ESphinxConnection.php

示例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");
开发者ID:quasor,项目名称:riddle,代码行数:31,代码来源:data_generator.1.10.php


注:本文中的SphinxClient::ResetOverrides方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。