From 1a365e77dfb8825136626202b1df462731b42060 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 16 Aug 2015 08:22:05 +0200 Subject: Update to MediaWiki 1.25.2 --- .../lib/Elastica/Aggregation/GeohashGrid.php | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php new file mode 100644 index 00000000..840198c3 --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php @@ -0,0 +1,61 @@ +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 -- cgit v1.2.2