{"action":"created","comment":{"url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/comments/235480544","pull_request_review_id":177357017,"id":235480544,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTQ4MDU0NA==","diff_hunk":"@@ -198,6 +200,27 @@ fn build_poi(row: Row) -> Option<Poi> {\n         return None;\n     }\n \n+    let properties = build_poi_properties(&row, &name).unwrap_or(vec![]);\n+\n+    let weight_wikidata = properties\n+        .iter()\n+        .find(|p| &p.key == \"wikidata\")\n+        .map_or(0., |_p| 100.0);\n+\n+    let names_count = properties\n+        .iter()\n+        .filter(|p| Regex::new(r\"name:*\").unwrap().is_match(&p.key))","path":"src/lib.rs","position":29,"original_position":29,"commit_id":"e7e01a9d3b0399066785e145abb1bbde9ea43d26","original_commit_id":"e7e01a9d3b0399066785e145abb1bbde9ea43d26","user":{"login":"amatissart","id":4726554,"node_id":"MDQ6VXNlcjQ3MjY1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4726554?v=4","gravatar_id":"","url":"https://api.github.com/users/amatissart","html_url":"https://github.com/amatissart","followers_url":"https://api.github.com/users/amatissart/followers","following_url":"https://api.github.com/users/amatissart/following{/other_user}","gists_url":"https://api.github.com/users/amatissart/gists{/gist_id}","starred_url":"https://api.github.com/users/amatissart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatissart/subscriptions","organizations_url":"https://api.github.com/users/amatissart/orgs","repos_url":"https://api.github.com/users/amatissart/repos","events_url":"https://api.github.com/users/amatissart/events{/privacy}","received_events_url":"https://api.github.com/users/amatissart/received_events","type":"User","site_admin":false},"body":"why not using [starts_with](https://doc.rust-lang.org/std/string/struct.String.html#method.starts_with) instead of adding a dependency ?","created_at":"2018-11-21T17:33:03Z","updated_at":"2018-11-21T17:38:37Z","html_url":"https://github.com/QwantResearch/fafnir/pull/24#discussion_r235480544","pull_request_url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/comments/235480544"},"html":{"href":"https://github.com/QwantResearch/fafnir/pull/24#discussion_r235480544"},"pull_request":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24","id":232744440,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzQ0NDQw","html_url":"https://github.com/QwantResearch/fafnir/pull/24","diff_url":"https://github.com/QwantResearch/fafnir/pull/24.diff","patch_url":"https://github.com/QwantResearch/fafnir/pull/24.patch","issue_url":"https://api.github.com/repos/QwantResearch/fafnir/issues/24","number":24,"state":"open","locked":false,"title":"Change POI weights [Tour Eiffel Bug]","user":{"login":"jbgriesner","id":33450151,"node_id":"MDQ6VXNlcjMzNDUwMTUx","avatar_url":"https://avatars3.githubusercontent.com/u/33450151?v=4","gravatar_id":"","url":"https://api.github.com/users/jbgriesner","html_url":"https://github.com/jbgriesner","followers_url":"https://api.github.com/users/jbgriesner/followers","following_url":"https://api.github.com/users/jbgriesner/following{/other_user}","gists_url":"https://api.github.com/users/jbgriesner/gists{/gist_id}","starred_url":"https://api.github.com/users/jbgriesner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbgriesner/subscriptions","organizations_url":"https://api.github.com/users/jbgriesner/orgs","repos_url":"https://api.github.com/users/jbgriesner/repos","events_url":"https://api.github.com/users/jbgriesner/events{/privacy}","received_events_url":"https://api.github.com/users/jbgriesner/received_events","type":"User","site_admin":false},"body":"This PR proposes to add a weight to imported POI.\r\nThis weight depends on:\r\n- the existence of the `wikidata` tag\r\n- the number of `names:*` tags\r\n\r\nThe goal is to increase the ranking of famous POI.\r\nThe idea is that famous POI usually have a wikidata tag, and probably their name in many languages.\r\n\r\nOn the \"ile de france\" region, this PR increases by more than 12% the global quality.\r\n ","created_at":"2018-11-21T17:23:36Z","updated_at":"2018-11-21T17:38:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7db8ede0fe51bc07575de8a334374ac6688b3739","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24/commits","review_comments_url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24/comments","review_comment_url":"https://api.github.com/repos/QwantResearch/fafnir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QwantResearch/fafnir/issues/24/comments","statuses_url":"https://api.github.com/repos/QwantResearch/fafnir/statuses/e7e01a9d3b0399066785e145abb1bbde9ea43d26","head":{"label":"jbgriesner:poi_weights_wiki","ref":"poi_weights_wiki","sha":"e7e01a9d3b0399066785e145abb1bbde9ea43d26","user":{"login":"jbgriesner","id":33450151,"node_id":"MDQ6VXNlcjMzNDUwMTUx","avatar_url":"https://avatars3.githubusercontent.com/u/33450151?v=4","gravatar_id":"","url":"https://api.github.com/users/jbgriesner","html_url":"https://github.com/jbgriesner","followers_url":"https://api.github.com/users/jbgriesner/followers","following_url":"https://api.github.com/users/jbgriesner/following{/other_user}","gists_url":"https://api.github.com/users/jbgriesner/gists{/gist_id}","starred_url":"https://api.github.com/users/jbgriesner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbgriesner/subscriptions","organizations_url":"https://api.github.com/users/jbgriesner/orgs","repos_url":"https://api.github.com/users/jbgriesner/repos","events_url":"https://api.github.com/users/jbgriesner/events{/privacy}","received_events_url":"https://api.github.com/users/jbgriesner/received_events","type":"User","site_admin":false},"repo":{"id":129267023,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkyNjcwMjM=","name":"fafnir","full_name":"jbgriesner/fafnir","private":false,"owner":{"login":"jbgriesner","id":33450151,"node_id":"MDQ6VXNlcjMzNDUwMTUx","avatar_url":"https://avatars3.githubusercontent.com/u/33450151?v=4","gravatar_id":"","url":"https://api.github.com/users/jbgriesner","html_url":"https://github.com/jbgriesner","followers_url":"https://api.github.com/users/jbgriesner/followers","following_url":"https://api.github.com/users/jbgriesner/following{/other_user}","gists_url":"https://api.github.com/users/jbgriesner/gists{/gist_id}","starred_url":"https://api.github.com/users/jbgriesner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbgriesner/subscriptions","organizations_url":"https://api.github.com/users/jbgriesner/orgs","repos_url":"https://api.github.com/users/jbgriesner/repos","events_url":"https://api.github.com/users/jbgriesner/events{/privacy}","received_events_url":"https://api.github.com/users/jbgriesner/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jbgriesner/fafnir","description":"Import imposm POIs from PostgreSQL to Mímirsbrunn Elasticsearch","fork":true,"url":"https://api.github.com/repos/jbgriesner/fafnir","forks_url":"https://api.github.com/repos/jbgriesner/fafnir/forks","keys_url":"https://api.github.com/repos/jbgriesner/fafnir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbgriesner/fafnir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbgriesner/fafnir/teams","hooks_url":"https://api.github.com/repos/jbgriesner/fafnir/hooks","issue_events_url":"https://api.github.com/repos/jbgriesner/fafnir/issues/events{/number}","events_url":"https://api.github.com/repos/jbgriesner/fafnir/events","assignees_url":"https://api.github.com/repos/jbgriesner/fafnir/assignees{/user}","branches_url":"https://api.github.com/repos/jbgriesner/fafnir/branches{/branch}","tags_url":"https://api.github.com/repos/jbgriesner/fafnir/tags","blobs_url":"https://api.github.com/repos/jbgriesner/fafnir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbgriesner/fafnir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbgriesner/fafnir/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbgriesner/fafnir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbgriesner/fafnir/statuses/{sha}","languages_url":"https://api.github.com/repos/jbgriesner/fafnir/languages","stargazers_url":"https://api.github.com/repos/jbgriesner/fafnir/stargazers","contributors_url":"https://api.github.com/repos/jbgriesner/fafnir/contributors","subscribers_url":"https://api.github.com/repos/jbgriesner/fafnir/subscribers","subscription_url":"https://api.github.com/repos/jbgriesner/fafnir/subscription","commits_url":"https://api.github.com/repos/jbgriesner/fafnir/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbgriesner/fafnir/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbgriesner/fafnir/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbgriesner/fafnir/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbgriesner/fafnir/contents/{+path}","compare_url":"https://api.github.com/repos/jbgriesner/fafnir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbgriesner/fafnir/merges","archive_url":"https://api.github.com/repos/jbgriesner/fafnir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbgriesner/fafnir/downloads","issues_url":"https://api.github.com/repos/jbgriesner/fafnir/issues{/number}","pulls_url":"https://api.github.com/repos/jbgriesner/fafnir/pulls{/number}","milestones_url":"https://api.github.com/repos/jbgriesner/fafnir/milestones{/number}","notifications_url":"https://api.github.com/repos/jbgriesner/fafnir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbgriesner/fafnir/labels{/name}","releases_url":"https://api.github.com/repos/jbgriesner/fafnir/releases{/id}","deployments_url":"https://api.github.com/repos/jbgriesner/fafnir/deployments","created_at":"2018-04-12T14:48:53Z","updated_at":"2018-10-24T12:52:14Z","pushed_at":"2018-11-21T17:23:16Z","git_url":"git://github.com/jbgriesner/fafnir.git","ssh_url":"git@github.com:jbgriesner/fafnir.git","clone_url":"https://github.com/jbgriesner/fafnir.git","svn_url":"https://github.com/jbgriesner/fafnir","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"QwantResearch:master","ref":"master","sha":"a0fb246b64a9150bef410821b250ca6b074f1e63","user":{"login":"QwantResearch","id":31347303,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMzQ3MzAz","avatar_url":"https://avatars3.githubusercontent.com/u/31347303?v=4","gravatar_id":"","url":"https://api.github.com/users/QwantResearch","html_url":"https://github.com/QwantResearch","followers_url":"https://api.github.com/users/QwantResearch/followers","following_url":"https://api.github.com/users/QwantResearch/following{/other_user}","gists_url":"https://api.github.com/users/QwantResearch/gists{/gist_id}","starred_url":"https://api.github.com/users/QwantResearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QwantResearch/subscriptions","organizations_url":"https://api.github.com/users/QwantResearch/orgs","repos_url":"https://api.github.com/users/QwantResearch/repos","events_url":"https://api.github.com/users/QwantResearch/events{/privacy}","received_events_url":"https://api.github.com/users/QwantResearch/received_events","type":"Organization","site_admin":false},"repo":{"id":118472958,"node_id":"MDEwOlJlcG9zaXRvcnkxMTg0NzI5NTg=","name":"fafnir","full_name":"QwantResearch/fafnir","private":false,"owner":{"login":"QwantResearch","id":31347303,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxMzQ3MzAz","avatar_url":"https://avatars3.githubusercontent.com/u/31347303?v=4","gravatar_id":"","url":"https://api.github.com/users/QwantResearch","html_url":"https://github.com/QwantResearch","followers_url":"https://api.github.com/users/QwantResearch/followers","following_url":"https://api.github.com/users/QwantResearch/following{/other_user}","gists_url":"https://api.github.com/users/QwantResearch/gists{/gist_id}","starred_url":"https://api.github.com/users/QwantResearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QwantResearch/subscriptions","organizations_url":"https://api.github.com/users/QwantResearch/orgs","repos_url":"https://api.github.com/users/QwantResearch/repos","events_url":"https://api.github.com/users/QwantResearch/events{/privacy}","received_events_url":"https://api.github.com/users/QwantResearch/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/QwantResearch/fafnir","description":"Import imposm POIs from PostgreSQL to Mímirsbrunn Elasticsearch","fork":false,"url":"https://api.github.com/repos/QwantResearch/fafnir","forks_url":"https://api.github.com/repos/QwantResearch/fafnir/forks","keys_url":"https://api.github.com/repos/QwantResearch/fafnir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QwantResearch/fafnir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QwantResearch/fafnir/teams","hooks_url":"https://api.github.com/repos/QwantResearch/fafnir/hooks","issue_events_url":"https://api.github.com/repos/QwantResearch/fafnir/issues/events{/number}","events_url":"https://api.github.com/repos/QwantResearch/fafnir/events","assignees_url":"https://api.github.com/repos/QwantResearch/fafnir/assignees{/user}","branches_url":"https://api.github.com/repos/QwantResearch/fafnir/branches{/branch}","tags_url":"https://api.github.com/repos/QwantResearch/fafnir/tags","blobs_url":"https://api.github.com/repos/QwantResearch/fafnir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QwantResearch/fafnir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QwantResearch/fafnir/git/refs{/sha}","trees_url":"https://api.github.com/repos/QwantResearch/fafnir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QwantResearch/fafnir/statuses/{sha}","languages_url":"https://api.github.com/repos/QwantResearch/fafnir/languages","stargazers_url":"https://api.github.com/repos/QwantResearch/fafnir/stargazers","contributors_url":"https://api.github.com/repos/QwantResearch/fafnir/contributors","subscribers_url":"https://api.github.com/repos/QwantResearch/fafnir/subscribers","subscription_url":"https://api.github.com/repos/QwantResearch/fafnir/subscription","commits_url":"https://api.github.com/repos/QwantResearch/fafnir/commits{/sha}","git_commits_url":"https://api.github.com/repos/QwantResearch/fafnir/git/commits{/sha}","comments_url":"https://api.github.com/repos/QwantResearch/fafnir/comments{/number}","issue_comment_url":"https://api.github.com/repos/QwantResearch/fafnir/issues/comments{/number}","contents_url":"https://api.github.com/repos/QwantResearch/fafnir/contents/{+path}","compare_url":"https://api.github.com/repos/QwantResearch/fafnir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QwantResearch/fafnir/merges","archive_url":"https://api.github.com/repos/QwantResearch/fafnir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QwantResearch/fafnir/downloads","issues_url":"https://api.github.com/repos/QwantResearch/fafnir/issues{/number}","pulls_url":"https://api.github.com/repos/QwantResearch/fafnir/pulls{/number}","milestones_url":"https://api.github.com/repos/QwantResearch/fafnir/milestones{/number}","notifications_url":"https://api.github.com/repos/QwantResearch/fafnir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QwantResearch/fafnir/labels{/name}","releases_url":"https://api.github.com/repos/QwantResearch/fafnir/releases{/id}","deployments_url":"https://api.github.com/repos/QwantResearch/fafnir/deployments","created_at":"2018-01-22T15:06:47Z","updated_at":"2018-11-20T13:38:01Z","pushed_at":"2018-11-21T17:23:37Z","git_url":"git://github.com/QwantResearch/fafnir.git","ssh_url":"git@github.com:QwantResearch/fafnir.git","clone_url":"https://github.com/QwantResearch/fafnir.git","svn_url":"https://github.com/QwantResearch/fafnir","homepage":null,"size":121,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":3,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24"},"html":{"href":"https://github.com/QwantResearch/fafnir/pull/24"},"issue":{"href":"https://api.github.com/repos/QwantResearch/fafnir/issues/24"},"comments":{"href":"https://api.github.com/repos/QwantResearch/fafnir/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QwantResearch/fafnir/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/QwantResearch/fafnir/statuses/e7e01a9d3b0399066785e145abb1bbde9ea43d26"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"amatissart"}}