From a1789ddde42033f1b05cc4929491214ee6e79383 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 17 Dec 2015 09:15:42 +0100 Subject: Update to MediaWiki 1.26.0 --- .../lib/Elastica/Aggregation/ScriptedMetric.php | 82 ++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/ScriptedMetric.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation/ScriptedMetric.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/ScriptedMetric.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/ScriptedMetric.php new file mode 100644 index 00000000..3e51f056 --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Aggregation/ScriptedMetric.php @@ -0,0 +1,82 @@ +setInitScript($initScript); + } + if ($mapScript) { + $this->setMapScript($mapScript); + } + if ($combineScript) { + $this->setCombineScript($combineScript); + } + if ($reduceScript) { + $this->setReduceScript($reduceScript); + } + } + + /** + * Set the field for this aggregation. + * + * @param string $script the name of the document field on which to perform this aggregation + * + * @return $this + */ + public function setCombineScript($script) + { + return $this->setParam('combine_script', $script); + } + + /** + * Set the field for this aggregation. + * + * @param string $script the name of the document field on which to perform this aggregation + * + * @return $this + */ + public function setInitScript($script) + { + return $this->setParam('init_script', $script); + } + + /** + * Set the field for this aggregation. + * + * @param string $script the name of the document field on which to perform this aggregation + * + * @return $this + */ + public function setMapScript($script) + { + return $this->setParam('map_script', $script); + } + + /** + * Set the field for this aggregation. + * + * @param string $script the name of the document field on which to perform this aggregation + * + * @return $this + */ + public function setReduceScript($script) + { + return $this->setParam('reduce_script', $script); + } +} -- cgit v1.2.3-54-g00ecf