ES认证考试笔记

  • Post author:
  • Post category:其他




一. 前言

我会分别列一下考试方式、考试提纲以及考试提纲对应的文档位置,最后会列一些我记住的考试题目



二. 考试结果

我在去年5月份已经考试通过了,以下是我的认证证书

image-20200922150426209



三. 考试时间

3个小时,10-12道题目



四. 考试方式

使用谷歌浏览器,连接远程桌面进行操作,需要打开前置摄像头。准备好个人身份证或者护照。



五. 考试提纲

我以下都会在每个提纲下面附带一个文档链接



(一).安装和配置ES集群

  1. 部署并启动可满足一套题目要求的ES集群

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/rpm.html

  2. 配置集群的节点配置以满足给定题目要求

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/settings.html

  3. 开启 Security 功能

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/configuring-security.html

  4. 配置 Security 功能,基于角色的访问控制

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/security-api.html



(二).index数据的处理

  1. 定义满足题目要求的索引,一般是分片副本设置,和分片分布设置

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices-create-index.html

  2. 对索引的 documents 数据 执行 index,create,read,update 和 delete 操作

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices.html

  3. 定义和使用索引 aliases

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices-add-alias.html

  4. 根据题目要求定义一个 index template 和创建一个index 命中这个template

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices-put-template.html

  5. 定义并使用满足题目要求的 dynamic template

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/dynamic-templates.html

  6. 使用 reindex API和 update_by_query API 重新索引或更新 documents 数据

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-reindex.html

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-update-by-query.html

  7. 定义并使用满足给定要求的 ingest pipeline,包括使用 Painless 修改 documents 数据

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/pipeline.html



(三). 索引查询

  1. 针对 index 的数据使用 terms 查询 对一个或多个字段中 词组(phrases)进行 and/or 的查询

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-terms-query.html

  2. 编写查询语句,要求是 多个查询条件 的 boolean组合查询语法,并执行成功

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-bool-query.html

  3. 在查询的 response 中高亮显示搜索关键词词

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/highlighting.html

  4. 按题目要求对查询结果进行排序

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/sort-search-results.html

  5. 实现搜索查询结果的分页

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/paginate-search-results.html

  6. 使用模糊匹配(fuzzy match)查询

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/query-dsl-fuzzy-query.html

  7. 定义和使用 search template 进行查询

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/search-template.html

  8. 编写跨集群查询 (CCS)

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-cross-cluster-search.html



(四). 数据聚合(

Aggregations

)

  1. 按题目要求编写并执行 metric 和 bucket 聚合语句

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/search-aggregations-matrix.html

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/search-aggregations-bucket.html

  2. 按题目要求编写并执行包含子聚合( sub-aggregations )的聚合,顾名思义就是对数据聚合之后对聚合出来的数据再聚合



(五). Mappings设置 和 数据分词

  1. 定义满足题目要求的索引 Mapping

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/mapping.html

  2. 定义并使用满足题目要求的 custom analyzer (自定义分词器)

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/analysis-custom-analyzer.html

  3. 定义和使用满足题目要求的 单字段多类型( multi-fields ) 并不同的类型使用不同的分词器

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/multi-fields.html#_multi_fields_with_multiple_analyzers

  4. 配置索引,以使其正确维护对象嵌套数组( nested arrays )的关系,这里就是 nested 的使用

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/nested.html



(六). 集群管理

  1. 根据题目要求将索引的 shards 分配给特定节点

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/shard-allocation-filtering.html

  2. 为索引配置 shard 分配感知和强制感知

​ 分配感知

​ https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-cluster.html#shard-allocation-awareness

​ 强制分配

​ https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-cluster.html#forced-awareness

  1. 诊断 shard 问题并修复集群的运行状况,使集群恢复健康

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/cluster-allocation-explain.html

  2. 备份和还原集群或者集群的指定索引

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/snapshot-restore.html

  3. 配置群集 hot/warm架构

    https://www.elastic.co/blog/hot-warm-architecture

  4. 配置集群可以进行跨集群搜索

    https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-cross-cluster-search.html



六. 参考题目



第一题:

有两条数据

