悟空,拿我的打狗棒来

logstash6.x 同步elasticsearch ----join dataType(如何同步)

Logstash | 作者 caizhangxian | 发布于2018年06月11日 | 阅读数:2525

logstash6.x 同步elasticsearch ----join dataType
elasticsearch 版本号6.X
 
elasticsearch ---mapping :
curl -H "Content-Type: application/json" -XPOST "http://localhost:9200/test-joi ... ot%3B -d ' 
{
    "doc": {
            "properties" : {
                    "id" : {
                        "type" : "integer"             
                    },
                    "parentName" : {
                         "type" : "keyword"                                       
                    },
                 
                    "childName" : {
                         "type" : "keyword"                                       
                    },
                      "relationValue": { 
                      "type": "join",
                      "relations": {
                       "question": "answer" 
                   }
                   }
                       } } } '
 
 
logstash 如何把数据库的两个表的关系同步到这种relationship 关系index 中
已邀请:

laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net

赞同来自:

关系同步:
第一步,把父索引数据导入es
第二步,要靠程序实现,需要指定子索引数据对应的父索引的id

要回复问题请先登录注册