Elasticsearch 7.0 正式发布,盘他!

                <p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">Elastic{ON}北京分享了Elasticsearch7.0在Speed,Scale,Relevance等方面的很多新特性。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">比快更快,有传说中的那么牛逼吗?</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">盘他</span></code><span style="font-size: 15px;">!</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">通过本文,你能了解到:</span></p><ul style="" class="list-paddingleft-2"><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">Elasticsearch&amp;Kibana 7.部署体验</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">Elasticsearch7 革命性更新</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">Elasticsearch 7升级注意事项</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">Elasticsearch&nbsp;版本更新太快了,学不动了,肿么办?</span></p></li></ul><h3 style="color: inherit;font-weight: bold;font-size: 1.3em;border-bottom: 2px solid rgb(0, 172, 193);line-height: 1.5em;text-align: justify;margin-top: 20px;margin-bottom: 20px;"><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 16px;">1、Elasticsearch&amp;Kibana 7.部署体验</span><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 15px;"></span></h3><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.1 Elasticsearch 7.0 默认自带 JDK</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">不用再为安装什么版本的&nbsp;JDK和环境冲突而苦恼了,下载安装即可使用。&nbsp;</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">对比可知,包大了200MB+,正是JDK的大小。</span></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.06502890173410404" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPBQP17klTWZwOMJiaaqJvxicI7xHqFreiayBqEAUib9kKQYvaQshRDAPeug/640?wx_fmt=png" data-type="png" data-w="692" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 677px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPBQP17klTWZwOMJiaaqJvxicI7xHqFreiayBqEAUib9kKQYvaQshRDAPeug/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.2&nbsp;默认节点名称为主机名。</span></h4><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.1855921855921856" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPhmSAPYibCVtzb6fUjmH86icZeVHXxpfzvL1pMHMfmrrUxky87rmrxk3A/640?wx_fmt=png" data-type="png" data-w="819" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 677px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPhmSAPYibCVtzb6fUjmH86icZeVHXxpfzvL1pMHMfmrrUxky87rmrxk3A/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><p style="font-size: 16px;color: rgb(62, 62, 62);letter-spacing: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">不过仍然可以在elasticsearch.yml中显式配置。</span></p><p style="font-size: 16px;color: rgb(62, 62, 62);letter-spacing: 0px;font-family: &quot;Helvetica Neue&quot;, Helvetica, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">实际业务场景中,以主机名区分不同节点比随机起名字更便于甄别,不易混淆。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.3&nbsp;默认分片数改为1,不再是5。</span></h4><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.7932011331444759" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfP4vkUMia0ghpyvZ0mQ6wjqpvWWZ4jHyg7YWicd3KicEficFDfZnWbWP3Yxg/640?wx_fmt=png" data-type="png" data-w="353" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 353px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="353px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfP4vkUMia0ghpyvZ0mQ6wjqpvWWZ4jHyg7YWicd3KicEficFDfZnWbWP3Yxg/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.4&nbsp;Elasticsearch&nbsp;7.0&nbsp;没有&nbsp;Type&nbsp;了,包括&nbsp;API&nbsp;层面的。</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">如下所示,确切的说,正确的使用方法,使用默认的_doc作为type就可以了。</span><br><span style="font-size: 15px;">type会在8.X版本彻底移除。</span><br></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="1.6666666666666667" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfP9MicdicrAm5w9IU4kJ95vfuZC1rax80Ah3Ktf2QiaJVNx2pF6yhxb52ag/640?wx_fmt=png" data-type="png" data-w="444" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 444px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="444px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfP9MicdicrAm5w9IU4kJ95vfuZC1rax80Ah3Ktf2QiaJVNx2pF6yhxb52ag/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><h2 style="color: inherit;font-weight: bold;font-size: 1.4em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.5 hits.total返回对象,而非仅结果值</span></h2><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">现在,与搜索请求匹配的总命中数将作为具有值和关系的对象返回。&nbsp;</span><br><span style="font-size: 15px;">value表示匹配的匹配数,</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">关系表示值是准确的(eq)还是非准确的(gte)。</span><br></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="1.0451388888888888" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPJ63B10iaoiauxGlpzkibYMaox3Ls7UicoMEKB2RH1jjR3FoU4SYOvppCag/640?wx_fmt=png" data-type="png" data-w="288" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 288px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="288px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPJ63B10iaoiauxGlpzkibYMaox3Ls7UicoMEKB2RH1jjR3FoU4SYOvppCag/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">1.6 Kibana 支持全局开启“黑暗”模式</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">用户可以选择打开主题:Kibana-&gt;高级设置-&gt;dark&nbsp;Mode,而不是必须在很多地方打开黑暗模式,它将适用于所有应用程序。</span></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.28401360544217685" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPBfYasxZcKCvXINJIgCk3WJO6ndquu0X5hPNG48avriaUsWVicoqZxmAA/640?wx_fmt=png" data-type="png" data-w="588" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 588px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="588px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPBfYasxZcKCvXINJIgCk3WJO6ndquu0X5hPNG48avriaUsWVicoqZxmAA/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><p><br></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.4074074074074074" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPU97mNYwurTgxT8g6gtoqIm1mAh0n4ZXDQp2ZHxTQGBeMJ0hR9aeiaSg/640?wx_fmt=png" data-type="png" data-w="1836" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 677px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPU97mNYwurTgxT8g6gtoqIm1mAh0n4ZXDQp2ZHxTQGBeMJ0hR9aeiaSg/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><h3 style="color: inherit;font-weight: bold;font-size: 1.3em;border-bottom: 2px solid rgb(0, 172, 193);line-height: 1.5em;text-align: justify;margin-bottom: 20px;margin-top: 20px;"><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 16px;">2、Elasticsearch7 革命性更新</span><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 15px;"></span></h3><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">2.1 查询相关性速度优化</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">Weak-AND算法在Term&nbsp;Query查询场景有3700%的性能提升。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">如下所示,除了Term检索,Fuzzy,Phrase,&nbsp;Bool&nbsp;And&nbsp;.Bool&nbsp;OR都有大幅的性能提升!</span><br></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.5" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPGEiaxJQQIlWYuwqKXPfm4C2Ty1pmfBEPFoJKSAJ67v599p4nuZ8b57w/640?wx_fmt=png" data-type="png" data-w="902" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 677px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPGEiaxJQQIlWYuwqKXPfm4C2Ty1pmfBEPFoJKSAJ67v599p4nuZ8b57w/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><p><br></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">啥是weak-and算法?</span><br><span style="font-size: 15px;">核心原理:</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">取TOP N结果集,估算命中记录数</span></code><span style="font-size: 15px;">。</span></p><blockquote style="line-height: inherit;padding: 15px 15px 15px 1rem;color: rgb(129, 145, 152);border-left-width: 6px;border-left-color: rgb(220, 230, 240);background: rgb(242, 247, 251);overflow: auto;word-wrap: normal;word-break: normal;"><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">简单来说,一般我们在计算文本相关性的时候,会通过倒排索引的方式进行查询,通过倒排索引已经要比全量遍历节约大量时间,但是有时候仍然很慢。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">原因是很多时候我们其实只是想要top n个结果,一些结果明显较差的也进行了复杂的相关性计算,</span></p><p style="color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">而weak-and算法通过计算</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">每个词的贡献上限</span></code><span style="font-size: 15px;">来估计</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">文档的相关性上限</span></code><span style="font-size: 15px;">,从而建立一个阈值对倒排中的结果进行</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">减枝</span></code><span style="font-size: 15px;">,从而得到提速的效果。</span></p></blockquote><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">2.2 间隔查询(Intervals queries)</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">某些搜索用例(例如,法律和专利搜索)引入了查找单词或短语彼此相距一定距离的记录的需要。&nbsp;</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">Elasticsearch&nbsp;7.0中的间隔查询引入了一种构建此类查询的全新方式,与之前的方法(跨度查询span&nbsp;queries)相比,使用和定义更加简单。&nbsp;</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">与跨度查询相比,间隔查询对边缘情况的适应性更强。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">2.3 引入新的集群协调子系统</span></h4><blockquote style="line-height: inherit;padding: 15px 15px 15px 1rem;font-size: 0.9em;color: rgb(129, 145, 152);border-left-width: 6px;border-left-color: rgb(220, 230, 240);background: rgb(242, 247, 251);overflow: auto;word-wrap: normal;word-break: normal;"><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">移除&nbsp;minimum_master_nodes&nbsp;参数,让&nbsp;Elasticsearch&nbsp;自己选择可以形成仲裁的节点。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">典型的主节点选举现在只需要很短的时间就可以完成。&nbsp;</span><br><span style="font-size: 15px;">集群的伸缩变得更安全、更容易,并且可能造成丢失数据的系统配置选项更少了。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">节点更清楚地记录它们的状态,有助于诊断为什么它们不能加入集群或为什么无法选举出主节点。</span></p></blockquote><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">2.4 升级 Elasticsearch 7,0 ,不再内存溢出</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">新的&nbsp;Circuit&nbsp;Breaker&nbsp;在JVM&nbsp;堆栈层面监测内存使用,Elasticsearch&nbsp;比之前更加健壮。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">设置indices.breaker.fielddata.limit的默认值已从JVM堆大小的60%降低到40%。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">2.5 时间戳纳秒级支持,提升数据精度</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">利用纳秒精度支持加强时间序列用例</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">到目前为止,Elasticsearch仅以毫秒精度存储时间戳。&nbsp;7.0增加了几个零并带来了纳秒精度,这提高了高频数据采集用户存储和排序所需数据的精度。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">显然,7.0的特性</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">远不止这些</span></code><span style="font-size: 15px;">,更多新版本特性推荐阅读:</span><br></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;color: rgb(255, 104, 39);">http://t.cn/EXyStrW</span></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;color: rgb(255, 104, 39);">http://t.cn/EXyStrO</span><span style="font-size: 15px;"></span></p><h3 style="color: inherit;font-weight: bold;font-size: 1.3em;border-bottom: 2px solid rgb(0, 172, 193);line-height: 1.5em;text-align: justify;margin-top: 20px;margin-bottom: 20px;"><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 16px;">3、Elasticsearch 7升级注意事项</span><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 15px;"></span></h3><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.0 升级前必知必会</span></h4><ol style="" class="list-paddingleft-2"><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">查看新版本的重大更改特性,并对7.0.0的代码和配置进行必要的更改。</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">如果您使用自定义插件,请确保兼容版本可用。</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">在升级生产集群之前,在开发环境中测试升级。</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">备份您的数据</span></code><span style="font-size: 15px;">!&nbsp;您必须拥有数据快照才能回滚到早期版本。</span></p></li></ol><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.1 升级API</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">Rolling&nbsp;upgrade&nbsp;——滚动升级允许Elasticsearch集群一次升级一个节点,升级不会中断服务。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">不支持在升级期间在同一群集中运行多个版本的Elasticsearch,因为无法将已升级的节点复制到运行旧版本的节点。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.2 版本升级路线</span></h4><ul style="" class="list-paddingleft-2"><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">小版本之间升级:举例:5.4.1升级到5.6</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">平滑升级——从5.6版本到6.7版本</span></p></li><li><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">平滑升级——从6.7版本到7.0.0版本</span></p></li></ul><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.3 借助Reindex升级索引数据</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">Elasticsearch可以读取在先前主要版本中创建的索引。如果您在5.x或之前创建了索引,则必须在升级到7.0.0之前重新索引或删除它们。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">如果存在不兼容的索引,Elasticsearch节点将无法启动。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.4 ELK Stack要一起升级</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">升级到新版本的Elasticsearch时,需要升级Elastic&nbsp;Stack中的每个产品。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.5 6.6或更早版本集群,需要先关闭</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">要从6.6或更早版本直接升级到7.0.0,必须关闭群集,安装7.0.0并重新启动。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">3.6&nbsp;切记,7.0+版本`无type`的索引结构。</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">这点,如果考虑未来更新版本,在6.X或者更早版本的项目中,就严格按照7.x规范走,这样升级会相对比较省事。</span></p><h3 style="color: inherit;font-weight: bold;font-size: 1.3em;border-bottom: 2px solid rgb(0, 172, 193);line-height: 1.5em;text-align: justify;margin-top: 20px;margin-bottom: 20px;"><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 16px;">4、Elasticsearch&nbsp;版本更新太快了,学不动了,肿么办?</span><span style="line-height: inherit;display: inline-block;font-weight: normal;background: rgb(0, 172, 193);color: rgb(255, 255, 255);padding-top: 3px;padding-right: 10px;padding-left: 10px;border-top-right-radius: 3px;border-top-left-radius: 4px;margin-right: 2px;font-size: 15px;"></span></h3><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="" data-ratio="0.30527638190954776" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPAdH2e1CUUSUcCbicRn4e9WZRA5d8BEg0I5Z6bhicQRy6A1X365ONnRQQ/640?wx_fmt=png" data-type="png" data-w="796" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 677px !important; height: auto !important; visibility: visible !important;" title="在这里插入图片描述" _width="677px" src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPAdH2e1CUUSUcCbicRn4e9WZRA5d8BEg0I5Z6bhicQRy6A1X365ONnRQQ/640?wx_fmt=png&amp;tp=webp&amp;wxfrom=5&amp;wx_lazy=1&amp;wx_co=1" crossorigin="anonymous" data-fail="0"></figure><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">一方面,我们感叹ES的更新速度,的确从2016年的2.X到2019年的7.0,版本更新速度超乎想象。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">另一方面,实际业务开发中,还在使用1.X,2.X,5.X,甚至还没有用过6.X的朋友非常多,小伙伴不禁有了“学不动了”的感慨。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">4.1 新版本的变</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">变是永恒的</span></code><span style="font-size: 15px;">,尤其是基于开源软件加上上市公司的推动。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">实际上,高版本较低版本,主要在性能上的提升和部分新功能点的实现。</span></p><ol style="list-style-type: decimal;" class="list-paddingleft-2"><li><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;"><strong style="font-size: inherit;color: inherit;line-height: inherit;">新版本更高效。</strong><strong style="font-size: inherit;color: inherit;line-height: inherit;"></strong></span><br><span style="font-size: 15px;">比如:6.6+提出的ilm索引生命周期管理,你如果关注Elastic&nbsp;Meetup的话,印象ebay和阿里还有其他公司自己就实现过类似功能。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;color: inherit;">原有版本有类似的功能,只不过是非常、非常麻烦、繁琐,所以,才有了ilm的诞生。</span></p></li><li><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;"><strong style="font-size: inherit;color: inherit;line-height: inherit;">新版本迎合了市场的需求。</strong><strong style="font-size: inherit;color: inherit;line-height: inherit;"></strong></span><br><span style="font-size: 15px;">比如:7.0的黑暗模式,实际在grafana或类似竞品BI中都有类似的功能,猜测Kibana升级一方面是用户需求,另一方面也是竞品分析的结果。</span></p></li><li><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;"><strong style="font-size: inherit;color: inherit;line-height: inherit;">新版本性能极大提升。</strong><strong style="font-size: inherit;color: inherit;line-height: inherit;"></strong></span><br><span style="font-size: 15px;">比如:7.0的terms融合新算法,有37倍的提升。</span></p></li></ol><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">4.2 新版本的不变</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">《暗时间》作者刘未鹏说过“</span><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">底层的技术永远不过时</span></code><span style="font-size: 15px;">”。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">不必说倒排索引机制不会变,也不必说Lucene的改动也相对较小。单是:ES的基础功能全文检索、多种聚合等几乎不会有太大的变动。</span></p><h4 style="color: inherit;font-weight: bold;font-size: 1.2em;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="color: inherit;line-height: inherit;font-size: 15px;">4.3&nbsp;还存在学不动吗?</span></h4><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">夯实打牢基础基本功,理解ELK更新的变与不变。80-90%+的时间关注基础,10%左右的时间关注增量的变化即可。</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><code style="font-size: inherit;line-height: inherit;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin-right: 2px;margin-left: 2px;color: rgb(233, 105, 0);background: rgb(248, 248, 248);"><span style="font-size: 15px;">以不变应万变</span></code><span style="font-size: 15px;">,方为生存之道!</span></p><p style="font-size: inherit;color: inherit;line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">参考:</span><br></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">http://t.cn/EXySp7K</span></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="font-size: 15px;">http://t.cn/EMg3uRw</span></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><span style="background-color: rgb(255, 251, 0);font-size: 16px;"><em>更多阅读:</em></span><span style="font-size: 15px;"><br></span></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><a href="http://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&amp;mid=2247484327&amp;idx=1&amp;sn=7b750677406a97d7722e0ec5f57e57b2&amp;chksm=eaa82b8fdddfa29981053a874cbcac48e4b88c97883d650d9a958aa37f367b66a29d2819be21&amp;scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" data-linktype="2"><span style="font-size: 15px;">重磅 | 死磕Elasticsearch方法论认知清单(2019春节更新版)</span></a><br></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><a href="http://mp.weixin.qq.com/s?__biz=MzI2NDY1MTA3OQ==&amp;mid=2247484320&amp;idx=1&amp;sn=c67538b457a2f72f320c68576afe30f0&amp;chksm=eaa82b88dddfa29e4696842fc5e145212afc8a99813068bc8a0f5a3a0b321c3669dd50c6b0c6&amp;scene=21#wechat_redirect" target="_blank" data-itemshowtype="0" style="font-size: 15px;text-decoration: underline;" data-linktype="2"><span style="font-size: 15px;">干货 | BAT等一线大厂 Elasticsearch面试题解读</span></a><br></p><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: justify;"><strong><em><span style="color: rgb(255, 104, 39);">https:</span></em></strong><strong><em><span style="color: rgb(255, 104, 39);">//elastic.blog.csdn.net/</span></em></strong></p><figure style="font-size: inherit;color: inherit;line-height: inherit;"><img class="img_loading" data-ratio="1.390625" data-src="https://mmbiz.qpic.cn/mmbiz_png/mjl8GCpsL9aibewbZeZorVcibbIUicXcVfPOKpbVmMqaUvGs00InTTEOR8IkxGMkaia68eicFZ5M7JsTsF28FJDaOGw/640?wx_fmt=png" data-type="png" data-w="192" style="font-size: inherit; color: inherit; line-height: inherit; display: block; margin-right: auto; margin-left: auto; width: 192px !important; height: 267px !important;" title="在这里插入图片描述" _width="192px" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" crossorigin="anonymous"></figure><p style="line-height: 1.5em;margin-top: 15px;margin-bottom: 15px;text-align: center;"><span style="font-size: 14px;color: rgb(255, 104, 39);">加入星球,更短时间更快习得更多干货!</span></p>
            </div>

原文地址:https://mp.weixin.qq.com/s/EJQilAy4pLS3fAqBgYZhDA

posted @ 2019-05-05 16:44  星朝  阅读(755)  评论(0编辑  收藏  举报