Strategy to Bootstrap huge hierarchical data quickly and way to update single hierarchical json document in Elasticsearch if any of the record changes

前提是你 提交于 2021-01-29 08:10:06

问题


As per business scenario Columns from 2 relational tables (ideally multiple tables e.g. 6-7) must be merged into a single hierarchical json document for a single index on Elasticsearch as mentioned below in Sample document.

Sample document : Employee with contact information

{
        "id":1,
        "name": "tom john",
        "Contact":
                    {
                    "mobile":123,
                      "type":"MOBILE"
        
                    }
}

Use Case Scenario : 1: On startup all the records from 2 tables indexed in Elastic search as hierarchical json as mentioned above

2: If any employees mobile number changes from 123 to 456 how to propagate it to Elastic search so that it can be searched with latest information which is there in relational db ?

3: Change Data Capture (CDC) has to be implemented to log OLTP data changes i.e. changed mobile number.What is the best mechanism to do it trigger ?

4: Do I need to form whole document again and update given index document ?Isnt it a costly affair?

来源:https://stackoverflow.com/questions/64931204/strategy-to-bootstrap-huge-hierarchical-data-quickly-and-way-to-update-single-hi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!