歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Elasticsearch5.0 BreakChange摘要

Elasticsearch5.0 BreakChange摘要

日期:2017/2/28 13:46:59   编辑:Linux教程

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.* 的替代品
2 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 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved