From b2195eb021fdc2e999fd1349f95a2067c897274c Mon Sep 17 00:00:00 2001 From: munkie Date: Wed, 23 Jan 2013 00:02:03 +0400 Subject: [PATCH] Removed deprecated methods Query\QueryString::setTieBraker() and Query\QueryString::setQueryString() --- changes.txt | 5 ++-- lib/Elastica/Query/QueryString.php | 28 ------------------- .../Elastica/Test/Query/QueryStringTest.php | 4 +-- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/changes.txt b/changes.txt index 2a4f969610..f102ba530a 100644 --- a/changes.txt +++ b/changes.txt @@ -2,8 +2,9 @@ CHANGES 2013-01-22 - Removed deprecated method Type::getType() -- Removed deprecated old constructor call in Filter/GeoDistance::__construct() -- Removed deprecated method Filter/Script::setQuery() +- Removed deprecated old constructor call in Filter\GeoDistance::__construct() +- Removed deprecated method Filter\Script::setQuery() +- Removed deprecated methods Query\QueryString::setTieBraker() and Query\QueryString::setQueryString() 2013-01-21 - Added Thrift transport. Ir requires installing munkie/elasticsearch-thrift-php package and elasticsearch-tranport-thrift plugin should be installed in elastcisearch diff --git a/lib/Elastica/Query/QueryString.php b/lib/Elastica/Query/QueryString.php index e27885b4ba..c0bf4edb18 100644 --- a/lib/Elastica/Query/QueryString.php +++ b/lib/Elastica/Query/QueryString.php @@ -46,20 +46,6 @@ public function setQuery($query = '') return $this->setParam('query', $query); } - /** - * Sets the default operator AND or OR - * - * If no operator is set, OR is chosen - * - * @param string $queryString Query string - * @return \Elastica\Query\QueryString Current object - * @deprecated Please use setQuery instead - */ - public function setQueryString($queryString) - { - return $this->setQuery($queryString); - } - /** * Sets the default field * @@ -244,20 +230,6 @@ public function setUseDisMax($value = true) return $this->setParam('use_dis_max', (bool) $value); } - /** - * When using dis_max, the disjunction max tie breaker. - * - * If not set, defaults to 0. - * - * @param int $tieBreaker - * @return \Elastica\Query\QueryString Current object - * @deprecated - */ - public function setTieBraker($tieBreaker = 0) - { - return $this->setTieBreaker($tieBreaker); - } - /** * When using dis_max, the disjunction max tie breaker. * diff --git a/test/lib/Elastica/Test/Query/QueryStringTest.php b/test/lib/Elastica/Test/Query/QueryStringTest.php index a82d0f7e9f..059bad2d2b 100644 --- a/test/lib/Elastica/Test/Query/QueryStringTest.php +++ b/test/lib/Elastica/Test/Query/QueryStringTest.php @@ -118,9 +118,9 @@ public function testSetRewrite() /** * @expectedException \Elastica\Exception\InvalidException */ - public function testSetQueryStringInvalid() + public function testSetQueryInvalid() { $query = new QueryString(); - $query->setQueryString(array()); + $query->setQuery(array()); } }