# 5.1.2 Release Notes

原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/release-notes-5.1.2.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/release-notes-5.1.2.html)

译文链接 : [http://www.apache.wiki/display/Elasticsearch/5.1.2+Release+Notes](http://www.apache.wiki/display/Elasticsearch/5.1.2+Release+Notes)

贡献者 : [于永超](/display/~yuyongchao)，[ApacheCN](/display/~apachecn)，[Apache中文网](/display/~apachechina)

也可以参阅 [在 5.1 的重大变化](/pages/viewpage.action?pageId=9406177)。

### Enhancements（改进的功能）

Internal

*   不要在 **RecoveryFailedException **中输出空的 **source** **node**（源节点）[#21963](https://github.com/elastic/elasticsearch/pull/21963)

Mapping

*   如果字段类型更改，则只更新 **DocumentMapper **[#22165](https://github.com/elastic/elasticsearch/pull/22165)

Network

*   禁用 **Netty recycler** [#22452](https://github.com/elastic/elasticsearch/pull/22452)（issues: [#22189](https://github.com/elastic/elasticsearch/issues/22189)， [#22360](https://github.com/elastic/elasticsearch/issues/22360)， [#22406](https://github.com/elastic/elasticsearch/issues/22406)， [#5904](https://github.com/elastic/elasticsearch/issues/5904)）
*   Tell Netty not to be unsafe in transport client [#22284](https://github.com/elastic/elasticsearch/pull/22284)

Plugins

*   如果插件存在，则提供有用的错误信息 [#22305](https://github.com/elastic/elasticsearch/pull/22305)（issue: [#22084](https://github.com/elastic/elasticsearch/issues/22084)）
*   添加一个 **shutdown **钩子，用于 **CLI **命令行 [#22126](https://github.com/elastic/elasticsearch/pull/22126)（issue: [#22111](https://github.com/elastic/elasticsearch/issues/22111)）

### Bug fixes（Bug 修复）

Aggregations

*   允许在纯布尔脚本上进行 **terms aggregations** [#22201](https://github.com/elastic/elasticsearch/pull/22201)（issue: [#20941](https://github.com/elastic/elasticsearch/issues/20941)）
*   IP range masks exclude the maximum address of the range. [#22018](https://github.com/elastic/elasticsearch/pull/22018)（issue: [#22005](https://github.com/elastic/elasticsearch/issues/22005)）
*   Fix `other_bucket` on the `filters` agg to be enabled if a key is set. [#21994](https://github.com/elastic/elasticsearch/pull/21994)（issue: [#21951](https://github.com/elastic/elasticsearch/issues/21951)）

Allocation

*   当初始化主分片失败时，将副本提升为主分片 [#22021](https://github.com/elastic/elasticsearch/pull/22021)
*   只有在增长时设置调整同步分配 [#21976](https://github.com/elastic/elasticsearch/pull/21976)（issue: [#21719](https://github.com/elastic/elasticsearch/issues/21719)）

Analysis

*   Pre-built analysis factories do not implement MultiTermAware correctly. [#21981](https://github.com/elastic/elasticsearch/pull/21981)

CURD

*   在创建是废弃外部版本控制和内部版本号[#21998](https://github.com/elastic/elasticsearch/pull/21998)

Core

*   **readVLong **支持负数[#22314](https://github.com/elastic/elasticsearch/pull/22314)

Exceptions

*   修复 **shard**（分片）恢复的错误消息，以正确报告每个节点的文档数量 [#22515](https://github.com/elastic/elasticsearch/pull/22515)（issue: [#21893](https://github.com/elastic/elasticsearch/issues/21893)）

Index APIs

*   确保 **shrunk indices** 从它的 **source **继承版本信息[#22469](https://github.com/elastic/elasticsearch/pull/22469)（issue: [#22373](https://github.com/elastic/elasticsearch/issues/22373)）

Java REST Client

*   在 **RequestLogger **里不要用 **null **字符 [#22197](https://github.com/elastic/elasticsearch/pull/22197)（issue: [#22190](https://github.com/elastic/elasticsearch/issues/22190)）

Mapping

*   **_all** 字段默认映射程序未完全配置 [#22236](https://github.com/elastic/elasticsearch/pull/22236)
*   修复 **MapperService.allEnabled（） **方法 [# 22227](https://github.com/elastic/elasticsearch/pull/22227)

Nested Docs

*   修复忽略 **ignore_unmapped **选项的查询构建器重写中的错误 [#22456](https://github.com/elastic/elasticsearch/pull/22456)

Packaging

*   在 **Windows **上处理路径的另一个修复 [#22132](https://github.com/elastic/elasticsearch/pull/22132)（issue: [#21921](https://github.com/elastic/elasticsearch/issues/21921)）

Percolator

*   针对 **percolator **带范围的查询，修复 **NPE **在 **percolator **的 **now **关键词的检查 [#22356](https://github.com/elastic/elasticsearch/pull/22356)（issue: [#22355](https://github.com/elastic/elasticsearch/issues/22355)）

Plugin Lang Painless

*   提高 **Painless **的最大循环次数 [#22560](https://github.com/elastic/elasticsearch/pull/22560)（issue: [#22508](https://github.com/elastic/elasticsearch/issues/22508)）

Recovery

*   Fix primary relocation for shadow replicas [#22474](https://github.com/elastic/elasticsearch/pull/22474)（issue: [#20300](https://github.com/elastic/elasticsearch/issues/20300)）
*   在 **CancellableThreads** [#22434](https://github.com/elastic/elasticsearch/pull/22434) 不要关闭 **store**（issue: [#22325](https://github.com/elastic/elasticsearch/issues/22325)）
*   在重试恢复时使用新的恢复 **id** [#22325](https://github.com/elastic/elasticsearch/pull/22325)（issue: [#22043](https://github.com/elastic/elasticsearch/issues/22043)）
*   允许在标记为重定位的分片上进行 **flush / force_merge / upgrade** [#22078](https://github.com/elastic/elasticsearch/pull/22078)（issue: [#22043](https://github.com/elastic/elasticsearch/issues/22043)）

Reindex API

*   不要关闭 **rest **客户端端回调  [#22061](https://github.com/elastic/elasticsearch/pull/22061)（issue: [#22027](https://github.com/elastic/elasticsearch/issues/22027)）

Search

*   提高 **ShardCoreKeyMap **的并发性 [#22316](https://github.com/elastic/elasticsearch/pull/22316)
*   Make `-0` compare less than `+0` consistently（使 **-0 **比较小于 **+0** 一致）[#22173](https://github.com/elastic/elasticsearch/pull/22173)（issue: [#22167](https://github.com/elastic/elasticsearch/issues/22167)）
*   **FiltersAggregationBuilder** : 重写过滤器查询，与 **FilterAggregationBuilder **相同 [#22076](https://github.com/elastic/elasticsearch/pull/22076)

Stats

*   实现 **geo_point **和 **geo_shape **字段的统计信息 [#22391](https://github.com/elastic/elasticsearch/pull/22391)（issue: [#22384](https://github.com/elastic/elasticsearch/issues/22384)） 
*   使用阅读器进行文档统计  [#22317](https://github.com/elastic/elasticsearch/pull/22317)（issue: [#22285](https://github.com/elastic/elasticsearch/issues/22285)）
*   如果禁用 **HTTP**，请避免在 **NodeService＃stats中 **使用 **NPE** [#22060](https://github.com/elastic/elasticsearch/pull/22060)（issue: [#22058](https://github.com/elastic/elasticsearch/issues/22058)）
*   在索引 **stats REST **处理程序中添加对 “**include_segment_file_sizes**” 的支持 [#21879](https://github.com/elastic/elasticsearch/pull/21879)（issue: [#21878](https://github.com/elastic/elasticsearch/issues/21878)）

Term Vectors

*   Fix _termvectors with preference to not hit NPE [#21959](https://github.com/elastic/elasticsearch/pull/21959)

*   在分片中找不到字段时返回正确的 **term** **statistics**（词条统计信息） [#21922](https://github.com/elastic/elasticsearch/pull/21922)（issue: [#21906](https://github.com/elastic/elasticsearch/issues/21906)）

### Regressions

Logging

*   恢复搜索慢 查询日志的原始默认格式 [#21770](https://github.com/elastic/elasticsearch/pull/21770)（issue: [#21711](https://github.com/elastic/elasticsearch/issues/21711)）