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 --- .../ruflin/elastica/lib/Elastica/Query/Regexp.php | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 vendor/ruflin/elastica/lib/Elastica/Query/Regexp.php (limited to 'vendor/ruflin/elastica/lib/Elastica/Query/Regexp.php') diff --git a/vendor/ruflin/elastica/lib/Elastica/Query/Regexp.php b/vendor/ruflin/elastica/lib/Elastica/Query/Regexp.php new file mode 100644 index 00000000..22a48560 --- /dev/null +++ b/vendor/ruflin/elastica/lib/Elastica/Query/Regexp.php @@ -0,0 +1,40 @@ + + * + * @link http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html + */ +class Regexp extends AbstractQuery +{ + /** + * Construct regexp query. + * + * @param string $key OPTIONAL Regexp key + * @param string $value OPTIONAL Regexp value + * @param float $boost OPTIONAL Boost value (default = 1) + */ + public function __construct($key = '', $value = null, $boost = 1.0) + { + if (!empty($key)) { + $this->setValue($key, $value, $boost); + } + } + + /** + * Sets the query expression for a key with its boost value. + * + * @param string $key + * @param string $value + * @param float $boost + * + * @return $this + */ + public function setValue($key, $value, $boost = 1.0) + { + return $this->setParam($key, array('value' => $value, 'boost' => $boost)); + } +} -- cgit v1.2.3-54-g00ecf