How to index nested mysql object into elasticsearch using logstash?

I'm trying to index mysql database with elasticsearch. Consider the example mapping:

{"blog":
  {"properties": 
    {"id": "string"}
    {"author": "string"}
    {"time_created": }
    {"author_info": 
      {"author_name":}
      {"author_sex":}
    }
    {"posts":
      {"post_author":}
      {"post_time":}
    }
  }
}

I have three tables which are author_info, blog and post. How can I index these records into elastic with a nested structure? I cannot find documents about it. Thanks

1 Like

What part are you having trouble with? Join the database tables and use a mutate filter to move the resulting fields into the desired structure.