Ejemplo n.º 1
0
 /**
  * Creates the full facet definition, which includes the basic
  * facet definition of the parent.
  *
  * @see \Elastica\Facet\AbstractFacet::toArray()
  *
  * @throws \Elastica\Exception\InvalidException When the right fields haven't been set.
  *
  * @return array
  */
 public function toArray()
 {
     /*
      * Set the geo_distance in the abstract as param.
      */
     $this->_setFacetParam('geo_distance', $this->_params);
     return parent::toArray();
 }
Ejemplo n.º 2
0
 /**
  * Creates the full facet definition, which includes the basic
  * facet definition of the parent.
  *
  * @see \Elastica\Facet\AbstractFacet::toArray()
  * @throws \Elastica\Exception\InvalidException When the right fields haven't been set.
  * @return array
  */
 public function toArray()
 {
     /**
      * Set the range in the abstract as param.
      */
     $this->_setFacetParam('histogram', $this->_params);
     return parent::toArray();
 }
Ejemplo n.º 3
0
 /**
  * Creates the full facet definition, which includes the basic
  * facet definition of the parent.
  *
  * @see \Elastica\Facet\AbstractFacet::toArray()
  * @return array
  */
 public function toArray()
 {
     $this->_setFacetParam('statistical', $this->_params);
     return parent::toArray();
 }
Ejemplo n.º 4
0
 /**
  * Creates the full facet definition, which includes the basic
  * facet definition of the parent.
  *
  * @see \Elastica\Facet\AbstractFacet::toArray()
  *
  * @throws \Elastica\Exception\InvalidException When the right fields haven't been set.
  *
  * @return array
  */
 public function toArray()
 {
     $this->_setFacetParam('geo_cluster', $this->_params);
     return parent::toArray();
 }
Ejemplo n.º 5
0
 /**
  * add facet to collection
  *
  * @param AbstractFacet $facet
  * @return Hackathon_ElasticgentoCore_Model_Resource_Collection
  */
 public function addFacet($facet)
 {
     $this->_queryFacets[$facet->getName()] = $facet;
     return $this;
 }
Ejemplo n.º 6
0
 /**
  * Creates the full facet definition, which includes the basic
  * facet definition of the parent.
  *
  * @see \Elastica\Facet\AbstractFacet::toArray()
  * @return array
  */
 public function toArray()
 {
     $this->_setFacetParam('terms_stats', $this->_params);
     return parent::toArray();
 }