{"action":"created","comment":{"url":"https://api.github.com/repos/pelias/api/pulls/comments/46575322","id":46575322,"diff_hunk":"@@ -30,7 +31,7 @@ function generateQuery( clean ){\n \n   // set size\n   if( clean.size ){\n-    vs.var( 'size', clean.size );\n+    vs.var( 'size', calcSize(clean.size));","path":"query/reverse.js","position":14,"original_position":14,"commit_id":"42d940f8c85d491d48d7aa393c2c60f0d322786d","original_commit_id":"42d940f8c85d491d48d7aa393c2c60f0d322786d","user":{"login":"dianashk","id":5446511,"avatar_url":"https://avatars.githubusercontent.com/u/5446511?v=3","gravatar_id":"","url":"https://api.github.com/users/dianashk","html_url":"https://github.com/dianashk","followers_url":"https://api.github.com/users/dianashk/followers","following_url":"https://api.github.com/users/dianashk/following{/other_user}","gists_url":"https://api.github.com/users/dianashk/gists{/gist_id}","starred_url":"https://api.github.com/users/dianashk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dianashk/subscriptions","organizations_url":"https://api.github.com/users/dianashk/orgs","repos_url":"https://api.github.com/users/dianashk/repos","events_url":"https://api.github.com/users/dianashk/events{/privacy}","received_events_url":"https://api.github.com/users/dianashk/received_events","type":"User","site_admin":false},"body":"good point. would a separate variable work? something like clean.querySize. it might be useful to have both for other middleware.","created_at":"2015-12-03T16:35:03Z","updated_at":"2015-12-03T16:35:03Z","html_url":"https://github.com/pelias/api/pull/376#discussion_r46575322","pull_request_url":"https://api.github.com/repos/pelias/api/pulls/376","_links":{"self":{"href":"https://api.github.com/repos/pelias/api/pulls/comments/46575322"},"html":{"href":"https://github.com/pelias/api/pull/376#discussion_r46575322"},"pull_request":{"href":"https://api.github.com/repos/pelias/api/pulls/376"}}},"pull_request":{"url":"https://api.github.com/repos/pelias/api/pulls/376","id":52350915,"html_url":"https://github.com/pelias/api/pull/376","diff_url":"https://github.com/pelias/api/pull/376.diff","patch_url":"https://github.com/pelias/api/pull/376.patch","issue_url":"https://api.github.com/repos/pelias/api/issues/376","number":376,"state":"open","locked":false,"title":"Add dedupe middleware","user":{"login":"dianashk","id":5446511,"avatar_url":"https://avatars.githubusercontent.com/u/5446511?v=3","gravatar_id":"","url":"https://api.github.com/users/dianashk","html_url":"https://github.com/dianashk","followers_url":"https://api.github.com/users/dianashk/followers","following_url":"https://api.github.com/users/dianashk/following{/other_user}","gists_url":"https://api.github.com/users/dianashk/gists{/gist_id}","starred_url":"https://api.github.com/users/dianashk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dianashk/subscriptions","organizations_url":"https://api.github.com/users/dianashk/orgs","repos_url":"https://api.github.com/users/dianashk/repos","events_url":"https://api.github.com/users/dianashk/events{/privacy}","received_events_url":"https://api.github.com/users/dianashk/received_events","type":"User","site_admin":false},"body":"- [x] Pad the result size to allow for duplicates to be removed while still returning the specified count.\r\n- [x] Dedupe middleware removes __exact__ dupes and truncates the results\r\nto the specified size.\r\n\r\nFixes pelias/api#339","created_at":"2015-12-02T03:56:06Z","updated_at":"2015-12-03T16:35:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37632191bc96ed801da80869ad06823d1b850ed3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pelias/api/pulls/376/commits","review_comments_url":"https://api.github.com/repos/pelias/api/pulls/376/comments","review_comment_url":"https://api.github.com/repos/pelias/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pelias/api/issues/376/comments","statuses_url":"https://api.github.com/repos/pelias/api/statuses/42d940f8c85d491d48d7aa393c2c60f0d322786d","head":{"label":"pelias:dedupe-post-es","ref":"dedupe-post-es","sha":"42d940f8c85d491d48d7aa393c2c60f0d322786d","user":{"login":"pelias","id":8240367,"avatar_url":"https://avatars.githubusercontent.com/u/8240367?v=3","gravatar_id":"","url":"https://api.github.com/users/pelias","html_url":"https://github.com/pelias","followers_url":"https://api.github.com/users/pelias/followers","following_url":"https://api.github.com/users/pelias/following{/other_user}","gists_url":"https://api.github.com/users/pelias/gists{/gist_id}","starred_url":"https://api.github.com/users/pelias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelias/subscriptions","organizations_url":"https://api.github.com/users/pelias/orgs","repos_url":"https://api.github.com/users/pelias/repos","events_url":"https://api.github.com/users/pelias/events{/privacy}","received_events_url":"https://api.github.com/users/pelias/received_events","type":"Organization","site_admin":false},"repo":{"id":23627382,"name":"api","full_name":"pelias/api","owner":{"login":"pelias","id":8240367,"avatar_url":"https://avatars.githubusercontent.com/u/8240367?v=3","gravatar_id":"","url":"https://api.github.com/users/pelias","html_url":"https://github.com/pelias","followers_url":"https://api.github.com/users/pelias/followers","following_url":"https://api.github.com/users/pelias/following{/other_user}","gists_url":"https://api.github.com/users/pelias/gists{/gist_id}","starred_url":"https://api.github.com/users/pelias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelias/subscriptions","organizations_url":"https://api.github.com/users/pelias/orgs","repos_url":"https://api.github.com/users/pelias/repos","events_url":"https://api.github.com/users/pelias/events{/privacy}","received_events_url":"https://api.github.com/users/pelias/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pelias/api","description":"HTTP API for Pelias Geocoder","fork":false,"url":"https://api.github.com/repos/pelias/api","forks_url":"https://api.github.com/repos/pelias/api/forks","keys_url":"https://api.github.com/repos/pelias/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pelias/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pelias/api/teams","hooks_url":"https://api.github.com/repos/pelias/api/hooks","issue_events_url":"https://api.github.com/repos/pelias/api/issues/events{/number}","events_url":"https://api.github.com/repos/pelias/api/events","assignees_url":"https://api.github.com/repos/pelias/api/assignees{/user}","branches_url":"https://api.github.com/repos/pelias/api/branches{/branch}","tags_url":"https://api.github.com/repos/pelias/api/tags","blobs_url":"https://api.github.com/repos/pelias/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pelias/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pelias/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/pelias/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pelias/api/statuses/{sha}","languages_url":"https://api.github.com/repos/pelias/api/languages","stargazers_url":"https://api.github.com/repos/pelias/api/stargazers","contributors_url":"https://api.github.com/repos/pelias/api/contributors","subscribers_url":"https://api.github.com/repos/pelias/api/subscribers","subscription_url":"https://api.github.com/repos/pelias/api/subscription","commits_url":"https://api.github.com/repos/pelias/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/pelias/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/pelias/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/pelias/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/pelias/api/contents/{+path}","compare_url":"https://api.github.com/repos/pelias/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pelias/api/merges","archive_url":"https://api.github.com/repos/pelias/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pelias/api/downloads","issues_url":"https://api.github.com/repos/pelias/api/issues{/number}","pulls_url":"https://api.github.com/repos/pelias/api/pulls{/number}","milestones_url":"https://api.github.com/repos/pelias/api/milestones{/number}","notifications_url":"https://api.github.com/repos/pelias/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pelias/api/labels{/name}","releases_url":"https://api.github.com/repos/pelias/api/releases{/id}","created_at":"2014-09-03T16:06:04Z","updated_at":"2015-11-29T16:28:46Z","pushed_at":"2015-12-02T21:48:06Z","git_url":"git://github.com/pelias/api.git","ssh_url":"git@github.com:pelias/api.git","clone_url":"https://github.com/pelias/api.git","svn_url":"https://github.com/pelias/api","homepage":"","size":950,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":61,"forks":10,"open_issues":61,"watchers":34,"default_branch":"master"}},"base":{"label":"pelias:master","ref":"master","sha":"36035131f06fbb2b4e5f078e656289b61f094db7","user":{"login":"pelias","id":8240367,"avatar_url":"https://avatars.githubusercontent.com/u/8240367?v=3","gravatar_id":"","url":"https://api.github.com/users/pelias","html_url":"https://github.com/pelias","followers_url":"https://api.github.com/users/pelias/followers","following_url":"https://api.github.com/users/pelias/following{/other_user}","gists_url":"https://api.github.com/users/pelias/gists{/gist_id}","starred_url":"https://api.github.com/users/pelias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelias/subscriptions","organizations_url":"https://api.github.com/users/pelias/orgs","repos_url":"https://api.github.com/users/pelias/repos","events_url":"https://api.github.com/users/pelias/events{/privacy}","received_events_url":"https://api.github.com/users/pelias/received_events","type":"Organization","site_admin":false},"repo":{"id":23627382,"name":"api","full_name":"pelias/api","owner":{"login":"pelias","id":8240367,"avatar_url":"https://avatars.githubusercontent.com/u/8240367?v=3","gravatar_id":"","url":"https://api.github.com/users/pelias","html_url":"https://github.com/pelias","followers_url":"https://api.github.com/users/pelias/followers","following_url":"https://api.github.com/users/pelias/following{/other_user}","gists_url":"https://api.github.com/users/pelias/gists{/gist_id}","starred_url":"https://api.github.com/users/pelias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pelias/subscriptions","organizations_url":"https://api.github.com/users/pelias/orgs","repos_url":"https://api.github.com/users/pelias/repos","events_url":"https://api.github.com/users/pelias/events{/privacy}","received_events_url":"https://api.github.com/users/pelias/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pelias/api","description":"HTTP API for Pelias Geocoder","fork":false,"url":"https://api.github.com/repos/pelias/api","forks_url":"https://api.github.com/repos/pelias/api/forks","keys_url":"https://api.github.com/repos/pelias/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pelias/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pelias/api/teams","hooks_url":"https://api.github.com/repos/pelias/api/hooks","issue_events_url":"https://api.github.com/repos/pelias/api/issues/events{/number}","events_url":"https://api.github.com/repos/pelias/api/events","assignees_url":"https://api.github.com/repos/pelias/api/assignees{/user}","branches_url":"https://api.github.com/repos/pelias/api/branches{/branch}","tags_url":"https://api.github.com/repos/pelias/api/tags","blobs_url":"https://api.github.com/repos/pelias/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pelias/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pelias/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/pelias/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pelias/api/statuses/{sha}","languages_url":"https://api.github.com/repos/pelias/api/languages","stargazers_url":"https://api.github.com/repos/pelias/api/stargazers","contributors_url":"https://api.github.com/repos/pelias/api/contributors","subscribers_url":"https://api.github.com/repos/pelias/api/subscribers","subscription_url":"https://api.github.com/repos/pelias/api/subscription","commits_url":"https://api.github.com/repos/pelias/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/pelias/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/pelias/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/pelias/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/pelias/api/contents/{+path}","compare_url":"https://api.github.com/repos/pelias/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pelias/api/merges","archive_url":"https://api.github.com/repos/pelias/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pelias/api/downloads","issues_url":"https://api.github.com/repos/pelias/api/issues{/number}","pulls_url":"https://api.github.com/repos/pelias/api/pulls{/number}","milestones_url":"https://api.github.com/repos/pelias/api/milestones{/number}","notifications_url":"https://api.github.com/repos/pelias/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pelias/api/labels{/name}","releases_url":"https://api.github.com/repos/pelias/api/releases{/id}","created_at":"2014-09-03T16:06:04Z","updated_at":"2015-11-29T16:28:46Z","pushed_at":"2015-12-02T21:48:06Z","git_url":"git://github.com/pelias/api.git","ssh_url":"git@github.com:pelias/api.git","clone_url":"https://github.com/pelias/api.git","svn_url":"https://github.com/pelias/api","homepage":"","size":950,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":61,"forks":10,"open_issues":61,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pelias/api/pulls/376"},"html":{"href":"https://github.com/pelias/api/pull/376"},"issue":{"href":"https://api.github.com/repos/pelias/api/issues/376"},"comments":{"href":"https://api.github.com/repos/pelias/api/issues/376/comments"},"review_comments":{"href":"https://api.github.com/repos/pelias/api/pulls/376/comments"},"review_comment":{"href":"https://api.github.com/repos/pelias/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pelias/api/pulls/376/commits"},"statuses":{"href":"https://api.github.com/repos/pelias/api/statuses/42d940f8c85d491d48d7aa393c2c60f0d322786d"}}}}