{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/20166","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20166/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20166/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20166/events","html_url":"https://github.com/elastic/elasticsearch/pull/20166","id":173232019,"number":20166,"title":"Fixed naming inconsistency for fields/stored_fields in the APIs","user":{"login":"jimferenczi","id":15977469,"avatar_url":"https://avatars.githubusercontent.com/u/15977469?v=3","gravatar_id":"","url":"https://api.github.com/users/jimferenczi","html_url":"https://github.com/jimferenczi","followers_url":"https://api.github.com/users/jimferenczi/followers","following_url":"https://api.github.com/users/jimferenczi/following{/other_user}","gists_url":"https://api.github.com/users/jimferenczi/gists{/gist_id}","starred_url":"https://api.github.com/users/jimferenczi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimferenczi/subscriptions","organizations_url":"https://api.github.com/users/jimferenczi/orgs","repos_url":"https://api.github.com/users/jimferenczi/repos","events_url":"https://api.github.com/users/jimferenczi/events{/privacy}","received_events_url":"https://api.github.com/users/jimferenczi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:CRUD","name":":CRUD","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/breaking","name":"breaking","color":"ff0000"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.0.0","name":"v5.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-25T15:18:13Z","updated_at":"2016-08-29T12:26:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/20166","html_url":"https://github.com/elastic/elasticsearch/pull/20166","diff_url":"https://github.com/elastic/elasticsearch/pull/20166.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/20166.patch"},"body":"This change replaces the fields parameter with stored_fields when it makes sense.\r\nThis is dictated by the renaming we made in #18943 for the search API.\r\n\r\nThe following list of endpoint has been changed to use `stored_fields` instead of `fields`:\r\n* get\r\n* mget\r\n* explain\r\n\r\nThe documentation and the rest API spec has been updated to cope with the changes for the following APIs:\r\n* delete_by_query\r\n* get\r\n* mget\r\n* explain\r\n\r\nSome APIs still have the `fields` parameter for various reasons:\r\n\r\n* update: the fields are extracted from the _source directly.\r\n* bulk: the fields parameter is used but fields are extracted from the source directly so it is allowed to have non-stored fields.\r\n* cat.fielddata: the fields paramaters relates to the fielddata fields that should be printed.\r\n* indices.clear_cache: used to indicate which fielddata fields should be cleared.\r\n* indices.get_field_mapping: used to filter fields in the mapping.\r\n* indices.stats: get stats on fields (stored or not stored).\r\n* termvectors: fields are retrieved from the stored fields if possible and extracted from the _source otherwise.\r\n* mtermvectors:\r\n* nodes.stats: the fields parameter is used to concatenate completion_fields and fielddata_fields so it's not related to stored_fields at all.\r\n\r\nFixes #20155"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/243109680","html_url":"https://github.com/elastic/elasticsearch/pull/20166#issuecomment-243109680","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/20166","id":243109680,"user":{"login":"jpountz","id":299848,"avatar_url":"https://avatars.githubusercontent.com/u/299848?v=3","gravatar_id":"","url":"https://api.github.com/users/jpountz","html_url":"https://github.com/jpountz","followers_url":"https://api.github.com/users/jpountz/followers","following_url":"https://api.github.com/users/jpountz/following{/other_user}","gists_url":"https://api.github.com/users/jpountz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpountz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpountz/subscriptions","organizations_url":"https://api.github.com/users/jpountz/orgs","repos_url":"https://api.github.com/users/jpountz/repos","events_url":"https://api.github.com/users/jpountz/events{/privacy}","received_events_url":"https://api.github.com/users/jpountz/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T12:26:47Z","updated_at":"2016-08-29T12:26:47Z","body":"> Since it's not used in the rest API and that source in this case has nothing to do with the source of the document, is it ok to rename setSource to something like fromBytes ?\r\n\r\nNot sure about the name, but definitely +1 on having the Java API as close as possible to the REST API and then renaming internal Java APIs if there is conflict. Back to the name... maybe `fromXContent` since we expect these bytes to be some form of xcontent and the name would be consistent with what we use in query builders to parse incoming bytes (even though the bytes are provided differently)."}}
{"actor":{"display_login":"jpountz"}}