ES5.0——新特性

来源:互联网 发布:java中map的用法详解 编辑:程序博客网 时间:2024/06/13 17:15

DSL Changes

search_type=count 去除(removed)。替换为设置size=0
search_type=scan 去除(removed)。替换为 {"sort":["_doc"]}
shard count limit <1000, 但是也可以通过设置忽略该限制,通过设置 action.search.shard_count.limit 大于1000,但是不鼓励这么做
search exists 去除(removed)。替换为{"size":0,"terminate_after":1}

Mapping Changes

string =>text/keywords 。text 对内容分词;keyword 不分词
一个字段默认的设置,两种类型都会设定如下:

"b:contributor": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}

This allows to perform full-text search on the original field name and to sort and run aggregations on the sub keyword field.
这就允许在原始字段上进行全文搜索,在子字段上进行排序和聚合。
On all field datatypes (except for the deprecated string field)the index property now only accepts true/false instead of not_analyzed/no. The string field still accepts analyzed/not_analyzed/no
除了废弃的string字段,其他类型字段的Index属性只接受true 和 false

一个Index最多只能有1000个字段
一个字段的深度最多20级
一个index的nested字段最多50

REST API Changes

2.0之前只能 delete指定id的文档
2.0之后添加了Delete-By-Query 插件
5.0 替代为使用 Delete By Query API ,无需安装插件,可直接查询进行批量删除

待续……






0 0