{"action":"opened","issue":{"url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/54","repository_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch","labels_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/54/comments","events_url":"https://api.github.com/repos/siddontang/go-mysql-elasticsearch/issues/54/events","html_url":"https://github.com/siddontang/go-mysql-elasticsearch/issues/54","id":174696600,"number":54,"title":"How to set river.toml ,and parse the json format .","user":{"login":"qsbaq","id":9152219,"avatar_url":"https://avatars.githubusercontent.com/u/9152219?v=3","gravatar_id":"","url":"https://api.github.com/users/qsbaq","html_url":"https://github.com/qsbaq","followers_url":"https://api.github.com/users/qsbaq/followers","following_url":"https://api.github.com/users/qsbaq/following{/other_user}","gists_url":"https://api.github.com/users/qsbaq/gists{/gist_id}","starred_url":"https://api.github.com/users/qsbaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qsbaq/subscriptions","organizations_url":"https://api.github.com/users/qsbaq/orgs","repos_url":"https://api.github.com/users/qsbaq/repos","events_url":"https://api.github.com/users/qsbaq/events{/privacy}","received_events_url":"https://api.github.com/users/qsbaq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-02T07:22:42Z","updated_at":"2016-09-02T07:22:42Z","closed_at":null,"body":"Hi:\r\nI have a mysql table like this:\r\ntable name:\r\ntorrent0\r\n\r\nfield infohash :\r\n0F850D075A59522FD975404CF6D205530F066243\r\n\r\nfield data :\r\n{\"Infohash\":\"0F850D075A59522FD975404CF6D205530F066243\",\"Name\":\"John.Wick.2014.DUAL.BDRip-AVC.x264.mkv\",\"Length\":2484494781,\"Heat\":0,\"FileCount\":1,\"Files\":[{\"Name\":\"John.Wick.2014.DUAL.BDRip-AVC.x264.mkv\",\"Length\":2484494781}],\"CreateTime\":\"2016-08-23T03:17:55.97859726-04:00\"}\r\n\r\nfield create_time :\r\n2016-08-23 03:17:55\r\n\r\nNow how to do the river.toml to set the elasticsearch like this .\r\n\r\ncurl -XGET 10.25.166.191:9200/torrent/_search?pretty\r\n\r\n {      \r\n      \"_index\" : \"torrent\",\r\n      \"_type\" : \"0\",\r\n      \"_id\" : \"0F850D075A59522FD975404CF6D205530F066243\",\r\n      \"_score\" : 1.0,\r\n      \"_source\" : {\r\n        \"Name\" : \"Beshenye.2015.P.HDRip.1400MB.nnmclub.avi\",\r\n        \"Length\" : 1467906048,\r\n        \"Heat\" : 0,\r\n        \"CreateTime\" : \"2016-09-02T14:40:53.779099802+08:00\"\r\n      }\r\n },\r\n\r\nI've tryed setted this below:\r\n [rule.field]\r\n    _id=\"infohash,string\"\r\n    _source=\"data,list\"\r\nResult: \r\n {\r\n      \"_index\" : \"torrent\",\r\n      \"_type\" : \"0\",\r\n      \"_id\" : \"800910\",\r\n      \"_score\" : 1.0,\r\n      \"_source\" : {\r\n        \"create_time\" : \"2016-08-23 03:17:55\",\r\n        \"data\" : \"{\\\\\\\"Infohash\\\\\\\":\\\\\\\"02A5B835DF1831C808CDDBDEEBBC6CBBA2AC3478\\\\\\\",\\\\\\\"Name\\\\\\\":\\\\\\\"Tokyo_Marble_Chocolate_(2007)_[720p,BluRay,x264]_-_THORA\\\\\\\",\\\\\\\"Length\\\\\\\":1049992650,\\\\\\\"Heat\\\\\\\":0,\\\\\\\"FileCount\\\\\\\":5,\\\\\\\"Files\\\\\\\":[{\\\\\\\"Name\\\\\\\":\\\\\\\"Tokyo_Marble_Chocolate_part1_Mata_Aimashou_[720p,BluRay,x264]_-_THORA.mkv\\\\\\\",\\\\\\\"Length\\\\\\\":525121923},{\\\\\\\"Name\\\\\\\":\\\\\\\"Tokyo_Marble_Chocolate_part2_Zenryoku_Shounen_[720p,BluRay,x264]_-_THORA.mkv\\\\\\\",\\\\\\\"Length\\\\\\\":524839477},{\\\\\\\"Name\\\\\\\":\\\\\\\"Tokyo_Marble_Chocolate_(2007)_[720p,BluRay,x264]_-_THORA.nfo\\\\\\\",\\\\\\\"Length\\\\\\\":16634},{\\\\\\\"Name\\\\\\\":\\\\\\\"한글 자막 - 보실 때 압축풀고 압축파일은 보관해주세요.7z\\\\\\\",\\\\\\\"Length\\\\\\\":14395},{\\\\\\\"Name\\\\\\\":\\\\\\\"Tokyo_Marble_Chocolate_(2007)_[720p,BluRay,x264]_-_THORA.md5\\\\\\\",\\\\\\\"Length\\\\\\\":221}],\\\\\\\"CreateTime\\\\\\\":\\\\\\\"2016-08-23T03:17:55.967615474-04:00\\\\\\\"}\",\r\n        \"id\" : 800910,\r\n        \"infohash\" : \"02A5B835DF1831C808CDDBDEEBBC6CBBA2AC3478\"\r\n      }\r\n    }\r\n......"}}
{"actor":{"display_login":"qsbaq"}}