public function testUpdateAttributes() { $sphinx = new SphinxClient(); $sphinx->setGroupBy('attr1', SphinxClient::SPH_GROUPBY_ATTR); $sphinx->updateAttributes('sphinxtest', array('attr1'), array(1 => array(10), 2 => array(10), 3 => array(20), 4 => array(20))); $results = $sphinx->query('bb'); $this->assertEquals($results['total'], 3); // restore attributes $sphinx->updateAttributes('sphinxtest', array('attr1'), array(1 => array(2), 2 => array(4), 3 => array(1), 4 => array(5))); }
/** * {@inheritdoc} */ public function setGroupBy($attribute, $func, $groupsort = '@group desc') { return $this->proxy->setGroupBy($attribute, $func, $groupsort); }