From 80f7dc77d430774192b929d780f96260066df2ee Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 18 Oct 2015 09:31:31 +0200 Subject: Update to MediaWiki 1.25.3 --- .../Elastica/Aggregation/AbstractAggregation.php | 88 -------------------- .../Aggregation/AbstractSimpleAggregation.php | 33 -------- .../elastica/lib/Elastica/Aggregation/Avg.php | 14 ---- .../lib/Elastica/Aggregation/Cardinality.php | 14 ---- .../lib/Elastica/Aggregation/DateHistogram.php | 82 ------------------ .../lib/Elastica/Aggregation/DateRange.php | 21 ----- .../lib/Elastica/Aggregation/ExtendedStats.php | 13 --- .../elastica/lib/Elastica/Aggregation/Filter.php | 41 --------- .../lib/Elastica/Aggregation/GeoDistance.php | 90 -------------------- .../lib/Elastica/Aggregation/GeohashGrid.php | 61 -------------- .../lib/Elastica/Aggregation/GlobalAggregation.php | 13 --- .../lib/Elastica/Aggregation/Histogram.php | 55 ------------ .../elastica/lib/Elastica/Aggregation/IpRange.php | 66 --------------- .../elastica/lib/Elastica/Aggregation/Max.php | 13 --- .../elastica/lib/Elastica/Aggregation/Min.php | 13 --- .../elastica/lib/Elastica/Aggregation/Missing.php | 31 ------- .../elastica/lib/Elastica/Aggregation/Nested.php | 31 ------- .../elastica/lib/Elastica/Aggregation/Range.php | 45 ---------- .../lib/Elastica/Aggregation/ReverseNested.php | 50 ----------- .../elastica/lib/Elastica/Aggregation/Stats.php | 13 --- .../elastica/lib/Elastica/Aggregation/Sum.php | 13 --- .../elastica/lib/Elastica/Aggregation/Terms.php | 97 ---------------------- .../lib/Elastica/Aggregation/ValueCount.php | 31 ------- 23 files changed, 928 deletions(-) delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractAggregation.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Cardinality.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/DateHistogram.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/DateRange.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/ExtendedStats.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Filter.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/GlobalAggregation.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Histogram.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/IpRange.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Max.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Min.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Missing.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Nested.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Range.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/ReverseNested.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Stats.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Sum.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/Terms.php delete mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/ValueCount.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation') diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractAggregation.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractAggregation.php deleted file mode 100644 index 5ad5b17e..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractAggregation.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name); - } - - /** - * Set the name of this aggregation - * @param string $name - */ - public function setName($name) - { - $this->_name = $name; - } - - /** - * Retrieve the name of this aggregation - * @return string - */ - public function getName() - { - return $this->_name; - } - - /** - * Retrieve all subaggregations belonging to this aggregation - * @return array - */ - public function getAggs() - { - return $this->_aggs; - } - - /** - * Add a sub-aggregation - * @param AbstractAggregation $aggregation - * @throws \Elastica\Exception\InvalidException - * @return AbstractAggregation - */ - public function addAggregation(AbstractAggregation $aggregation) - { - if(is_a($aggregation, 'Elastica\Aggregation\GlobalAggregation')) { - throw new InvalidException('Global aggregators can only be placed as top level aggregators'); - } - - $this->_aggs[$aggregation->getName()] = $aggregation->toArray(); - return $this; - } - - /** - * @return array - */ - public function toArray() - { - $array = parent::toArray(); - if (array_key_exists('global_aggregation', $array)) { - // compensate for class name GlobalAggregation - $array = array('global' => new \stdClass); - } - if (sizeof($this->_aggs)) { - $array['aggs'] = $this->_aggs; - } - return $array; - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php deleted file mode 100644 index af7c1940..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/AbstractSimpleAggregation.php +++ /dev/null @@ -1,33 +0,0 @@ -setParam('field', $field); - } - - /** - * Set a script for this aggregation - * @param string|Script $script - * @return AbstractSimpleAggregation - */ - public function setScript($script) - { - if ($script instanceof Script) { - $this->setParam('params', $script->getParams()); - $script = $script->getScript(); - } - return $this->setParam('script', $script); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php deleted file mode 100644 index 0d601910..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php +++ /dev/null @@ -1,14 +0,0 @@ -setParam("pre_zone", $preZone); - } - - /** - * Set post-rounding based on interval - * @param string $postZone - * @return DateHistogram - */ - public function setPostZone($postZone) - { - return $this->setParam("post_zone", $postZone); - } - - /** - * Set pre-zone adjustment for larger time intervals (day and above) - * @param string $adjust - * @return DateHistogram - */ - public function setPreZoneAdjustLargeInterval($adjust) - { - return $this->setParam("pre_zone_adjust_large_interval", $adjust); - } - - /** - * Adjust for granularity of date data - * @param int $factor set to 1000 if date is stored in seconds rather than milliseconds - * @return DateHistogram - */ - public function setFactor($factor) - { - return $this->setParam("factor", $factor); - } - - /** - * Set the offset for pre-rounding - * @param string $offset "1d", for example - * @return DateHistogram - */ - public function setPreOffset($offset) - { - return $this->setParam("pre_offset", $offset); - } - - /** - * Set the offset for post-rounding - * @param string $offset "1d", for example - * @return DateHistogram - */ - public function setPostOffset($offset) - { - return $this->setParam("post_offset", $offset); - } - - /** - * Set the format for returned bucket key_as_string values - * @link http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-daterange-aggregation.html#date-format-pattern - * @param string $format see link for formatting options - * @return DateHistogram - */ - public function setFormat($format) - { - return $this->setParam("format", $format); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/DateRange.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/DateRange.php deleted file mode 100644 index 37aca87b..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/DateRange.php +++ /dev/null @@ -1,21 +0,0 @@ -setParam('format', $format); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ExtendedStats.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/ExtendedStats.php deleted file mode 100644 index 4aef8a32..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ExtendedStats.php +++ /dev/null @@ -1,13 +0,0 @@ -setParam("filter", $filter->toArray()); - } - - /** - * @return array - */ - public function toArray() - { - $array = array( - "filter" => $this->getParam("filter") - ); - - if($this->_aggs) - { - $array['aggs'] = $this->_aggs; - } - - return $array; - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php deleted file mode 100644 index 76c871ea..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php +++ /dev/null @@ -1,90 +0,0 @@ -setField($field)->setOrigin($origin); - } - - /** - * Set the field for this aggregation - * @param string $field the name of the document field on which to perform this aggregation - * @return GeoDistance - */ - public function setField($field) - { - return $this->setParam('field', $field); - } - - /** - * Set the origin point from which distances will be calculated - * @param string|array $origin valid formats are array("lat" => 52.3760, "lon" => 4.894), "52.3760, 4.894", and array(4.894, 52.3760) - * @return GeoDistance - */ - public function setOrigin($origin) - { - return $this->setParam("origin", $origin); - } - - /** - * Add a distance range to this aggregation - * @param int $fromValue a distance - * @param int $toValue a distance - * @return GeoDistance - * @throws \Elastica\Exception\InvalidException - */ - public function addRange($fromValue = null, $toValue = null) - { - if (is_null($fromValue) && is_null($toValue)) { - throw new InvalidException("Either fromValue or toValue must be set. Both cannot be null."); - } - $range = array(); - if (!is_null($fromValue)) { - $range['from'] = $fromValue; - } - if (!is_null($toValue)) { - $range['to'] = $toValue; - } - return $this->addParam("ranges", $range); - } - - /** - * Set the unit of distance measure for this aggregation - * @param string $unit defaults to km - * @return GeoDistance - */ - public function setUnit($unit) - { - return $this->setParam("unit", $unit); - } - - /** - * Set the method by which distances will be calculated - * @param string $distanceType see DISTANCE_TYPE_* constants for options. Defaults to sloppy_arc. - * @return GeoDistance - */ - public function setDistanceType($distanceType) - { - return $this->setParam("distance_type", $distanceType); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php deleted file mode 100644 index 840198c3..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php +++ /dev/null @@ -1,61 +0,0 @@ -setField($field); - } - - /** - * Set the field for this aggregation - * @param string $field the name of the document field on which to perform this aggregation - * @return GeohashGrid - */ - public function setField($field) - { - return $this->setParam('field', $field); - } - - /** - * Set the precision for this aggregation - * @param int $precision an integer between 1 and 12, inclusive. Defaults to 5. - * @return GeohashGrid - */ - public function setPrecision($precision) - { - return $this->setParam("precision", $precision); - } - - /** - * Set the maximum number of buckets to return - * @param int $size defaults to 10,000 - * @return GeohashGrid - */ - public function setSize($size) - { - return $this->setParam("size", $size); - } - - /** - * Set the number of results returned from each shard - * @param int $shardSize - * @return GeohashGrid - */ - public function setShardSize($shardSize) - { - return $this->setParam("shard_size", $shardSize); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GlobalAggregation.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GlobalAggregation.php deleted file mode 100644 index 72b56880..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GlobalAggregation.php +++ /dev/null @@ -1,13 +0,0 @@ -setField($field); - $this->setInterval($interval); - } - - - /** - * Set the interval by which documents will be bucketed - * @param int $interval - * @return Histogram - */ - public function setInterval($interval) - { - return $this->setParam("interval", $interval); - } - - /** - * 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 Histogram - */ - public function setOrder($order, $direction) - { - return $this->setParam("order", array($order => $direction)); - } - - /** - * Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned - * @param int $count set to 0 to include empty buckets - * @return Histogram - */ - public function setMinimumDocumentCount($count) - { - return $this->setParam("min_doc_count", $count); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/IpRange.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/IpRange.php deleted file mode 100644 index 18e60bfb..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/IpRange.php +++ /dev/null @@ -1,66 +0,0 @@ -setField($field); - } - - /** - * Set the field for this aggregation - * @param string $field the name of the document field on which to perform this aggregation - * @return IpRange - */ - public function setField($field) - { - return $this->setParam('field', $field); - } - - /** - * Add an ip range to this aggregation - * @param string $fromValue a valid ipv4 address. Low end of this range, exclusive (greater than) - * @param string $toValue a valid ipv4 address. High end of this range, exclusive (less than) - * @return IpRange - * @throws \Elastica\Exception\InvalidException - */ - public function addRange($fromValue = null, $toValue = null) - { - if (is_null($fromValue) && is_null($toValue)) { - throw new InvalidException("Either fromValue or toValue must be set. Both cannot be null."); - } - $range = array(); - if (!is_null($fromValue)) { - $range['from'] = $fromValue; - } - if (!is_null($toValue)) { - $range['to'] = $toValue; - } - return $this->addParam('ranges', $range); - } - - /** - * Add an ip range in the form of a CIDR mask - * @param string $mask a valid CIDR mask - * @return IpRange - */ - public function addMaskRange($mask) - { - return $this->addParam("ranges", array("mask" => $mask)); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Max.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Max.php deleted file mode 100644 index 25031b04..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Max.php +++ /dev/null @@ -1,13 +0,0 @@ -setField($field); - } - - /** - * Set the field for this aggregation - * @param string $field the name of the document field on which to perform this aggregation - * @return Missing - */ - public function setField($field) - { - return $this->setParam('field', $field); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Nested.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Nested.php deleted file mode 100644 index afbb8373..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Nested.php +++ /dev/null @@ -1,31 +0,0 @@ -setPath($path); - } - - /** - * Set the nested path for this aggregation - * @param string $path - * @return Nested - */ - public function setPath($path) - { - return $this->setParam("path", $path); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Range.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Range.php deleted file mode 100644 index ab70c5e4..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Range.php +++ /dev/null @@ -1,45 +0,0 @@ -addParam('ranges', $range); - } - - /** - * If set to true, a unique string key will be associated with each bucket, and ranges will be returned as an associative array - * @param bool $keyed - * @return Range - */ - public function setKeyedResponse($keyed = true) - { - return $this->setParam('keyed', (bool)$keyed); - } -} \ No newline at end of file diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ReverseNested.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/ReverseNested.php deleted file mode 100644 index d4056f13..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ReverseNested.php +++ /dev/null @@ -1,50 +0,0 @@ -setPath($path); - } - } - - /** - * Set the nested path for this aggregation - * - * @param string $path - * @return ReverseNested - */ - public function setPath($path) - { - return $this->setParam("path", $path); - } - - /** - * {@inheritDoc} - */ - public function toArray() - { - $array = parent::toArray(); - - // ensure we have an object for the reverse_nested key. - // if we don't have a path, then this would otherwise get encoded as an empty array, which is invalid. - $array['reverse_nested'] = (object)$array['reverse_nested']; - - return $array; - } -} diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Stats.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/Stats.php deleted file mode 100644 index 18c903e9..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/Stats.php +++ /dev/null @@ -1,13 +0,0 @@ -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 diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ValueCount.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/ValueCount.php deleted file mode 100644 index 36fb2a2c..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ValueCount.php +++ /dev/null @@ -1,31 +0,0 @@ -setField($field); - } - - /** - * Set the field for this aggregation - * @param string $field the name of the document field on which to perform this aggregation - * @return ValueCount - */ - public function setField($field) - { - return $this->setParam('field', $field); - } -} \ No newline at end of file -- cgit v1.2.3-54-g00ecf