Neil Zhu,简书ID Not_GOD,University AI 创始人 & Chief Scientist,致力于推进世界人工智能化进程。制定并实施 UAI 中长期增长战略和目标,带领团队快速成长为人工智能领域最专业的力量。
作为行业领导者,他和UAI一起在2014年创建了TASA(中国最早的人工智能社团), DL Center(深度学习知识中心全球价值网络),AI growth(行业智库培训)等,为中国的人工智能人才建设输送了大量的血液和养分。此外,他还参与或者举办过各类国际性的人工智能峰会和活动,产生了巨大的影响力,书写了60万字的人工智能精品技术内容,生产翻译了全球第一本深度学习入门书《神经网络与深度学习》,生产的内容被大量的专业垂直公众号和媒体转载与连载。曾经受邀为国内顶尖大学制定人工智能学习规划和教授人工智能前沿课程,均受学生和老师好评。
搜索变动
search_type=scan 舍弃
现在可以通过进行一个 scroll 请求将文档按照 _doc
排序获得同样的效果,例如:
GET /my_index/_search?scroll=2m
{
"sort": [
"_doc"
]
}
scroll 请求按照 _doc
进行排序已经优化得能够从前一个请求停止足够高效的恢复,这样其实可以能够获得前面 scan
搜索类型的性能。
search_type=count 舍弃
count
搜索类型已经被舍弃了。通过将 size
设置为 0
可以得到同样的效果,例如:
GET /my_index/_search
{
"aggs": {...},
"size": 0
}
from + size limits
Elasticsearch 现在返回错误信息,如果查询的 from
+ size
超过了 index.max_result_window
参数。这个参数默认是 10,000
这其实对几乎所有的集群已经足够安全了。超过了这个每个搜索和执行搜索时每个分片会消耗巨量的堆内存。最安全的做法是,将这个值当做任何深层滚动的 scroll API,但是这个设置也是动态的,所以可以根据需求增加和下降。
嵌套排序
如果在一个嵌套的对象中的一个字段进行排序,就要指定 nested_path
。在有尝试自动解决嵌套路径的前,有时候会出现错误。为了避免这个困扰,nested_path
必须被指定。
More Like This
MoreLikeThisQuery#ignoreLike 方法已经被 unlike 方法取代。
MoreLikeThisBuilder#addItem 已经被 MoreLikeThisBuilder#addLikeItem 取代。
更新的变动
Updates now detect_noop
by default
We’ve switched the default value of the detect_noop
option from false
to true
. This means that Elasticsearch will ignore updates that don’t change source unless you explicitly set "detect_noop": false
. detect_noop
was always computationally cheap compared to the expense of the update which can be thought of as a delete operation followed by an index operation.
索引变动
Optimize API
The Optimize API has been deprecated, all new optimize actions should use the new Force Merge API.
Queue size stats
The value for the queue_size
in nodes info/stats was sometimes shown as "1k"
instead of 1000
. These values are always shown as an integer now.
移除的特性
indices.fielddata.cache.expire
The experimental feature indices.fielddata.cache.expire
has been removed. For indices that have this setting configured, this config will be ignored.
Forbid changing of thread pool types
Previously, thread pool types could be dynamically adjusted. The thread pool type effectively controls the backing queue for the thread pool and modifying this is an expert setting with minimal practical benefits and high risk of being misused. The ability to change the thread pool type for any thread pool has been removed; do note that it is still possible to adjust relevant thread pool parameters for each of the thread pools (e.g., depending on the thread pool type, keep_alive , queue_size , etc.).
网友评论