diff options
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Facet/Query.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Facet/Query.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Facet/Query.php b/vendor/ruflin/elastica/lib/Elastica/Facet/Query.php new file mode 100644 index 00000000..522090d5 --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Facet/Query.php @@ -0,0 +1,27 @@ +<?php +namespace Elastica\Facet; + +use Elastica\Query\AbstractQuery; + +/** + * Query facet. + * + * @author Nicolas Ruflin <spam@ruflin.com> + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/search-facets-query-facet.html + * @deprecated Facets are deprecated and will be removed in a future release. You are encouraged to migrate to aggregations instead. + */ +class Query extends AbstractFacet +{ + /** + * Set the query for the facet. + * + * @param \Elastica\Query\AbstractQuery $query + * + * @return $this + */ + public function setQuery(AbstractQuery $query) + { + return $this->_setFacetParam('query', $query->toArray()); + } +} |