{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/29762138","id":29762138,"diff_hunk":"@@ -0,0 +1,221 @@\n+/*\n+ * Licensed to Elasticsearch under one or more contributor\n+ * license agreements. See the NOTICE file distributed with\n+ * this work for additional information regarding copyright\n+ * ownership. Elasticsearch licenses this file to you under\n+ * the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package org.elasticsearch.index.query;\n+\n+import org.apache.lucene.util.BytesRef;\n+import org.elasticsearch.common.io.stream.StreamInput;\n+import org.elasticsearch.common.io.stream.StreamOutput;\n+import org.elasticsearch.common.io.stream.Streamable;\n+import org.elasticsearch.common.lucene.BytesRefs;\n+import org.elasticsearch.common.xcontent.XContentBuilder;\n+\n+import java.io.IOException;\n+import java.util.Objects;\n+\n+public abstract class BaseTermQueryBuilder extends BaseQueryBuilder implements Streamable {","path":"src/main/java/org/elasticsearch/index/query/BaseTermQueryBuilder.java","position":32,"original_position":32,"commit_id":"e20b6b4d505268bc8a295deae7f41b9f9a71286a","original_commit_id":"e20b6b4d505268bc8a295deae7f41b9f9a71286a","user":{"login":"cbuescher","id":10398885,"avatar_url":"https://avatars.githubusercontent.com/u/10398885?v=3","gravatar_id":"","url":"https://api.github.com/users/cbuescher","html_url":"https://github.com/cbuescher","followers_url":"https://api.github.com/users/cbuescher/followers","following_url":"https://api.github.com/users/cbuescher/following{/other_user}","gists_url":"https://api.github.com/users/cbuescher/gists{/gist_id}","starred_url":"https://api.github.com/users/cbuescher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbuescher/subscriptions","organizations_url":"https://api.github.com/users/cbuescher/orgs","repos_url":"https://api.github.com/users/cbuescher/repos","events_url":"https://api.github.com/users/cbuescher/events{/privacy}","received_events_url":"https://api.github.com/users/cbuescher/received_events","type":"User","site_admin":false},"body":"I was wondering if it is possible to use Generics here, e.g. BaseTermQueryBuilder<TQB extends BaseTermQueryBuilder<?>>. I played around with it, I think this way we can get rid of the boost and queryname setters that way.","created_at":"2015-05-06T14:19:35Z","updated_at":"2015-05-06T14:19:35Z","html_url":"https://github.com/elastic/elasticsearch/pull/11005#discussion_r29762138","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/29762138"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11005#discussion_r29762138"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005","id":34801001,"html_url":"https://github.com/elastic/elasticsearch/pull/11005","diff_url":"https://github.com/elastic/elasticsearch/pull/11005.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/11005.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11005","number":11005,"state":"open","locked":false,"title":"Refactors SpanTermQueryBuilder.","user":{"login":"MaineC","id":70953,"avatar_url":"https://avatars.githubusercontent.com/u/70953?v=3","gravatar_id":"","url":"https://api.github.com/users/MaineC","html_url":"https://github.com/MaineC","followers_url":"https://api.github.com/users/MaineC/followers","following_url":"https://api.github.com/users/MaineC/following{/other_user}","gists_url":"https://api.github.com/users/MaineC/gists{/gist_id}","starred_url":"https://api.github.com/users/MaineC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaineC/subscriptions","organizations_url":"https://api.github.com/users/MaineC/orgs","repos_url":"https://api.github.com/users/MaineC/repos","events_url":"https://api.github.com/users/MaineC/events{/privacy}","received_events_url":"https://api.github.com/users/MaineC/received_events","type":"User","site_admin":false},"body":"Refactors SpanTermQueryBuilder analogous to TermQueryBuilder. Factors common code between the two into separate classes.\r\n\r\nRelates to #10217 \r\n\r\nThis goes against the feature/query-refactoring branch.","created_at":"2015-05-06T09:31:40Z","updated_at":"2015-05-06T14:19:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d31e5e59ba91c69b9165e7cb08fa08b2e22937b3","assignee":{"login":"cbuescher","id":10398885,"avatar_url":"https://avatars.githubusercontent.com/u/10398885?v=3","gravatar_id":"","url":"https://api.github.com/users/cbuescher","html_url":"https://github.com/cbuescher","followers_url":"https://api.github.com/users/cbuescher/followers","following_url":"https://api.github.com/users/cbuescher/following{/other_user}","gists_url":"https://api.github.com/users/cbuescher/gists{/gist_id}","starred_url":"https://api.github.com/users/cbuescher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbuescher/subscriptions","organizations_url":"https://api.github.com/users/cbuescher/orgs","repos_url":"https://api.github.com/users/cbuescher/repos","events_url":"https://api.github.com/users/cbuescher/events{/privacy}","received_events_url":"https://api.github.com/users/cbuescher/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11005/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/e20b6b4d505268bc8a295deae7f41b9f9a71286a","head":{"label":"MaineC:feature/span-term-query-refactoring","ref":"feature/span-term-query-refactoring","sha":"e20b6b4d505268bc8a295deae7f41b9f9a71286a","user":{"login":"MaineC","id":70953,"avatar_url":"https://avatars.githubusercontent.com/u/70953?v=3","gravatar_id":"","url":"https://api.github.com/users/MaineC","html_url":"https://github.com/MaineC","followers_url":"https://api.github.com/users/MaineC/followers","following_url":"https://api.github.com/users/MaineC/following{/other_user}","gists_url":"https://api.github.com/users/MaineC/gists{/gist_id}","starred_url":"https://api.github.com/users/MaineC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaineC/subscriptions","organizations_url":"https://api.github.com/users/MaineC/orgs","repos_url":"https://api.github.com/users/MaineC/repos","events_url":"https://api.github.com/users/MaineC/events{/privacy}","received_events_url":"https://api.github.com/users/MaineC/received_events","type":"User","site_admin":false},"repo":{"id":14859176,"name":"elasticsearch","full_name":"MaineC/elasticsearch","owner":{"login":"MaineC","id":70953,"avatar_url":"https://avatars.githubusercontent.com/u/70953?v=3","gravatar_id":"","url":"https://api.github.com/users/MaineC","html_url":"https://github.com/MaineC","followers_url":"https://api.github.com/users/MaineC/followers","following_url":"https://api.github.com/users/MaineC/following{/other_user}","gists_url":"https://api.github.com/users/MaineC/gists{/gist_id}","starred_url":"https://api.github.com/users/MaineC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaineC/subscriptions","organizations_url":"https://api.github.com/users/MaineC/orgs","repos_url":"https://api.github.com/users/MaineC/repos","events_url":"https://api.github.com/users/MaineC/events{/privacy}","received_events_url":"https://api.github.com/users/MaineC/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaineC/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/MaineC/elasticsearch","forks_url":"https://api.github.com/repos/MaineC/elasticsearch/forks","keys_url":"https://api.github.com/repos/MaineC/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaineC/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaineC/elasticsearch/teams","hooks_url":"https://api.github.com/repos/MaineC/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/MaineC/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/MaineC/elasticsearch/events","assignees_url":"https://api.github.com/repos/MaineC/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/MaineC/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/MaineC/elasticsearch/tags","blobs_url":"https://api.github.com/repos/MaineC/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaineC/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaineC/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaineC/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaineC/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/MaineC/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/MaineC/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/MaineC/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/MaineC/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/MaineC/elasticsearch/subscription","commits_url":"https://api.github.com/repos/MaineC/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaineC/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaineC/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaineC/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaineC/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/MaineC/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaineC/elasticsearch/merges","archive_url":"https://api.github.com/repos/MaineC/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaineC/elasticsearch/downloads","issues_url":"https://api.github.com/repos/MaineC/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/MaineC/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/MaineC/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/MaineC/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaineC/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/MaineC/elasticsearch/releases{/id}","created_at":"2013-12-02T10:17:35Z","updated_at":"2015-05-06T09:43:46Z","pushed_at":"2015-05-06T09:44:04Z","git_url":"git://github.com/MaineC/elasticsearch.git","ssh_url":"git@github.com:MaineC/elasticsearch.git","clone_url":"https://github.com/MaineC/elasticsearch.git","svn_url":"https://github.com/MaineC/elasticsearch","homepage":"http://elasticsearch.org","size":102568,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:feature/query-refactoring","ref":"feature/query-refactoring","sha":"e0b1e84dcff262e8252ac9f533284bfe3f59f25e","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","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://avatars.githubusercontent.com/u/6764390?v=3","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}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-05-06T14:06:41Z","pushed_at":"2015-05-06T13:56:09Z","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":"http://elasticsearch.org","size":352927,"stargazers_count":11077,"watchers_count":11077,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3487,"mirror_url":null,"open_issues_count":1113,"forks":3487,"open_issues":1113,"watchers":11077,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11005"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11005"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11005/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11005/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/e20b6b4d505268bc8a295deae7f41b9f9a71286a"}}}}