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


PHP SphinxClient::resetFilters方法代码示例

本文整理汇总了PHP中SphinxClient::resetFilters方法的典型用法代码示例。如果您正苦于以下问题:PHP SphinxClient::resetFilters方法的具体用法?PHP SphinxClient::resetFilters怎么用?PHP SphinxClient::resetFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SphinxClient的用法示例。


在下文中一共展示了SphinxClient::resetFilters方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: resetClient

 /**
  * Reset settings sphinx
  */
 public function resetClient()
 {
     $this->_client->resetFilters();
     $this->_client->resetGroupBy();
     $this->_client->setArrayResult(false);
     //DEPRECATED: Do not call this method or, even better, use SphinxQL instead of an API
     //$this->_client->setMatchMode(SPH_MATCH_EXTENDED2);
     $this->_client->setLimits(0, 20, 1000, 0);
     $this->_client->setFieldWeights(array());
     $this->_client->setSortMode(SPH_SORT_RELEVANCE, '');
     $this->_client->_error = '';
     $this->_client->_warning = '';
 }
开发者ID:bleid3,项目名称:yii-component-sphinx,代码行数:16,代码来源:AdvSphinxConnection.php

示例2: resetFilters

 /**
  * Reset all previously set filters.
  */
 public function resetFilters()
 {
     $this->sphinx->resetFilters();
 }
开发者ID:Cosmologist,项目名称:Search-SphinxsearchBundle,代码行数:7,代码来源:Sphinxsearch.php

示例3: bindToSphinx

 /**
  * Adds this query to the SphinxClient $sphinx
  *
  * Adding the query resets the passed SphinxClient so that no existing
  * filters or group bys or sort order etc are inherited by this query.
  * The query details are then injected into Sphinx, and the resulting
  * id passed back to this query allowing the results to be mapped to
  * the query.
  *
  * @param \SphinxClient $sphinx
  *
  * @return $this
  */
 public function bindToSphinx(\SphinxClient $sphinx)
 {
     $sphinx->resetFilters();
     $sphinx->resetGroupBy();
     $sphinx->setRankingMode($this->rankingMode);
     if ($this->groupBy instanceof GroupBy) {
         $this->groupBy->bindToSphinx($sphinx);
     }
     $this->sortBy->bindToSphinx($sphinx);
     $this->limits->bindToSphinx($sphinx);
     /* @var FilterInterface $filter */
     foreach ($this->filters as $filter) {
         $filter->bindToSphinx($sphinx);
     }
     if ($this->builder instanceof Builder && !$this->query) {
         $this->query = $this->builder->getQuery();
     }
     $this->id = $sphinx->addQuery($this->query, $this->index->getIndexName());
     return $this;
 }
开发者ID:scorpioframework,项目名称:sphinx-search,代码行数:33,代码来源:SearchQuery.php

示例4: resetCriteria

 /**
  * @brief reset search criteria to default
  * @details reset conditions and set default search options
  */
 public function resetCriteria()
 {
     if (is_object($this->criteria)) {
         $this->lastCriteria = clone $this->criteria;
     } else {
         $this->lastCriteria = new stdClass();
     }
     $this->criteria = new stdClass();
     $this->criteria->query = '';
     $this->client->resetFilters();
     $this->client->resetGroupBy();
     $this->client->setArrayResult(false);
     $this->client->setMatchMode($this->matchMode);
     //        $this->client->setRankingMode($this->rankMode);
     $this->client->setSortMode(SPH_SORT_RELEVANCE, '@relevance DESC');
     $this->client->setLimits(0, 1000000, 10000);
     if (!empty($this->fieldWeights)) {
         $this->client->setFieldWeights($this->fieldWeights);
     }
 }
开发者ID:zwq,项目名称:unpei,代码行数:24,代码来源:DGSphinxSearch.php


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