* @license http://github.com/basdenooijer/solarium/raw/master/COPYING * @link http://www.solarium-project.org/ * * @package Solarium * @subpackage Query */ /** * Facet query * * @link http://wiki.apache.org/solr/SimpleFacetParameters#facet.query_:_Arbitrary_Query_Faceting * * @package Solarium * @subpackage Query */ class Solarium_Query_Select_Component_Facet_Query extends Solarium_Query_Select_Component_Facet { /** * Default options * * @var array */ protected $_options = array( 'query' => '*:*' ); /** * Get the facet type * * @return string */ public function getType() { return Solarium_Query_Select_Component_FacetSet::FACET_QUERY; } /** * Set the query string * * This overwrites the current value * * @param string $query * @param array $bind Bind values for placeholders in the query string * @return Solarium_Query_Select_Facet_Query Provides fluent interface */ public function setQuery($query, $bind = null) { if (!is_null($bind)) { $helper = new Solarium_Query_Helper; $query = $helper->assemble($query, $bind); } return $this->_setOption('query', $query); } /** * Get the query string * * @return string */ public function getQuery() { return $this->getOption('query'); } }