{"action":"created","issue":{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/120","labels_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/120/comments","events_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/120/events","html_url":"https://github.com/mongoosastic/mongoosastic/pull/120","id":114688564,"number":120,"title":"Recognizes an es_type of nested with es_fields and maps it","user":{"login":"JasonMore","id":383719,"avatar_url":"https://avatars.githubusercontent.com/u/383719?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonMore","html_url":"https://github.com/JasonMore","followers_url":"https://api.github.com/users/JasonMore/followers","following_url":"https://api.github.com/users/JasonMore/following{/other_user}","gists_url":"https://api.github.com/users/JasonMore/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonMore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonMore/subscriptions","organizations_url":"https://api.github.com/users/JasonMore/orgs","repos_url":"https://api.github.com/users/JasonMore/repos","events_url":"https://api.github.com/users/JasonMore/events{/privacy}","received_events_url":"https://api.github.com/users/JasonMore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-02T21:31:41Z","updated_at":"2015-11-03T13:46:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/pulls/120","html_url":"https://github.com/mongoosastic/mongoosastic/pull/120","diff_url":"https://github.com/mongoosastic/mongoosastic/pull/120.diff","patch_url":"https://github.com/mongoosastic/mongoosastic/pull/120.patch"},"body":"I needed to create an index where a list of objects had a type [\"nested\"](https://www.elastic.co/guide/en/elasticsearch/reference/1.7/mapping-nested-type.html) but mongoosastic didn't have a way to put specify es_ properties on parent properties of a nested schema, even though Elasticsearch proper does. This pull request allows those cases to be satisfied.\r\n\r\n```\r\n{\r\n    \"person\" : {\r\n        \"properties\" : {\r\n            \"name\" : {\r\n                \"type\" : \"nested\",\r\n                \"include_in_parent\": true,\r\n                \"properties\": {\r\n                    \"first_name\" : {\"type\": \"string\", \"index\": \"not_analyzed\" },\r\n                    \"last_name\"  : {\"type\": \"string\", \"index\": \"not_analyzed\" }\r\n                }\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n```\r\nvar NameSchema = new Schema({\r\n  first_name: {type: String, es_index: 'not_analyzed'},\r\n  last_name: {type: String, es_index: 'not_analyzed'}\r\n});\r\n\r\nvar PersonSchema = new Schema({\r\n  name: {type:[NameSchema], es_indexed:true, es_type:'nested', es_include_in_parent:true}\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/comments/153356638","html_url":"https://github.com/mongoosastic/mongoosastic/pull/120#issuecomment-153356638","issue_url":"https://api.github.com/repos/mongoosastic/mongoosastic/issues/120","id":153356638,"user":{"login":"guumaster","id":765396,"avatar_url":"https://avatars.githubusercontent.com/u/765396?v=3","gravatar_id":"","url":"https://api.github.com/users/guumaster","html_url":"https://github.com/guumaster","followers_url":"https://api.github.com/users/guumaster/followers","following_url":"https://api.github.com/users/guumaster/following{/other_user}","gists_url":"https://api.github.com/users/guumaster/gists{/gist_id}","starred_url":"https://api.github.com/users/guumaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guumaster/subscriptions","organizations_url":"https://api.github.com/users/guumaster/orgs","repos_url":"https://api.github.com/users/guumaster/repos","events_url":"https://api.github.com/users/guumaster/events{/privacy}","received_events_url":"https://api.github.com/users/guumaster/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T13:46:17Z","updated_at":"2015-11-03T13:46:17Z","body":"Could you check the TravisCI output? It should pass tests at least on NodeJS stable version."}}