Elasticsearch5.0 BreakChange摘要-演道网

Lucene版本

6.2.1

开源搜索引擎Elasticsearch 5.0版本正式发布  http://www.linuxidc.com/Linux/2016-11/136669.htm

常用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

凌渡冰 目前就职于美团 Do what you like to impact the world.
 
ElasticSearch 最新版本 2.20 发布下载了  http://www.linuxidc.com/Linux/2016-02/128166.htm

Linux上安装部署ElasticSearch全程记录  http://www.linuxidc.com/Linux/2015-09/123241.htm

Elasticsearch安装使用教程 http://www.linuxidc.com/Linux/2015-02/113615.htm

ElasticSearch 配置文件译文解析 http://www.linuxidc.com/Linux/2015-02/114244.htm

ElasticSearch集群搭建实例  http://www.linuxidc.com/Linux/2015-02/114243.htm

分布式搜索ElasticSearch单机与服务器环境搭建  http://www.linuxidc.com/Linux/2012-05/60787.htm

ElasticSearch的工作机制  http://www.linuxidc.com/Linux/2014-11/109922.htm 

Elasticsearch的安装,运行和基本配置 http://www.linuxidc.com/Linux/2016-07/133057.htm

使用Elasticsearch + Logstash + Kibana搭建日志集中分析平台实践  http://www.linuxidc.com/Linux/2015-12/126587.htm

Ubuntu 14.04搭建ELK日志分析系统(Elasticsearch+Logstash+Kibana) http://www.linuxidc.com/Linux/2016-06/132618.htm

ElasticSearch 的详细介绍请点这里
ElasticSearch 的下载地址请点这里 

转载自演道,想查看更及时的互联网产品技术热点文章请点击http://go2live.cn

发表评论

电子邮件地址不会被公开。 必填项已用*标注