{"action":"created","comment":{"url":"https://api.github.com/repos/xapian/xapian/pulls/comments/72981272","id":72981272,"diff_hunk":"@@ -70,26 +74,48 @@ TfIdfWeight::name() const\n string\n TfIdfWeight::serialise() const\n {\n-    return normalizations;\n+    if (param_s > 0 || param_delta > 0) {\n+\tstring result = serialise_double(param_s);\n+\tresult += serialise_double(param_delta);\n+\treturn result;\n+    } else {\n+\treturn normalizations;\n+    }\n }\n \n TfIdfWeight *\n-TfIdfWeight::unserialise(const string & s) const\n+TfIdfWeight::unserialise(const string & str) const\n {\n-    if (s.length() != 3)\n-\tthrow Xapian::SerialisationError(\"Extra data in TfIdfWeight::unserialise()\");\n-    return new TfIdfWeight(s);\n+    if (param_s > 0 || param_delta > 0) {\n+\tconst char *ptr = str.data();\n+\tconst char *end = ptr + str.size();\n+\tdouble s = unserialise_double(&ptr, end);\n+\tdouble delta = unserialise_double(&ptr, end);\n+\tif (rare(ptr != end))\n+\t    throw Xapian::SerialisationError(\"Extra data in TfIdfWeight::unserialise()\");\n+\treturn new TfIdfWeight(s, delta);\n+    } else {\n+\tif (str.length() != 3)\n+\t    throw Xapian::SerialisationError(\"Extra data in TfIdfWeight::unserialise()\");\n+\treturn new TfIdfWeight(str);\n+    }\n }\n \n double\n-TfIdfWeight::get_sumpart(Xapian::termcount wdf, Xapian::termcount,\n+TfIdfWeight::get_sumpart(Xapian::termcount wdf, Xapian::termcount doclen,\n \t\t\t Xapian::termcount) const\n {\n     Xapian::doccount termfreq = 1;\n+    double wqf_double = get_wqf();","path":"xapian-core/weight/tfidfweight.cc","position":75,"original_position":75,"commit_id":"749bf866425746fefc85a5b5e109388bb8295381","original_commit_id":"749bf866425746fefc85a5b5e109388bb8295381","user":{"login":"ivmarkp","id":17006136,"avatar_url":"https://avatars.githubusercontent.com/u/17006136?v=3","gravatar_id":"","url":"https://api.github.com/users/ivmarkp","html_url":"https://github.com/ivmarkp","followers_url":"https://api.github.com/users/ivmarkp/followers","following_url":"https://api.github.com/users/ivmarkp/following{/other_user}","gists_url":"https://api.github.com/users/ivmarkp/gists{/gist_id}","starred_url":"https://api.github.com/users/ivmarkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivmarkp/subscriptions","organizations_url":"https://api.github.com/users/ivmarkp/orgs","repos_url":"https://api.github.com/users/ivmarkp/repos","events_url":"https://api.github.com/users/ivmarkp/events{/privacy}","received_events_url":"https://api.github.com/users/ivmarkp/received_events","type":"User","site_admin":false},"body":"Will change it with a fixup commit.","created_at":"2016-08-01T13:55:08Z","updated_at":"2016-08-01T13:55:08Z","html_url":"https://github.com/xapian/xapian/pull/115#discussion_r72981272","pull_request_url":"https://api.github.com/repos/xapian/xapian/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/xapian/xapian/pulls/comments/72981272"},"html":{"href":"https://github.com/xapian/xapian/pull/115#discussion_r72981272"},"pull_request":{"href":"https://api.github.com/repos/xapian/xapian/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/xapian/xapian/pulls/115","id":79512108,"html_url":"https://github.com/xapian/xapian/pull/115","diff_url":"https://github.com/xapian/xapian/pull/115.diff","patch_url":"https://github.com/xapian/xapian/pull/115.patch","issue_url":"https://api.github.com/repos/xapian/xapian/issues/115","number":115,"state":"open","locked":false,"title":"Pivoted Normalization (Piv+) implementation","user":{"login":"ivmarkp","id":17006136,"avatar_url":"https://avatars.githubusercontent.com/u/17006136?v=3","gravatar_id":"","url":"https://api.github.com/users/ivmarkp","html_url":"https://github.com/ivmarkp","followers_url":"https://api.github.com/users/ivmarkp/followers","following_url":"https://api.github.com/users/ivmarkp/following{/other_user}","gists_url":"https://api.github.com/users/ivmarkp/gists{/gist_id}","starred_url":"https://api.github.com/users/ivmarkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivmarkp/subscriptions","organizations_url":"https://api.github.com/users/ivmarkp/orgs","repos_url":"https://api.github.com/users/ivmarkp/repos","events_url":"https://api.github.com/users/ivmarkp/events{/privacy}","received_events_url":"https://api.github.com/users/ivmarkp/received_events","type":"User","site_admin":false},"body":"* Adds support for pivoted normalization in tfidfweight scheme\r\n* Builds successfully and all `make check` tests pass.\r\n\r\nNote: Not to merge yet.","created_at":"2016-08-01T04:37:39Z","updated_at":"2016-08-01T13:55:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a88cc5616418017ae59ab6a476dbe0d56ab8f6b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/xapian/xapian/pulls/115/commits","review_comments_url":"https://api.github.com/repos/xapian/xapian/pulls/115/comments","review_comment_url":"https://api.github.com/repos/xapian/xapian/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xapian/xapian/issues/115/comments","statuses_url":"https://api.github.com/repos/xapian/xapian/statuses/749bf866425746fefc85a5b5e109388bb8295381","head":{"label":"ivmarkp:piv+","ref":"piv+","sha":"749bf866425746fefc85a5b5e109388bb8295381","user":{"login":"ivmarkp","id":17006136,"avatar_url":"https://avatars.githubusercontent.com/u/17006136?v=3","gravatar_id":"","url":"https://api.github.com/users/ivmarkp","html_url":"https://github.com/ivmarkp","followers_url":"https://api.github.com/users/ivmarkp/followers","following_url":"https://api.github.com/users/ivmarkp/following{/other_user}","gists_url":"https://api.github.com/users/ivmarkp/gists{/gist_id}","starred_url":"https://api.github.com/users/ivmarkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivmarkp/subscriptions","organizations_url":"https://api.github.com/users/ivmarkp/orgs","repos_url":"https://api.github.com/users/ivmarkp/repos","events_url":"https://api.github.com/users/ivmarkp/events{/privacy}","received_events_url":"https://api.github.com/users/ivmarkp/received_events","type":"User","site_admin":false},"repo":{"id":53715784,"name":"xapian","full_name":"ivmarkp/xapian","owner":{"login":"ivmarkp","id":17006136,"avatar_url":"https://avatars.githubusercontent.com/u/17006136?v=3","gravatar_id":"","url":"https://api.github.com/users/ivmarkp","html_url":"https://github.com/ivmarkp","followers_url":"https://api.github.com/users/ivmarkp/followers","following_url":"https://api.github.com/users/ivmarkp/following{/other_user}","gists_url":"https://api.github.com/users/ivmarkp/gists{/gist_id}","starred_url":"https://api.github.com/users/ivmarkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivmarkp/subscriptions","organizations_url":"https://api.github.com/users/ivmarkp/orgs","repos_url":"https://api.github.com/users/ivmarkp/repos","events_url":"https://api.github.com/users/ivmarkp/events{/privacy}","received_events_url":"https://api.github.com/users/ivmarkp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivmarkp/xapian","description":"Mirror of the Xapian repository.  You're welcome to open pull requests on github (they'll just get merged indirectly).","fork":true,"url":"https://api.github.com/repos/ivmarkp/xapian","forks_url":"https://api.github.com/repos/ivmarkp/xapian/forks","keys_url":"https://api.github.com/repos/ivmarkp/xapian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivmarkp/xapian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivmarkp/xapian/teams","hooks_url":"https://api.github.com/repos/ivmarkp/xapian/hooks","issue_events_url":"https://api.github.com/repos/ivmarkp/xapian/issues/events{/number}","events_url":"https://api.github.com/repos/ivmarkp/xapian/events","assignees_url":"https://api.github.com/repos/ivmarkp/xapian/assignees{/user}","branches_url":"https://api.github.com/repos/ivmarkp/xapian/branches{/branch}","tags_url":"https://api.github.com/repos/ivmarkp/xapian/tags","blobs_url":"https://api.github.com/repos/ivmarkp/xapian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivmarkp/xapian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivmarkp/xapian/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivmarkp/xapian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivmarkp/xapian/statuses/{sha}","languages_url":"https://api.github.com/repos/ivmarkp/xapian/languages","stargazers_url":"https://api.github.com/repos/ivmarkp/xapian/stargazers","contributors_url":"https://api.github.com/repos/ivmarkp/xapian/contributors","subscribers_url":"https://api.github.com/repos/ivmarkp/xapian/subscribers","subscription_url":"https://api.github.com/repos/ivmarkp/xapian/subscription","commits_url":"https://api.github.com/repos/ivmarkp/xapian/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivmarkp/xapian/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivmarkp/xapian/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivmarkp/xapian/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivmarkp/xapian/contents/{+path}","compare_url":"https://api.github.com/repos/ivmarkp/xapian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivmarkp/xapian/merges","archive_url":"https://api.github.com/repos/ivmarkp/xapian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivmarkp/xapian/downloads","issues_url":"https://api.github.com/repos/ivmarkp/xapian/issues{/number}","pulls_url":"https://api.github.com/repos/ivmarkp/xapian/pulls{/number}","milestones_url":"https://api.github.com/repos/ivmarkp/xapian/milestones{/number}","notifications_url":"https://api.github.com/repos/ivmarkp/xapian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivmarkp/xapian/labels{/name}","releases_url":"https://api.github.com/repos/ivmarkp/xapian/releases{/id}","deployments_url":"https://api.github.com/repos/ivmarkp/xapian/deployments","created_at":"2016-03-12T05:46:48Z","updated_at":"2016-03-12T05:46:55Z","pushed_at":"2016-08-01T04:31:00Z","git_url":"git://github.com/ivmarkp/xapian.git","ssh_url":"git@github.com:ivmarkp/xapian.git","clone_url":"https://github.com/ivmarkp/xapian.git","svn_url":"https://github.com/ivmarkp/xapian","homepage":"https://xapian.org/","size":77397,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":false,"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":"xapian:master","ref":"master","sha":"2f1cf7c6f8eb635c5962e67f6113562f70ebd2a3","user":{"login":"xapian","id":312861,"avatar_url":"https://avatars.githubusercontent.com/u/312861?v=3","gravatar_id":"","url":"https://api.github.com/users/xapian","html_url":"https://github.com/xapian","followers_url":"https://api.github.com/users/xapian/followers","following_url":"https://api.github.com/users/xapian/following{/other_user}","gists_url":"https://api.github.com/users/xapian/gists{/gist_id}","starred_url":"https://api.github.com/users/xapian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xapian/subscriptions","organizations_url":"https://api.github.com/users/xapian/orgs","repos_url":"https://api.github.com/users/xapian/repos","events_url":"https://api.github.com/users/xapian/events{/privacy}","received_events_url":"https://api.github.com/users/xapian/received_events","type":"Organization","site_admin":false},"repo":{"id":735981,"name":"xapian","full_name":"xapian/xapian","owner":{"login":"xapian","id":312861,"avatar_url":"https://avatars.githubusercontent.com/u/312861?v=3","gravatar_id":"","url":"https://api.github.com/users/xapian","html_url":"https://github.com/xapian","followers_url":"https://api.github.com/users/xapian/followers","following_url":"https://api.github.com/users/xapian/following{/other_user}","gists_url":"https://api.github.com/users/xapian/gists{/gist_id}","starred_url":"https://api.github.com/users/xapian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xapian/subscriptions","organizations_url":"https://api.github.com/users/xapian/orgs","repos_url":"https://api.github.com/users/xapian/repos","events_url":"https://api.github.com/users/xapian/events{/privacy}","received_events_url":"https://api.github.com/users/xapian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xapian/xapian","description":"Mirror of the Xapian repository.  You're welcome to open pull requests on github (they'll just get merged indirectly).","fork":false,"url":"https://api.github.com/repos/xapian/xapian","forks_url":"https://api.github.com/repos/xapian/xapian/forks","keys_url":"https://api.github.com/repos/xapian/xapian/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xapian/xapian/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xapian/xapian/teams","hooks_url":"https://api.github.com/repos/xapian/xapian/hooks","issue_events_url":"https://api.github.com/repos/xapian/xapian/issues/events{/number}","events_url":"https://api.github.com/repos/xapian/xapian/events","assignees_url":"https://api.github.com/repos/xapian/xapian/assignees{/user}","branches_url":"https://api.github.com/repos/xapian/xapian/branches{/branch}","tags_url":"https://api.github.com/repos/xapian/xapian/tags","blobs_url":"https://api.github.com/repos/xapian/xapian/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xapian/xapian/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xapian/xapian/git/refs{/sha}","trees_url":"https://api.github.com/repos/xapian/xapian/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xapian/xapian/statuses/{sha}","languages_url":"https://api.github.com/repos/xapian/xapian/languages","stargazers_url":"https://api.github.com/repos/xapian/xapian/stargazers","contributors_url":"https://api.github.com/repos/xapian/xapian/contributors","subscribers_url":"https://api.github.com/repos/xapian/xapian/subscribers","subscription_url":"https://api.github.com/repos/xapian/xapian/subscription","commits_url":"https://api.github.com/repos/xapian/xapian/commits{/sha}","git_commits_url":"https://api.github.com/repos/xapian/xapian/git/commits{/sha}","comments_url":"https://api.github.com/repos/xapian/xapian/comments{/number}","issue_comment_url":"https://api.github.com/repos/xapian/xapian/issues/comments{/number}","contents_url":"https://api.github.com/repos/xapian/xapian/contents/{+path}","compare_url":"https://api.github.com/repos/xapian/xapian/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xapian/xapian/merges","archive_url":"https://api.github.com/repos/xapian/xapian/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xapian/xapian/downloads","issues_url":"https://api.github.com/repos/xapian/xapian/issues{/number}","pulls_url":"https://api.github.com/repos/xapian/xapian/pulls{/number}","milestones_url":"https://api.github.com/repos/xapian/xapian/milestones{/number}","notifications_url":"https://api.github.com/repos/xapian/xapian/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xapian/xapian/labels{/name}","releases_url":"https://api.github.com/repos/xapian/xapian/releases{/id}","deployments_url":"https://api.github.com/repos/xapian/xapian/deployments","created_at":"2010-06-23T15:51:03Z","updated_at":"2016-07-30T06:02:12Z","pushed_at":"2016-08-01T04:37:39Z","git_url":"git://github.com/xapian/xapian.git","ssh_url":"git@github.com:xapian/xapian.git","clone_url":"https://github.com/xapian/xapian.git","svn_url":"https://github.com/xapian/xapian","homepage":"https://xapian.org/","size":89124,"stargazers_count":270,"watchers_count":270,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":144,"mirror_url":null,"open_issues_count":21,"forks":144,"open_issues":21,"watchers":270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xapian/xapian/pulls/115"},"html":{"href":"https://github.com/xapian/xapian/pull/115"},"issue":{"href":"https://api.github.com/repos/xapian/xapian/issues/115"},"comments":{"href":"https://api.github.com/repos/xapian/xapian/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/xapian/xapian/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/xapian/xapian/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xapian/xapian/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/xapian/xapian/statuses/749bf866425746fefc85a5b5e109388bb8295381"}}}}
{"actor":{"display_login":"ivmarkp"}}