Skip to content

Commit

Permalink
Prepare release 5.2.1 (#1323)
Browse files Browse the repository at this point in the history
* Update changelog
* Lint php files
  • Loading branch information
ruflin authored Jun 7, 2017
1 parent 1dd6c1e commit d3150a7
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 23 deletions.
17 changes: 14 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Change Log
All notable changes to this project will be documented in this file based on the [Keep a Changelog](http://keepachangelog.com/) Standard. This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased](https://github.com/ruflin/Elastica/compare/5.2.0...master)
## [Unreleased](https://github.com/ruflin/Elastica/compare/5.2.1...master)

### Backward Compatibility Breaks

### Bugfixes

### Added

### Improvements

### Deprecated


## [5.2.1](https://github.com/ruflin/Elastica/compare/5.2.0...5.2.1)

### Bugfixes

- Fix elastic 5.3.x deprecation warning related to Content-Type not being set.
- Fix updating settings of an index. [#1296](https://github.com/ruflin/Elastica/pull/1296)
- Fix bad parameter value to refresh document [#1318](https://github.com/rufli/Elastica/pull/1318)
Expand All @@ -15,7 +26,7 @@ All notable changes to this project will be documented in this file based on the

- Parameter `filter_path` for response filtering (e.g. `$index->search($query, ['filter_path' => 'hits.hits._source'])`)
- Add support for Health parameters for Cluster\Health endpoint (new prop : delayed_unassigned_shards, number_of_pending_tasks, number_of_in_flight_fetch, task_max_waiting_in_queue_millis, active_shards_percent_as_number)
- Add support for querystring in Type. this allow to use `update_all_types` in type mapping in order to resolve conflicts between fields in different types. [Conflicts between fields in different types](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#merging-conflicts)
- Add support for querystring in Type. this allow to use `update_all_types` in type mapping in order to resolve conflicts between fields in different types. [Conflicts between fields in different types](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#merging-conflicts)
- Added `\Elastica\Query\ParentId` to avoid join with parent documents [#1287](https://github.com/ruflin/Elastica/issues/1287)
- Added `\Elastica\Reindex` for reindexing between indices [#1311](https://github.com/ruflin/Elastica/issues/1311)

Expand All @@ -26,7 +37,7 @@ All notable changes to this project will be documented in this file based on the
### Deprecated
- Deprecated `Tool\CrossIndex` use `\Elastica\Reindex` instead [#1311](https://github.com/ruflin/Elastica/issues/1311)

## [Unreleased](https://github.com/ruflin/Elastica/compare/5.1.0...5.2.0)
## [5.2.0](https://github.com/ruflin/Elastica/compare/5.1.0...5.2.0)

### Bugfixes

Expand Down
8 changes: 4 additions & 4 deletions lib/Elastica/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@ public function bulk(array $params)
*
* It's possible to make any REST query directly over this method
*
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array|string $data OPTIONAL Arguments as array or pre-encoded string
* @param array $query OPTIONAL Query params
* @param string $path Path to call
* @param string $method Rest method to use (GET, POST, DELETE, PUT)
* @param array|string $data OPTIONAL Arguments as array or pre-encoded string
* @param array $query OPTIONAL Query params
* @param string $contentType Content-Type sent with this request
*
* @throws Exception\ConnectionException|\Exception
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Cluster/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function getUnassignedShards()
}

/**
* get the number of delayed unassined shards
* get the number of delayed unassined shards.
*
* @return int
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Elastica\Index\Stats as IndexStats;
use Elastica\ResultSet\BuilderInterface;
use Elasticsearch\Endpoints\AbstractEndpoint;
use Elasticsearch\Endpoints\Indices\Settings\Put;
use Elasticsearch\Endpoints\DeleteByQuery;
use Elasticsearch\Endpoints\Indices\Aliases\Update;
use Elasticsearch\Endpoints\Indices\Analyze;
Expand All @@ -21,6 +20,7 @@
use Elasticsearch\Endpoints\Indices\Mapping\Get;
use Elasticsearch\Endpoints\Indices\Open;
use Elasticsearch\Endpoints\Indices\Refresh;
use Elasticsearch\Endpoints\Indices\Settings\Put;

/**
* Elastica index object.
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Multi/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function search()
Request::POST,
$data,
$this->_options,
Request::NDJSON_CONTENT_TYPE
Request::NDJSON_CONTENT_TYPE
);

return $this->_builder->buildMultiResultSet($response, $this->getSearches());
Expand Down
6 changes: 4 additions & 2 deletions lib/Elastica/Reindex.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function _getBody($oldIndex, $newIndex, $options)
{
$body = array_merge([
'source' => $this->_getSourcePartBody($oldIndex, $options),
'dest' => $this->_getDestPartBody($newIndex, $options)
'dest' => $this->_getDestPartBody($newIndex, $options),
], $this->_resolveBodyOptions($options));

return $body;
Expand Down Expand Up @@ -114,6 +114,7 @@ private function _setSourceQuery(array $sourceBody)
if (isset($sourceBody[self::QUERY]) && $sourceBody[self::QUERY] instanceof AbstractQuery) {
$sourceBody[self::QUERY] = $sourceBody[self::QUERY]->toArray();
}

return $sourceBody;
}

Expand All @@ -132,8 +133,9 @@ private function _setSourceType(array $sourceBody)
if ($type instanceof Type) {
$sourceBody[self::TYPE][$key] = $type->getName();
}
}
}
}

return $sourceBody;
}
}
15 changes: 8 additions & 7 deletions lib/Elastica/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ class Request extends Param
/**
* Construct.
*
* @param string $path Request path
* @param string $method OPTIONAL Request method (use const's) (default = self::GET)
* @param array $data OPTIONAL Data array
* @param array $query OPTIONAL Query params
* @param string $path Request path
* @param string $method OPTIONAL Request method (use const's) (default = self::GET)
* @param array $data OPTIONAL Data array
* @param array $query OPTIONAL Query params
* @param Connection $connection
* @param string $contentType Content-Type sent with this request
*
* @return \Elastica\Request OPTIONAL Connection object
*/
public function __construct($path, $method = self::GET, $data = [], array $query = [], Connection $connection = null, $contentType = self::DEFAULT_CONTENT_TYPE )
public function __construct($path, $method = self::GET, $data = [], array $query = [], Connection $connection = null, $contentType = self::DEFAULT_CONTENT_TYPE)
{
$this->setPath($path);
$this->setMethod($method);
Expand Down Expand Up @@ -163,7 +163,8 @@ public function getConnection()
}

/**
* Set the Content-Type of this request
* Set the Content-Type of this request.
*
* @param string $contentType
*/
public function setContentType($contentType)
Expand All @@ -172,7 +173,7 @@ public function setContentType($contentType)
}

/**
* Get the Content-Type of this request
* Get the Content-Type of this request.
*/
public function getContentType()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Elastica/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function getName()
* Sets value type mapping for this type.
*
* @param \Elastica\Type\Mapping|array $mapping Elastica\Type\MappingType object or property array with all mappings
* @param array $query querystring when put mapping (for example update_all_types)
* @param array $query querystring when put mapping (for example update_all_types)
*
* @return \Elastica\Response
*/
Expand Down
2 changes: 1 addition & 1 deletion test/Elastica/Cluster/HealthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp()
'unassigned_shards' => 5,
'delayed_unassigned_shards' => 4,
'number_of_pending_tasks' => 1,
'number_of_in_flight_fetch' => 2,
'number_of_in_flight_fetch' => 2,
'task_max_waiting_in_queue_millis' => 634,
'active_shards_percent_as_number' => 50.0,

Expand Down
1 change: 0 additions & 1 deletion test/Elastica/SnapshotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function testRegisterRepository()
$repositoryName = 'testrepo';
$location = $this->_snapshotPath.'backup1';


$response = $this->_snapshot->registerRepository($repositoryName, 'fs', ['location' => $location]);
$this->assertTrue($response->isOk());

Expand Down
1 change: 0 additions & 1 deletion test/Elastica/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,6 @@ public function testExceptionMappingOnFieldsWithSameName()

/**
* @group functional
*
*/
public function testMappingOnFieldsWithSameName()
{
Expand Down

0 comments on commit d3150a7

Please sign in to comment.