Coder Social home page Coder Social logo

elastic-certified-engineer's Introduction

Path to become an Elasticsearch Certified Engineer

The most comprehensive learning resources of the entire network of elasticsearch certified engineers.

Elasticsearch Certified Engineer Exam Preparation Guide.

The shortest path passes the Elasitcsearch certification exam.

More dry goods, continuous update...

一个人考认证,没动力怎么办?

加入死磕Elasticsearch知识星球(**通过Elastic认证工程师人数最多的圈子),和硅谷、BAT一线大佬更短时间更快习得更多干货!

战况汇报——截止:2021-02-05,死磕 Elasticsearch 知识星球 共有 41 人通过 Elastic 认证考试(全国通过不到 100 人)。

铭毅天下,认证不怕! 铭毅天下,认证拿下!!

http://t.cn/RmwM3N9

elastic-certified-engineer's People

Contributors

abia321 avatar mingyitianxia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elastic-certified-engineer's Issues

6.2 中对更新父子文档的调整

更新父子文档需要调整routing,但是普通的script不可以更新文档的routing,所以必须在reindex的时候script指定routing,或者在update_by_query的时候使用pipeline的script更新文档的routing

PUT _scripts/init_lines
{
  "script": {
    "lang": "painless",
    "source": """
              HashMap map = new HashMap();
              map.name = 'line';
              map.parent = params.characterId;
              ctx._source.character_or_line = map;
              """
  }
}
PUT _ingest/pipeline/set_routing
{
  "processors": [
    {
      "script": {
        "source": """
              ctx._routing = 'C0';
              """
      }
    }
  ]
}
POST hamlet_3/_update_by_query?pipeline=set_routing
{
  "script": {
    "id": "init_lines",
    "params": {
      "characterId": "C0"
    }
  },
  "query": {
    "match": {
      "speaker": "HAMLET"
    }
  }
}

8.1 最后一句选择数组最小的排序

picking the lowest value of the array
应该指定下 mode

GET kibana_sample_data_ecommerce/_search
{
  "query": {
    "match": {
      "day_of_week": "Monday"
    }
  },
  "sort": [
    {
      "products.base_price": {
        "order": "desc",
         "mode": "min"
      }
    }
  ]
}

0011_zhenti的一些疑问

1)cat & dog那道问题,用mapping char filter把cat and dog和cat & dog都映射成一个特殊字符,例如_catdog_,也能实现,不过适用范围很窄。。
2)04聚合实现,是不是对应the month and average magnitude of the month with the lagest average magnitude?
是否也可以用bucket_sort,对avg_mags进行desc排序,size:1来实现?
3)05,index_a reindex到index_b,是否少了一个管道?
题目是增加一个数组字段,a_pipeline里是把title变成了数组类型
PUT _ingest/pipeline/new_pipeline
{
"description": "",
"processors": [
{
"script": {
"lang": "painless",
"source": "ctx.length=ctx.title.length()"
}
},
{
"set": {
"field": "split_title",
"value": "{{title}}"
}
},
{
"split": {
"field": "split_title",
"separator": " "
}
}
]
}

9.1对于最后三个pipeline的想法

先贴下代码

GET kibana_sample_data_flights/_search
{
  "size": 0,
  "aggs": {
    "flights_by_day": {
      "date_histogram": {
        "field": "timestamp",
        "calendar_interval": "day"
      },
      "aggs": {
        "destinations_by_day": {
          "terms": {
            "field": "DestCityName"
          }
        },
        "most_popular_destination_of_the_day": {
          "max_bucket": {
            "buckets_path": "destinations_by_day._count"
          }
        }
      }
    }
  }
}

GET kibana_sample_data_flights/_search
{
  "size": 0,
  "aggs": {
    "flights_by_day": {
      "date_histogram": {
        "field": "timestamp",
        "calendar_interval": "day"
      },
      "aggs": {
        "destinations_by_day": {
          "terms": {
            "field": "DestCityName"
          }
        },
        "most_popular_destination_of_the_day": {
          "max_bucket": {
            "buckets_path": "destinations_by_day._count"
          }
        }
      }
    },
    "day_with_most_flights": {
      "max_bucket": {
        "buckets_path": "flights_by_day._count"
      }
    }
  }
}

GET kibana_sample_data_flights/_search
{
  "size": 0,
  "aggs": {
    "flights_by_day": {
      "date_histogram": {
        "field": "timestamp",
        "calendar_interval": "day"
      },
      "aggs": {
        "destinations_by_day": {
          "terms": {
            "field": "DestCityName"
          }
        },
        "most_popular_destination_of_the_day": {
          "max_bucket": {
            "buckets_path": "destinations_by_day._count"
          }
        }
      }
    },
    "day_with_most_flights": {
      "max_bucket": {
        "buckets_path": "flights_by_day._count"
      }
    },
    "day_with_the_most_popular_destination_over_all_days": {
      "max_bucket": {
        "buckets_path": "flights_by_day>most_popular_destination_of_the_day"
      }
    }
  }
}

感觉他这个题目表达的不是很清楚,我觉得第一个应该是求每一天中DestCityName聚合后的最大值,第二个是求每一天聚合后document最多的一天,第三个应该是对第一个每天聚合出来的求一个最大值

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.