示例#1
0
 public function testSimplificaMultiplasQueriesGroupby()
 {
     $cl = SphinxService::getInstance()->getClient();
     $cl->SetMatchMode(SPH_MATCH_EXTENDED2);
     $cl->SetSortMode(SPH_SORT_RELEVANCE);
     if (!$this->hasHost()) {
         return $this->markTestSkipped();
     }
     $cl->addFacetedQuery('perfume', 'produtoIndex', ['categoria', 'fornecedor', 'tamanho']);
     $results = $cl->RunQueries();
     $this->assertMultiQueryResults($results);
 }
示例#2
0
文件: Search.php 项目: gpupo/search
 public function getSphinxService()
 {
     return SphinxService::getInstance();
 }
示例#3
0
 /**
  * Configure Sphinx Server Parameters.
  */
 public function setUp()
 {
     if ($this->hasHost()) {
         SphinxService::getInstance()->setParameters($this->getSphinxServerParameters());
     }
 }
示例#4
0
 public function testAcessoSingletonAoClientComReset()
 {
     $client = SphinxService::getInstance()->getFreshClient();
     $this->assertTrue($client instanceof SphinxClient);
 }