GitHub PullRequestReviewCommentEvent at 2014-08-27 16:11:13
Repository: elasticsearch
Actor: rjernst
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/16785760","id":16785760,"diff_hunk":"@@ -21,12 +21,17 @@\n \n import org.apache.lucene.index.AtomicReaderContext;\n import org.apache.lucene.search.Explanation;\n+import org.elasticsearch.ElasticsearchIllegalArgumentException;\n \n /**\n  *\n  */\n+@Deprecated\n public class BoostScoreFunction extends ScoreFunction {\n \n+    public static final String BOOST_WEIGHT_ERROR_MESSAGE_PARSER = \"boost_factor/weight defined together does not make sense. Use one of them only. weight is preferable because boost_factor is deprecated.\";","path":"src/main/java/org/elasticsearch/common/lucene/search/function/BoostScoreFunction.java","position":12,"original_position":12,"commit_id":"30b0c17d64134b2fbcffa01bf54240ddf14a9ef6","original_commit_id":"30b0c17d64134b2fbcffa01bf54240ddf14a9ef6","user":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=2","gravatar_id":"9ea4dccd7eeb9cb74188357525244113","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"body":"I think this message could be simplified to:\r\n\"'boost_factor' and 'weight' cannot be used together. Use 'weight'\"","created_at":"2014-08-27T16:11:13Z","updated_at":"2014-08-27T16:11:13Z","html_url":"https://github.com/elasticsearch/elasticsearch/pull/7137#discussion_r16785760","pull_request_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137","_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/16785760"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/7137#discussion_r16785760"},"pull_request":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137"}}},"pull_request":{"url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137","id":19256887,"html_url":"https://github.com/elasticsearch/elasticsearch/pull/7137","diff_url":"https://github.com/elasticsearch/elasticsearch/pull/7137.diff","patch_url":"https://github.com/elasticsearch/elasticsearch/pull/7137.patch","issue_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/7137","number":7137,"state":"open","locked":false,"title":"function_score: add optional weight parameter per function","user":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=2","gravatar_id":"810630d404a004080d1d65f081e87607","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"body":"Weights can be defined per function like this:\r\n\r\n```\r\n\"function_score\": {\r\n    \"functions\": [\r\n        {\r\n            \"filter\": {},\r\n            \"FUNCTION\": {},\r\n            \"weight\": number\r\n        }\r\n        ...\r\n```\r\nIf `weight` is given without `FUNCTION` then `weight` behaves like `boost_factor`.\r\nThis commit deprecates `boost_factor`.\r\n\r\nThe following is valid:\r\n\r\n```\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"weight\": 2\r\n    }\r\n  }\r\n}\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"functions\": [\r\n        {\r\n          \"weight\": 2\r\n        },\r\n        ...\r\n      ]\r\n    }\r\n  }\r\n}\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"functions\": [\r\n        {\r\n          \"FUNCTION\": {},\r\n          \"weight\": 2\r\n        },\r\n        ...\r\n      ]\r\n    }\r\n  }\r\n}\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"functions\": [\r\n        {\r\n          \"filter\": {},\r\n          \"weight\": 2\r\n        },\r\n        ...\r\n      ]\r\n    }\r\n  }\r\n}\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"functions\": [\r\n        {\r\n          \"filter\": {},\r\n          \"FUNCTION\": {},\r\n          \"weight\": 2\r\n        },\r\n        ...\r\n      ]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThe following is not valid:\r\n\r\n```\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"weight\": 2,\r\n      \"FUNCTION(including boost_factor)\": 2\r\n    }\r\n  }\r\n}\r\n\r\nPOST testidx/_search\r\n{\r\n  \"query\": {\r\n    \"function_score\": {\r\n      \"functions\": [\r\n        {\r\n          \"weight\": 2,\r\n          \"boost_factor\": 2\r\n        }\r\n      ]\r\n    }\r\n  }\r\n}\r\n````\r\n\r\ncloses #6955","created_at":"2014-08-03T16:07:45Z","updated_at":"2014-08-27T16:11:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12d07380ebe11b245ee0c06f97e032e808576aae","assignee":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=2","gravatar_id":"810630d404a004080d1d65f081e87607","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137/commits","review_comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137/comments","review_comment_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/7137/comments","statuses_url":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/30b0c17d64134b2fbcffa01bf54240ddf14a9ef6","head":{"label":"brwe:issue-6955","ref":"issue-6955","sha":"30b0c17d64134b2fbcffa01bf54240ddf14a9ef6","user":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=2","gravatar_id":"810630d404a004080d1d65f081e87607","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"repo":{"id":9810286,"name":"elasticsearch","full_name":"brwe/elasticsearch","owner":{"login":"brwe","id":4320215,"avatar_url":"https://avatars.githubusercontent.com/u/4320215?v=2","gravatar_id":"810630d404a004080d1d65f081e87607","url":"https://api.github.com/users/brwe","html_url":"https://github.com/brwe","followers_url":"https://api.github.com/users/brwe/followers","following_url":"https://api.github.com/users/brwe/following{/other_user}","gists_url":"https://api.github.com/users/brwe/gists{/gist_id}","starred_url":"https://api.github.com/users/brwe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwe/subscriptions","organizations_url":"https://api.github.com/users/brwe/orgs","repos_url":"https://api.github.com/users/brwe/repos","events_url":"https://api.github.com/users/brwe/events{/privacy}","received_events_url":"https://api.github.com/users/brwe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brwe/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/brwe/elasticsearch","forks_url":"https://api.github.com/repos/brwe/elasticsearch/forks","keys_url":"https://api.github.com/repos/brwe/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brwe/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brwe/elasticsearch/teams","hooks_url":"https://api.github.com/repos/brwe/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/brwe/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/brwe/elasticsearch/events","assignees_url":"https://api.github.com/repos/brwe/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/brwe/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/brwe/elasticsearch/tags","blobs_url":"https://api.github.com/repos/brwe/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brwe/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brwe/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/brwe/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brwe/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/brwe/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/brwe/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/brwe/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/brwe/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/brwe/elasticsearch/subscription","commits_url":"https://api.github.com/repos/brwe/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/brwe/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/brwe/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/brwe/elasticsearch/issues/comments/{number}","contents_url":"https://api.github.com/repos/brwe/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/brwe/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brwe/elasticsearch/merges","archive_url":"https://api.github.com/repos/brwe/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brwe/elasticsearch/downloads","issues_url":"https://api.github.com/repos/brwe/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/brwe/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/brwe/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/brwe/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brwe/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/brwe/elasticsearch/releases{/id}","created_at":"2013-05-02T09:49:12Z","updated_at":"2014-08-14T12:47:29Z","pushed_at":"2014-08-27T15:50:56Z","git_url":"git://github.com/brwe/elasticsearch.git","ssh_url":"git@github.com:brwe/elasticsearch.git","clone_url":"https://github.com/brwe/elasticsearch.git","svn_url":"https://github.com/brwe/elasticsearch","homepage":"http://elasticsearch.org","size":66539,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elasticsearch:master","ref":"master","sha":"65afa1d93b702c842479100c9e5e738a2efe73eb","user":{"login":"elasticsearch","id":141304,"avatar_url":"https://avatars.githubusercontent.com/u/141304?v=2","gravatar_id":"1aecf795625bbc7251068cfbc39800ab","url":"https://api.github.com/users/elasticsearch","html_url":"https://github.com/elasticsearch","followers_url":"https://api.github.com/users/elasticsearch/followers","following_url":"https://api.github.com/users/elasticsearch/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch/orgs","repos_url":"https://api.github.com/users/elasticsearch/repos","events_url":"https://api.github.com/users/elasticsearch/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elasticsearch/elasticsearch","owner":{"login":"elasticsearch","id":141304,"avatar_url":"https://avatars.githubusercontent.com/u/141304?v=2","gravatar_id":"1aecf795625bbc7251068cfbc39800ab","url":"https://api.github.com/users/elasticsearch","html_url":"https://github.com/elasticsearch","followers_url":"https://api.github.com/users/elasticsearch/followers","following_url":"https://api.github.com/users/elasticsearch/following{/other_user}","gists_url":"https://api.github.com/users/elasticsearch/gists{/gist_id}","starred_url":"https://api.github.com/users/elasticsearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elasticsearch/subscriptions","organizations_url":"https://api.github.com/users/elasticsearch/orgs","repos_url":"https://api.github.com/users/elasticsearch/repos","events_url":"https://api.github.com/users/elasticsearch/events{/privacy}","received_events_url":"https://api.github.com/users/elasticsearch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elasticsearch/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elasticsearch/elasticsearch","forks_url":"https://api.github.com/repos/elasticsearch/elasticsearch/forks","keys_url":"https://api.github.com/repos/elasticsearch/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elasticsearch/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elasticsearch/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elasticsearch/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elasticsearch/elasticsearch/events","assignees_url":"https://api.github.com/repos/elasticsearch/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elasticsearch/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elasticsearch/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elasticsearch/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elasticsearch/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elasticsearch/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elasticsearch/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elasticsearch/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elasticsearch/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elasticsearch/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/comments/{number}","contents_url":"https://api.github.com/repos/elasticsearch/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elasticsearch/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elasticsearch/elasticsearch/merges","archive_url":"https://api.github.com/repos/elasticsearch/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elasticsearch/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elasticsearch/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elasticsearch/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elasticsearch/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elasticsearch/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elasticsearch/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2014-08-27T15:28:24Z","pushed_at":"2014-08-27T15:43:17Z","git_url":"git://github.com/elasticsearch/elasticsearch.git","ssh_url":"git@github.com:elasticsearch/elasticsearch.git","clone_url":"https://github.com/elasticsearch/elasticsearch.git","svn_url":"https://github.com/elasticsearch/elasticsearch","homepage":"http://elasticsearch.org","size":252759,"stargazers_count":8117,"watchers_count":8117,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":2353,"mirror_url":null,"open_issues_count":816,"forks":2353,"open_issues":816,"watchers":8117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137"},"html":{"href":"https://github.com/elasticsearch/elasticsearch/pull/7137"},"issue":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/7137"},"comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/issues/7137/comments"},"review_comments":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137/comments"},"review_comment":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/pulls/7137/commits"},"statuses":{"href":"https://api.github.com/repos/elasticsearch/elasticsearch/statuses/30b0c17d64134b2fbcffa01bf54240ddf14a9ef6"}}}}