summaryrefslogtreecommitdiff
path: root/vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-10-18 09:31:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-10-18 09:31:31 +0200
commit80f7dc77d430774192b929d780f96260066df2ee (patch)
tree102eaae7fc9ec567f2af76e96da3de2d1e83afcf /vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php
parentcccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff)
Update to MediaWiki 1.25.3
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php')
-rw-r--r--vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php97
1 files changed, 0 insertions, 97 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php
deleted file mode 100644
index 9ede855c..00000000
--- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-
-namespace Elastica\Aggregation;
-
-/**
- * Class Terms
- * @package Elastica\Aggregation
- * @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html
- */
-class Terms extends AbstractSimpleAggregation
-{
- /**
- * Set the bucket sort order
- * @param string $order "_count", "_term", or the name of a sub-aggregation or sub-aggregation response field
- * @param string $direction "asc" or "desc"
- * @return Terms
- */
- public function setOrder($order, $direction)
- {
- return $this->setParam("order", array($order => $direction));
- }
-
- /**
- * Set the minimum number of documents in which a term must appear in order to be returned in a bucket
- * @param int $count
- * @return Terms
- */
- public function setMinimumDocumentCount($count)
- {
- return $this->setParam("min_doc_count", $count);
- }
-
- /**
- * Filter documents to include based on a regular expression
- * @param string $pattern a regular expression
- * @param string $flags Java Pattern flags
- * @return Terms
- */
- public function setInclude($pattern, $flags = null)
- {
- if (is_null($flags)) {
- return $this->setParam("include", $pattern);
- }
- return $this->setParam("include", array(
- "pattern" => $pattern,
- "flags" => $flags
- ));
- }
-
- /**
- * Filter documents to exclude based on a regular expression
- * @param string $pattern a regular expression
- * @param string $flags Java Pattern flags
- * @return Terms
- */
- public function setExclude($pattern, $flags = null)
- {
- if (is_null($flags)) {
- return $this->setParam("exclude", $pattern);
- }
- return $this->setParam("exclude", array(
- "pattern" => $pattern,
- "flags" => $flags
- ));
- }
-
- /**
- * Sets the amount of terms to be returned.
- * @param int $size The amount of terms to be returned.
- * @return \Elastica\Aggregation\Terms
- */
- public function setSize($size)
- {
- return $this->setParam('size', $size);
- }
-
- /**
- * Sets how many terms the coordinating node will request from each shard.
- * @param int $shard_size The amount of terms to be returned.
- * @return \Elastica\Aggregation\Terms
- */
- public function setShardSize($shard_size)
- {
- return $this->setParam('shard_size', $shard_size);
- }
-
- /**
- * Instruct Elasticsearch to use direct field data or ordinals of the field values to execute this aggregation.
- * The execution hint will be ignored if it is not applicable.
- * @param string $hint map or ordinals
- * @return Terms
- */
- public function setExecutionHint($hint)
- {
- return $this->setParam("execution_hint", $hint);
- }
-} \ No newline at end of file