Example #1
0
 public function testAddBoostQueryWithObject()
 {
     $query = 'cat:1^3';
     $key = 'cat';
     $bq = new BoostQuery();
     $bq->setKey($key);
     $bq->setQuery($query);
     $this->disMax->addBoostQuery($bq);
     $this->assertEquals($query, $this->disMax->getBoostQuery($key));
 }
Example #2
0
 public function testSetAndGetBoostQuery()
 {
     $value = 'cat:1^3';
     $this->disMax->setBoostQuery($value);
     $this->assertEquals($value, $this->disMax->getBoostQuery());
 }