{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/14152","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14152/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14152/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14152/events","html_url":"https://github.com/elastic/elasticsearch/issues/14152","id":111788226,"number":14152,"title":"DateFieldMapper fails storing JSON-LD when property name contains `Date`?","user":{"login":"jhberges","id":1487862,"avatar_url":"https://avatars.githubusercontent.com/u/1487862?v=3","gravatar_id":"","url":"https://api.github.com/users/jhberges","html_url":"https://github.com/jhberges","followers_url":"https://api.github.com/users/jhberges/followers","following_url":"https://api.github.com/users/jhberges/following{/other_user}","gists_url":"https://api.github.com/users/jhberges/gists{/gist_id}","starred_url":"https://api.github.com/users/jhberges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhberges/subscriptions","organizations_url":"https://api.github.com/users/jhberges/orgs","repos_url":"https://api.github.com/users/jhberges/repos","events_url":"https://api.github.com/users/jhberges/events{/privacy}","received_events_url":"https://api.github.com/users/jhberges/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-16T08:42:57Z","updated_at":"2015-10-16T10:51:34Z","closed_at":"2015-10-16T10:51:34Z","body":"Storing the following fragment as part of a document cause `DateFieldMapper` to throw `IllegalArgumentException` with default setup.\r\nWorkaround is to disable \"smart mapping\" of date/time.\r\n\r\n    ...\r\n    \"ccdm:publicationEndDateTime\" : {\r\n      \"@type\" : \"xml:dateTime\",\r\n      \"@value\" : \"2015-01-02T11:45:00Z\"\r\n    },\r\n    \"ccdm:publicationStartDateTime\" : {\r\n      \"@type\" : \"xml:dateTime\",\r\n      \"@value\" : \"2015-01-02T11:30:00Z\"\r\n    },\r\n    ...\r\n\r\nFails at\r\nhttps://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/index/mapper/core/DateFieldMapper.java#L515 \r\n\r\nThe mapper will fail on the `@type` attribute.\r\nA bit annoying, but auto-indexing of this field (or these documents) aren't crucial for our use, but perhaps such failures during automagic should be avoided?\r\n\r\nBest regards, Jan-Helge"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/148681642","html_url":"https://github.com/elastic/elasticsearch/issues/14152#issuecomment-148681642","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14152","id":148681642,"user":{"login":"clintongormley","id":56599,"avatar_url":"https://avatars.githubusercontent.com/u/56599?v=3","gravatar_id":"","url":"https://api.github.com/users/clintongormley","html_url":"https://github.com/clintongormley","followers_url":"https://api.github.com/users/clintongormley/followers","following_url":"https://api.github.com/users/clintongormley/following{/other_user}","gists_url":"https://api.github.com/users/clintongormley/gists{/gist_id}","starred_url":"https://api.github.com/users/clintongormley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintongormley/subscriptions","organizations_url":"https://api.github.com/users/clintongormley/orgs","repos_url":"https://api.github.com/users/clintongormley/repos","events_url":"https://api.github.com/users/clintongormley/events{/privacy}","received_events_url":"https://api.github.com/users/clintongormley/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T10:51:34Z","updated_at":"2015-10-16T10:51:34Z","body":"Indexing just the values that you provided work just fine.  The `@value` field is added as type date.  The problem comes when you try to index a value that isn't a valid date later on.\r\n\r\nWe can't tell if you intended these values to be indexed or not, so we're not going to silently swallow this exception.  However, you can add a dynamic mapping rule which maps any `@value` field as type:string, or `enabled:false` or whatever you need. "}}