コード例 #1
0
ファイル: FacetSet.php プロジェクト: nubs/solarium
 /**
  * Add params for a range facet to request
  *
  * @param  Request    $request
  * @param  FacetRange $facet
  * @return void
  */
 public function addFacetRange($request, $facet)
 {
     $field = $facet->getField();
     $request->addParam('facet.range', $this->renderLocalParams($field, array('key' => $facet->getKey(), 'ex' => $facet->getExcludes())));
     $request->addParam("f.{$field}.facet.range.start", $facet->getStart());
     $request->addParam("f.{$field}.facet.range.end", $facet->getEnd());
     $request->addParam("f.{$field}.facet.range.gap", $facet->getGap());
     $request->addParam("f.{$field}.facet.range.hardend", $facet->getHardend());
     $request->addParam("f.{$field}.facet.mincount", $facet->getMinCount());
     foreach ($facet->getOther() as $otherValue) {
         $request->addParam("f.{$field}.facet.range.other", $otherValue);
     }
     foreach ($facet->getInclude() as $includeValue) {
         $request->addParam("f.{$field}.facet.range.include", $includeValue);
     }
 }
コード例 #2
0
 public function testSetAndGetHardend()
 {
     $this->facet->setHardend(true);
     $this->assertEquals(true, $this->facet->getHardend());
 }