POST phone/_doc/1
{
  "brand": "samsung",
  "model": "AS1",
  "features": [
    {
      "type": "os",
      "value": "android"
    },
    {
      "type": "memory",
      "value": "12"
    },
    {
      "type": "capacity",
      "value": "128"
    }
  ]
}
POST phone/_doc/2
{
  "brand": "apple",
  "model": "AS2",
  "features": [
    {
      "type": "os",
      "value": "apple"
    },
    {
      "type": "memory",
      "value": "32"
    },
    {
      "type": "capacity",
      "value": "100"
    }
  ]
}

插入以上两条数据,执行以下查询

GET phone/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "features.type": "memory"
          }
        },
        {
          "match": {
            "features.value": "100"
          }
        }
      ]
    }
  }
}

​ 我们发现查询出来的不是memory=100也能查询出来,设计一个索引存入以上两条数据,然后写一个和上面一样的查询语句去查询memory=100,应该不能查询出来数据的。



第二题:

​ 查询某字段里是否包含有door这个单词,含有相近的单词也算,并用高亮显示



第三题:

创建一个是三个节点的的集群

  1. 集群名称叫做cluster1
  2. node1的 node name 为 node01,其他依次为node02,node03
  3. node01temp属性为hot,node02 、node03为warm
  4. 启动集群



第四题:

​ 在原数据集index查询x-men和xmen分别为35和0,要求转移数据到tesk3,并要求转移后到数据查询x-men与xmen的两次查询响应的数据是一致的,如we-lean与we lean查询出来的数据条数是一致的



第五题:

​ 给定一个索引和样例数据,然后要求将给定的数据reindex到另一个索引,要求一个索引中的字段给定不同的分词器



第六题:

​ 创建一个动态模板,根据需求设定以key_开头的都为keyword类型,其余的数据时指定的类型



第七题:

​ 查询语句,查询2015国家为波兰,性别为女性总数,不需要返回文档数据。



第八题:

​ 查询地震数据,查询每个月的最大震数和和最大范围并根据12个月列出来,12个月中最大的震数是哪个月



第九题:

查询某字段里是否包含有door这个单词,含有相近的单词也算,用高亮显示,标签为



第十题:

查询field1、field2、field3中是否包含xxx内容,其中field1的boosted为3,field2的boosted为2,并且查询出来的总评分为三个字段的评分相加



第十一题:

给定一个单节点的cluster3,要求开启安全功能,并且要求kibana和elastic的用户密码都为elastic,并创建一个user,要求可以登录kibana



第十二题:

给定一个单个节点的cluster1集群,要求让index1的所有分片分布在node1和node2上,index2的所有分片分布在node3上,并是集群状态是green状态



第十四题:

给集群创建一个数据仓库,创建一个只包括index3的快照信息



第十五题:

创建一个搜索模板,要求title字段中的内容是params1,排序的字段是params2,排序方法是params3,取出来的size是size

GET _search/template
{
  "id": "my_template",
  "params": {
    "params1":“xxxx”,
    "params2":“xxxx”,
    "params2":“asc”,
    "size":10,
  }
}



第十六题:

查询日志文件中每个status请求排行前三的url。



第十七题:

添加一个新字段,new_field,字段内容是title、content按顺序串联起来,并且title的字段值只有text类型



第十八题:

将index9中所有city为beijin的数据修改为shanghai



第十九题:

在index索引中查询bob’s和bobs是不同的结果,要求将index的数据转移到index_new索引中,并要求转移后到数据查询bob’s与bobs的两次查询响应的数据是一致的,并且还支持类似的查询响应也一致



第二十题:

{
  "title":"elastic",
  "content":"ELK is a great tool"
}

{"comments":"good blogs"}

要求创建一个名为blogs,但内容要把这两个内容父子关联起来



第二十一题:

设计mapings,给出一个有数据的index,然后把数据转移到task4,其中xxx(字段名忘了)字段可以转过去后用standard作为分词器,并且新建两个新字段一个字段名xxx.english,以english分词,另一个字段名为xxx.stop,分词器为stop,其他的field都取和原来的index类型一致。



第二十二题:

转移一个index数据到另一个task2,其中原来index的数据为有个字段的数据为:” xx1 “,” xx2 “,” xx3 “,要求:

转到tesk2的数据为以逗号分割的数组。

去掉每个分割出来的字符串的两边空格。

新增一个数组长度的字段num。



第二十三题:

部署三个节点的ES节点

node_a为hot,node_b和node_c是warm节点。

按照要求件两个索引,一个shard都存在hot一个都存在

你觉得帮助到你了请关注公众号哦
在这里插入图片描述



版权声明:本文为qq_18895659原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。