{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/463","repository_url":"https://api.github.com/repos/elastic/elasticsearch-js","labels_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/463/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/463/events","html_url":"https://github.com/elastic/elasticsearch-js/issues/463","id":187223227,"number":463,"title":"get() not returning storedFields","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":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-04T00:14:10Z","updated_at":"2016-12-02T06:58:46Z","closed_at":"2016-12-02T06:58:46Z","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. Note that whether you're filing a bug report or a\r\nfeature request, ensure that your submission is for an\r\n[OS that we support](https://www.elastic.co/support/matrix#show_os).\r\nBug reports on an OS that we do not support or feature requests\r\nspecific to an OS that we do not support will be closed.\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**:\r\nElasticsearch 5.0.0 GA\r\n\r\n**Plugins installed**: none/default ones\r\n\r\n**JVM version**: java version \"1.8.0_111\"\r\n\r\n**OS version**: Ubuntu 14.04\r\n\r\n**npm version**: 3.9.5\r\n\r\n**elasticsearch.js version**: 12.0.1\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\nThe problem is specific to the [Javascript client](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html). Currently using latest version 12.0.1. When using the storedFields parameter using get, the fields are not returned. The fields being present is verified when setting source to true.\r\n\r\n**Steps to reproduce**:\r\n 1. `curl -XPUT 'localhost:9200/dns/NS/1' -d '{\"zone\":\"com\",\"sign\":\"+\",\"domain_name\":\"GOOGLE.COM.\",\"type\":\"NS\",\"name_servers\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"domain_name_exact\":\"GOOGLE.COM.\",\"domain_name_length\":11,\"is_registered\":\"false\",\"name_servers_exact\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"past_name_servers\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"past_name_servers_exact\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"deregistered_history\":[\"2016-07-24T10:00:00.000-0500\"],\"registered_history\":[],\"last_deregistered\":\"2016-07-24T10:00:00.000-0500\"}'`\r\n 2. `node`\r\n 3. `var elasticsearch = require('elasticsearch');`\r\n 4. `var client = new elasticsearch.Client({ hosts: [ <IPs of hosts>] }); //insert IPs`\r\n 5. `function callback(err, body){ console.log(JSON.stringify(body));}`\r\n 6. `getreq = { index: \"dns\", type: \"NS\", _source: true, storedFields: [\"name_servers\"], id: \"1\", routing: \"1\"};`\r\n7. `client.get(getreq,callback);`\r\n\r\n**Provide logs (if relevant)**:\r\n\r\nCurrent response to the above request is the following:\r\n\r\n> {\"_index\":\"dns\",\"_type\":\"NS\",\"_id\":\"1\",\"_version\":1,\"found\":true,\"_source\":{\"zone\":\"com\",\"sign\":\"+\",\"domain_name\":\"GOOGLE.COM.\",\"type\":\"NS\",\"name_servers\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"domain_name_exact\":\"GOOGLE.COM.\",\"domain_name_length\":11,\"is_registered\":\"false\",\"name_servers_exact\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"past_name_servers\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"past_name_servers_exact\":[\"NS1.GOOGLE.COM.\",\"NS2.GOOGLE.COM.\",\"NS3.GOOGLE.COM.\",\"NS4.GOOGLE.COM.\"],\"deregistered_history\":[\"2016-07-24T10:00:00.000-0500\"],\"registered_history\":[],\"last_deregistered\":\"2016-07-24T10:00:00.000-0500\"}}\r\n\r\nHere's a cleaner version with source set to false:\r\n\r\n> {\"_index\":\"dns\",\"_type\":\"NS\",\"_id\":\"1\",\"_version\":1,\"found\":true}\r\n\r\nHere's the mapping for this particular index: [gist](https://gist.github.com/esamudio/b93aea10455b178ca0a9afb174957ff8)\r\n\r\n<!--\r\nIf you are filing a feature request, please remove the above bug\r\nreport block and provide responses for all of the below items.\r\n-->\r\n"}}
{"actor":{"display_login":"esamudio"}}