diff options
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php b/vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php index 16293519..ad21bc7e 100644 --- a/vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php +++ b/vendor/ruflin/elastica/lib/Elastica/Filter/Nested.php @@ -1,24 +1,23 @@ <?php - namespace Elastica\Filter; use Elastica\Query\AbstractQuery; /** - * Nested filter + * Nested filter. * - * @category Xodoa - * @package Elastica * @author Nicolas Ruflin <spam@ruflin.com> - * @link http://www.elasticsearch.org/guide/reference/query-dsl/nested-filter.html + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-filter.html */ class Nested extends AbstractFilter { /** - * Adds field to mlt filter + * Adds field to mlt filter. + * + * @param string $path Nested object path * - * @param string $path Nested object path - * @return \Elastica\Filter\Nested + * @return $this */ public function setPath($path) { @@ -26,10 +25,11 @@ class Nested extends AbstractFilter } /** - * Sets nested query + * Sets nested query. * - * @param \Elastica\Query\AbstractQuery $query - * @return \Elastica\Filter\Nested + * @param \Elastica\Query\AbstractQuery $query + * + * @return $this */ public function setQuery(AbstractQuery $query) { @@ -37,10 +37,11 @@ class Nested extends AbstractFilter } /** - * Sets nested filter + * Sets nested filter. + * + * @param \Elastica\Filter\AbstractFilter $filter * - * @param \Elastica\Filter\AbstractFilter $filter - * @return \Elastica\Filter\Nested + * @return $this */ public function setFilter(AbstractFilter $filter) { @@ -48,13 +49,14 @@ class Nested extends AbstractFilter } /** - * Set score mode + * Set join option. + * + * @param bool $join * - * @param string $scoreMode Options: avg, total, max and none. - * @return \Elastica\Filter\Nested + * @return $this */ - public function setScoreMode($scoreMode) + public function setJoin($join) { - return $this->setParam('score_mode', $scoreMode); + return $this->setParam('join', (bool) $join); } } |