Elasticsearch5.0 BreakChange摘要

Lucene版本

6.2.1

 

常用API变化重点关注

Java api 

1 client create方式变更;

2 count api removed;

3 suggest api removed;

4 groovy dependecies changed;

5 geoDistanceQueryBuilder相关变化;

6 highlight api有变化;

7 NodeBuilder 构建方式变化,降低使用频率;

以上是项目中用到的比较多的几个变化;

DSL Queries

1 search_type=count or scan has been removed

2 默认的搜索超过1000个shard copies 会被 拒绝,当然了你可以 设置更大的值 通过配置:action.search.shard_count.limit

3 一个大的变化,fields已经被stored_fields替代了,stored_fields只返回stored的数据,不会再从_source里边获得;

4 5.0之前所有被标注为@Deprecated的API都被删除;

更多内容参见 :https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_search_changes.html

Mapping Changes

1 string type 被 text和keyword类型替代了,text可用于全文检索,keyword用于排序、计数、精确查找;

2 数字类型的底层存储结构改变,现在用一个new BKD Tree的数据结构(占用更少的空间、对范围查询速度更快)替代;

3 geo_point fields 底层同样适用 new BKD Tree数据结构;

4 floating fields 默认用float替代了double,满足大多数情况占用更少的空间;

5 一个索引默认最多支持1000个字段,最多有20层嵌套,每个嵌套的对象最多有50个字段;

Setting Changes

1 Indexed Script 

  • script.indexed has been replaced by script.stored
  • 类似 script.engine.* 的替代品
script.inline and  script.stored settings已经被移除了,你现在仅仅可以设置 script.line: true or  script.stored: true.

 REST API Changes

1 _id的大小如果超过512 bytes,请求将被拒绝;

2 node roles 改变成:master、data、ingest、coordinating_only ;

PACKAGING

JVM 参数从 elasticsearch.in.sh 移动到了 jvm.options 里边

Plugins

1 bin/plugin 被 elasticsearch-plugin 替代;

FileSystem Related Changes

Only a subset of index files were open with mmap on Elasticsearch 2.x. As of Elasticsearch 5.0, all index files will be open with mmap on 64-bit systems.

While this may increase the amount of virtual memory used by Elasticsearch.

there is nothing to worry about since this is only address space consumption and the actual memory usage of Elasticsearch will stay similar to what it was in 2.x. 

Scripts Change

1 The default scripting language for Elasticsearch is now Painless(https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-painless.html)

Painless的优势

对比:

官方Breaking Changes

https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes.html

转载于:https://www.cnblogs.com/zhangxiaoguang/p/es_50_breakchanges.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值