问题
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