public function testAsEncode() { $queryString = "(and type:'type' rating:1..10 (or user:'******'))"; $query = new Query(); $query->setBq($queryString); $query->setSize(5); $encoded = $query->encode(); $this->assertContains("&size=5", $encoded); $this->assertContains('bq=' . urlencode($queryString), $encoded); }
/** * @param $facet * @return $this */ public function addFacet($facet) { $this->query->addFacet($facet); return $this; }