{"action":"closed","issue":{"url":"https://api.github.com/repos/rwynn/monstache/issues/65","repository_url":"https://api.github.com/repos/rwynn/monstache","labels_url":"https://api.github.com/repos/rwynn/monstache/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/rwynn/monstache/issues/65/comments","events_url":"https://api.github.com/repos/rwynn/monstache/issues/65/events","html_url":"https://github.com/rwynn/monstache/issues/65","id":318569319,"number":65,"title":"Strange Time Error","user":{"login":"Crispy1975","id":12525875,"avatar_url":"https://avatars3.githubusercontent.com/u/12525875?v=4","gravatar_id":"","url":"https://api.github.com/users/Crispy1975","html_url":"https://github.com/Crispy1975","followers_url":"https://api.github.com/users/Crispy1975/followers","following_url":"https://api.github.com/users/Crispy1975/following{/other_user}","gists_url":"https://api.github.com/users/Crispy1975/gists{/gist_id}","starred_url":"https://api.github.com/users/Crispy1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crispy1975/subscriptions","organizations_url":"https://api.github.com/users/Crispy1975/orgs","repos_url":"https://api.github.com/users/Crispy1975/repos","events_url":"https://api.github.com/users/Crispy1975/events{/privacy}","received_events_url":"https://api.github.com/users/Crispy1975/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-04-27T22:39:17Z","updated_at":"2018-05-03T21:30:03Z","closed_at":"2018-05-03T21:30:03Z","author_association":"CONTRIBUTOR","body":"I have recently ported from Javascript transform scripts to using a Go plugin, on the whole the plugin is a lot faster and allows for more precise data, which is great. However I have encountered an issue when indexing a larger amount of data (about 121,000 documents):\r\n\r\n```shell\r\nERROR 2018/04/27 23:33:43 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:46 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:48 elastic: bulk processor \"monstache\" failed: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:48 Bulk index request with execution ID 14 failed: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:53 elastic: bulk processor \"monstache\" failed: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:53 Bulk index request with execution ID 15 failed: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:53 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:53 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:53 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\nERROR 2018/04/27 23:33:54 elastic: bulk processor \"monstache\" failed but may retry: json: error calling MarshalJSON for type time.Time: Time.MarshalJSON: year outside of range [0,9999]\r\n```\r\nI've tested with multiple documents, and it seems that all docs will write in smaller batches. Wondered if you new what would cause this? From my understanding this kind of error happens a lot when a Javascript time (ms) is transformed into a Go time (s). However the documents in question write ok, and only have ISO date fields.\r\n\r\n```json\r\n{\r\n  \"name\" : \"T-3-RtK\",\r\n  \"cluster_name\" : \"elasticsearch\",\r\n  \"cluster_uuid\" : \"-iMH4cZtT7eSCa45znWBwg\",\r\n  \"version\" : {\r\n    \"number\" : \"6.2.3\",\r\n    \"build_hash\" : \"c59ff00\",\r\n    \"build_date\" : \"2018-03-13T10:06:29.741383Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"7.2.1\",\r\n    \"minimum_wire_compatibility_version\" : \"5.6.0\",\r\n    \"minimum_index_compatibility_version\" : \"5.0.0\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}\r\n```\r\nThe only place that I can think of a timestamp being present is in the `monstache` collection for the `ts` delta. This has happened with `4.6.1` and `4.6.2` of monstache. Any pointers where to look would be great. Thanks!"}}
{"actor":{"display_login":"rwynn"}}