{"action":"opened","number":30284,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284","id":185102252,"html_url":"https://github.com/elastic/elasticsearch/pull/30284","diff_url":"https://github.com/elastic/elasticsearch/pull/30284.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/30284.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30284","number":30284,"state":"open","locked":false,"title":"serialize suggestion responses as named writeables","user":{"login":"andyb-elastic","id":29205940,"avatar_url":"https://avatars2.githubusercontent.com/u/29205940?v=4","gravatar_id":"","url":"https://api.github.com/users/andyb-elastic","html_url":"https://github.com/andyb-elastic","followers_url":"https://api.github.com/users/andyb-elastic/followers","following_url":"https://api.github.com/users/andyb-elastic/following{/other_user}","gists_url":"https://api.github.com/users/andyb-elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/andyb-elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyb-elastic/subscriptions","organizations_url":"https://api.github.com/users/andyb-elastic/orgs","repos_url":"https://api.github.com/users/andyb-elastic/repos","events_url":"https://api.github.com/users/andyb-elastic/events{/privacy}","received_events_url":"https://api.github.com/users/andyb-elastic/received_events","type":"User","site_admin":false},"body":"This is still in-progress but I wanted to get it up for some feedback. I think the exact location of where some things (e.g. response fields) should go in the class hierarchy still needs to be cleaned up, as well as xcontent generation/parsing. The test coverage also probably could use some work.\r\n\r\nThe first stage of this will make suggestion responses named writeables and adapt CustomSuggesterIT accordingly, and then the second stage will move that test to an example plugin and make it a rest integration test.\r\n\r\nThis is related to https://github.com/elastic/elasticsearch/issues/26585\r\n\r\nSuggestion responses were previously serialized as streamables which\r\nmade writing suggesters in plugins with custom suggestion response types\r\nimpossible. This commit makes them serialized as named writeables and\r\nprovides a facility for registering a reader for suggestion responses\r\nwhen registering a suggester.\r\n\r\nThis also makes Suggestion responses abstract, requiring a suggester\r\nimplementation to provide its own types. Suggesters which do not need\r\nanything additional to what is defined in Suggest.Suggestion should\r\nprovide a minimal subclass.\r\n","created_at":"2018-05-01T01:13:29Z","updated_at":"2018-05-01T01:13:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":146833729,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Search/Suggesters","name":":Search/Suggesters","color":"0e8a16","default":false},{"id":23172,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Efeature","name":">feature","color":"006b75","default":false},{"id":912911731,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.4.0","name":"v6.4.0","color":"DDDDDD","default":false},{"id":484855464,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v7.0.0","name":"v7.0.0","color":"dddddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30284/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/64369c8b798d70f53395ff6820431eb27f9c061f","head":{"label":"andyb-elastic:feature-plugin-suggester-named-writeable-attempt-3","ref":"feature-plugin-suggester-named-writeable-attempt-3","sha":"64369c8b798d70f53395ff6820431eb27f9c061f","user":{"login":"andyb-elastic","id":29205940,"avatar_url":"https://avatars2.githubusercontent.com/u/29205940?v=4","gravatar_id":"","url":"https://api.github.com/users/andyb-elastic","html_url":"https://github.com/andyb-elastic","followers_url":"https://api.github.com/users/andyb-elastic/followers","following_url":"https://api.github.com/users/andyb-elastic/following{/other_user}","gists_url":"https://api.github.com/users/andyb-elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/andyb-elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyb-elastic/subscriptions","organizations_url":"https://api.github.com/users/andyb-elastic/orgs","repos_url":"https://api.github.com/users/andyb-elastic/repos","events_url":"https://api.github.com/users/andyb-elastic/events{/privacy}","received_events_url":"https://api.github.com/users/andyb-elastic/received_events","type":"User","site_admin":false},"repo":{"id":105077423,"name":"elasticsearch","full_name":"andyb-elastic/elasticsearch","owner":{"login":"andyb-elastic","id":29205940,"avatar_url":"https://avatars2.githubusercontent.com/u/29205940?v=4","gravatar_id":"","url":"https://api.github.com/users/andyb-elastic","html_url":"https://github.com/andyb-elastic","followers_url":"https://api.github.com/users/andyb-elastic/followers","following_url":"https://api.github.com/users/andyb-elastic/following{/other_user}","gists_url":"https://api.github.com/users/andyb-elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/andyb-elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyb-elastic/subscriptions","organizations_url":"https://api.github.com/users/andyb-elastic/orgs","repos_url":"https://api.github.com/users/andyb-elastic/repos","events_url":"https://api.github.com/users/andyb-elastic/events{/privacy}","received_events_url":"https://api.github.com/users/andyb-elastic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andyb-elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/andyb-elastic/elasticsearch","forks_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/andyb-elastic/elasticsearch/deployments","created_at":"2017-09-27T22:52:21Z","updated_at":"2017-09-27T22:53:02Z","pushed_at":"2018-05-01T01:07:46Z","git_url":"git://github.com/andyb-elastic/elasticsearch.git","ssh_url":"git@github.com:andyb-elastic/elasticsearch.git","clone_url":"https://github.com/andyb-elastic/elasticsearch.git","svn_url":"https://github.com/andyb-elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":441824,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"65e5868a55d66b1a930b973b87258209a27836db","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2018-05-01T01:09:06Z","pushed_at":"2018-05-01T00:55:07Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":475926,"stargazers_count":30609,"watchers_count":30609,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10602,"mirror_url":null,"archived":false,"open_issues_count":1484,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":10602,"open_issues":1484,"watchers":30609,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/30284"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/30284"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/30284/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30284/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/64369c8b798d70f53395ff6820431eb27f9c061f"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":581,"deletions":275,"changed_files":20}}
{"actor":{"display_login":"andyb-elastic"}}