Skip to content

Commit

Permalink
Remove QueryString::setAutoGeneratePhraseQueries
Browse files Browse the repository at this point in the history
Completely ignored since 6.x
  • Loading branch information
nomoa committed Apr 1, 2019
1 parent c7cfa1c commit 053155e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file based on the

### Backward Compatibility Breaks
* \Elastica\AbstractUpdateAction::getOptions( $fields ) no longer supports the $underscore parameter, option names must match what elasticsearch expects.
* Removed no longer supported \Elastica\Query\QueryString::setAutoGeneratePhraseQueries( $bool ) [#1622](https://github.com/ruflin/Elastica/pull/1622)

### Bugfixes
* Always set the Guzzle `base_uri` to support connecting to multiple ES hosts. [#1618](https://github.com/ruflin/Elastica/pull/1618)
Expand Down
14 changes: 0 additions & 14 deletions lib/Elastica/Query/QueryString.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,6 @@ public function setAnalyzeWildcard(bool $analyze = true): self
return $this->setParam('analyze_wildcard', $analyze);
}

/**
* Sets the param to automatically generate phrase queries.
*
* If not set, defaults to true.
*
* @param bool $autoGenerate
*
* @return $this
*/
public function setAutoGeneratePhraseQueries(bool $autoGenerate = true): self
{
return $this->setParam('auto_generate_phrase_queries', $autoGenerate);
}

/**
* Sets the fields. If no fields are set, _all is chosen.
* You cannot set fields and default_field.
Expand Down
12 changes: 0 additions & 12 deletions test/Elastica/Query/QueryStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,6 @@ public function testSetAnalyzeWildcard()
$this->assertEquals($value, $query->toArray()['query_string']['analyze_wildcard']);
}

/**
* @group unit
*/
public function testSetAutoGeneratePhraseQueries()
{
$value = true;
$query = new QueryString('test');
$query->setAutoGeneratePhraseQueries($value);

$this->assertEquals($value, $query->toArray()['query_string']['auto_generate_phrase_queries']);
}

/**
* @group unit
*/
Expand Down

0 comments on commit 053155e

Please sign in to comment.