diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
commit | 80f7dc77d430774192b929d780f96260066df2ee (patch) | |
tree | 102eaae7fc9ec567f2af76e96da3de2d1e83afcf /vendor/ruflin/elastica/lib/Elastica/Query/Match.php | |
parent | cccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff) |
Update to MediaWiki 1.25.3
Diffstat (limited to 'vendor/ruflin/elastica/lib/Elastica/Query/Match.php')
-rw-r--r-- | vendor/ruflin/elastica/lib/Elastica/Query/Match.php | 198 |
1 files changed, 0 insertions, 198 deletions
diff --git a/vendor/ruflin/elastica/lib/Elastica/Query/Match.php b/vendor/ruflin/elastica/lib/Elastica/Query/Match.php deleted file mode 100644 index ba66ad63..00000000 --- a/vendor/ruflin/elastica/lib/Elastica/Query/Match.php +++ /dev/null @@ -1,198 +0,0 @@ -<?php - -namespace Elastica\Query; - -/** - * Match query - * - * @category Xodoa - * @package Elastica - * @author F21 - * @author WONG Wing Lun <luiges90@gmail.com> - * @link http://www.elasticsearch.org/guide/reference/query-dsl/match-query.html - */ -class Match extends AbstractQuery -{ - const ZERO_TERM_NONE = 'none'; - const ZERO_TERM_ALL = 'all'; - - /** - * Sets a param for the message array - * - * @param string $field - * @param mixed $values - * @return \Elastica\Query\Match - */ - public function setField($field, $values) - { - return $this->setParam($field, $values); - } - - /** - * Sets a param for the given field - * - * @param string $field - * @param string $key - * @param string $value - * @return \Elastica\Query\Match - */ - public function setFieldParam($field, $key, $value) - { - if (!isset($this->_params[$field])) { - $this->_params[$field] = array(); - } - - $this->_params[$field][$key] = $value; - - return $this; - } - - /** - * Sets the query string - * - * @param string $field - * @param string $query - * @return \Elastica\Query\Match - */ - public function setFieldQuery($field, $query) - { - return $this->setFieldParam($field, 'query', $query); - } - - /** - * Set field type - * - * @param string $field - * @param string $type - * @return \Elastica\Query\Match - */ - public function setFieldType($field, $type) - { - return $this->setFieldParam($field, 'type', $type); - } - - /** - * Set field operator - * - * @param string $field - * @param string $operator - * @return \Elastica\Query\Match - */ - public function setFieldOperator($field, $operator) - { - return $this->setFieldParam($field, 'operator', $operator); - } - - /** - * Set field analyzer - * - * @param string $field - * @param string $analyzer - * @return \Elastica\Query\Match - */ - public function setFieldAnalyzer($field, $analyzer) - { - return $this->setFieldParam($field, 'analyzer', $analyzer); - } - - /** - * Set field boost value - * - * If not set, defaults to 1.0. - * - * @param string $field - * @param float $boost - * @return \Elastica\Query\Match - */ - public function setFieldBoost($field, $boost = 1.0) - { - return $this->setFieldParam($field, 'boost', (float) $boost); - } - - /** - * Set field minimum should match - * - * @param string $field - * @param int|string $minimumShouldMatch - * @return \Elastica\Query\Match - * @link Possible values for minimum_should_match http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html - */ - public function setFieldMinimumShouldMatch($field, $minimumShouldMatch) - { - return $this->setFieldParam($field, 'minimum_should_match', $minimumShouldMatch); - } - - /** - * Set field fuzziness - * - * @param string $field - * @param mixed $fuzziness - * @return \Elastica\Query\Match - */ - public function setFieldFuzziness($field, $fuzziness) - { - return $this->setFieldParam($field, 'fuzziness', $fuzziness); - } - - /** - * Set field fuzzy rewrite - * - * @param string $field - * @param string $fuzzyRewrite - * @return \Elastica\Query\Match - */ - public function setFieldFuzzyRewrite($field, $fuzzyRewrite) - { - return $this->setFieldParam($field, 'fuzzy_rewrite', $fuzzyRewrite); - } - - /** - * Set field prefix length - * - * @param string $field - * @param int $prefixLength - * @return \Elastica\Query\Match - */ - public function setFieldPrefixLength($field, $prefixLength) - { - return $this->setFieldParam($field, 'prefix_length', (int) $prefixLength); - } - - /** - * Set field max expansions - * - * @param string $field - * @param int $maxExpansions - * @return \Elastica\Query\Match - */ - public function setFieldMaxExpansions($field, $maxExpansions) - { - return $this->setFieldParam($field, 'max_expansions', (int) $maxExpansions); - } - - /** - * Set zero terms query - * - * If not set, default to 'none' - * - * @param string $field - * @param string $zeroTermQuery - * @return \Elastica\Query\Match - */ - public function setFieldZeroTermsQuery($field, $zeroTermQuery = 'none') - { - return $this->setFieldParam($field, 'zero_terms_query', $zeroTermQuery); - } - - /** - * Set cutoff frequency - * - * @param string $field - * @param float $cutoffFrequency - * @return \Elastica\Query\Match - */ - public function setFieldCutoffFrequency($field, $cutoffFrequency) - { - return $this->setFieldParam($field, 'cutoff_frequency', $cutoffFrequency); - } -} |