{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/18740","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18740/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18740/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18740/events","html_url":"https://github.com/elastic/elasticsearch/issues/18740","id":158559664,"number":18740,"title":"Creating array of IPs","user":{"login":"esamudio","id":6547184,"avatar_url":"https://avatars.githubusercontent.com/u/6547184?v=3","gravatar_id":"","url":"https://api.github.com/users/esamudio","html_url":"https://github.com/esamudio","followers_url":"https://api.github.com/users/esamudio/followers","following_url":"https://api.github.com/users/esamudio/following{/other_user}","gists_url":"https://api.github.com/users/esamudio/gists{/gist_id}","starred_url":"https://api.github.com/users/esamudio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esamudio/subscriptions","organizations_url":"https://api.github.com/users/esamudio/orgs","repos_url":"https://api.github.com/users/esamudio/repos","events_url":"https://api.github.com/users/esamudio/events{/privacy}","received_events_url":"https://api.github.com/users/esamudio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Mapping","name":":Mapping","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/adoptme","name":"adoptme","color":"207de5"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.4.1","name":"v2.4.1","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-05T15:29:17Z","updated_at":"2016-06-07T13:54:15Z","closed_at":null,"body":"<!--\r\nGitHub is reserved for bug reports and feature requests. The best place\r\nto ask a general question is at the Elastic Discourse forums at\r\nhttps://discuss.elastic.co. If you are in fact posting a bug report or\r\na feature request, please include one and only one of the below blocks\r\nin your new issue.\r\n-->\r\n\r\n<!--\r\nIf you are filing a bug report, please remove the below feature\r\nrequest block and provide responses for all of the below items.\r\n-->\r\n\r\n**Elasticsearch version**: 2.3.3\r\n\r\n**JVM version**: 1.8.0_91\r\n\r\n**OS version**: Ubuntu 14.04\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\n\r\nAt first, I'm not sure if I misread the docs and this is not expected behavior, in which case, please look at this as an issue instead. Arrays of IPs don't seem to be able to be made. Whenever one pre-defines the mapping, and tries to create one, a type mismatch happens.\r\n\r\n**Steps to reproduce**:\r\nI'm following the ones someone suggested I follow on [the discussion board](https://discuss.elastic.co/t/how-to-store-array-of-ip/51461/2). Credit to msimos.\r\n 1. I created a dummy index following the steps above. My dummy index is called \"com\".\r\n```\r\ncurl -XPUT 'http://localhost:9200/com' -d '{\r\n\t\"mappings\": {\r\n\t\t\"type\": {\r\n\t\t\t\"properties\": {\r\n\t\t\t\t\"ips\": {\r\n\t\t\t\t\t\"type\": \"ip\"\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}'\r\n```\r\n 2. I then indexed the sample ip array into the \"com\" index in the \"anytype\" type with id \"1\".\r\n\r\n```\r\ncurl -XPOST 'http://localhost:9200/com/anytype/1' -d '{\r\n\t\"ips\": [\"123.123.123.123\", \"10.0.0.1\"]\r\n}'\r\n```\r\n 3. This gave me a type mismatch error:\r\n```\r\n{\r\n\t\"error\": {\r\n\t\t\"root_cause\": [{\r\n\t\t\t\"type\": \"mapper_parsing_exception\",\r\n\t\t\t\"reason\": \"failed to parse\"\r\n\t\t}],\r\n\t\t\"type\": \"mapper_parsing_exception\",\r\n\t\t\"reason\": \"failed to parse\",\r\n\t\t\"caused_by\": {\r\n\t\t\t\"type\": \"illegal_state_exception\",\r\n\t\t\t\"reason\": \"Mixing up field types: class org.elasticsearch.index.mapper.core.LongFieldMapper$LongFieldType != class org.elasticsearch.index.mapper.ip.IpFieldMapper$IpFieldType on field ips\"\r\n\t\t}\r\n\t},\r\n\t\"status\": 400\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/224287384","html_url":"https://github.com/elastic/elasticsearch/issues/18740#issuecomment-224287384","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18740","id":224287384,"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":"2016-06-07T13:54:15Z","updated_at":"2016-06-07T13:54:15Z","body":"Note, this is fixed in master"}}
{"actor":{"display_login":"clintongormley"}}