GitHub PullRequestReviewCommentEvent at 2014-09-11 15:42:42
Repository: elasticutils
Actor: willkg
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/elasticutils/pulls/comments/17428643","id":17428643,"diff_hunk":"@@ -1354,22 +1400,53 @@ def test_query_facet(self):\n \n     def test_invalid_field_type(self):\n         \"\"\"Invalid _type should raise InvalidFacetType.\"\"\"\n+        a= {'elasticutilsmappingtype': {'properties': {'pin': {'properties': {'location': {'type': 'geo_point'}}}}}}\n+        FacetTest.put_mapping(mapping=a)\n         FacetTest.index_data([\n-                {'id': 1, 'age': 30},\n-                {'id': 2, 'age': 40}\n+                {\"id\":1,\n+                \"pin\" : {\n+                    \"location\" : {\n+                        \"lat\" : 40.12,\n+                        \"lon\" : -71.34\n+                            }\n+                        }\n+                    }\n             ])\n         FacetTest.refresh()\n \n-        # Note: This uses a terms_stats facet. If we implement handling\n+        # Note: This uses a geo_distance facet. If we implement handling\n         # for that, then we need to pick another facet type to fail on\n         # or do the right thing and mock the test.\n-        # Note: Previously this used histogram and statistical facets,\n+        # Note: Previously this used histogram, statistical and terms_stats facets,\n         # but those were implemented.\n         with self.assertRaises(InvalidFacetType):\n             (self.get_s()\n-                 .facet_raw(created1={'terms_stats': {'key_field': 'age',\n-                                                      'value_field': 'age'}})\n+                 .facet_raw(created1={\n+                          \"geo_distance\": {\n+                            \"pin.location\": {\n+                              \"lat\": 40,\n+                              \"lon\": -70\n+                            },\n+                            \"ranges\": [\n+                              {\n+                                \"to\": 10\n+                              },\n+                              {\n+                                \"from\": 10,\n+                                \"to\": 20\n+                              },\n+                              {\n+                                \"from\": 20,\n+                                \"to\": 100\n+                              },\n+                              {\n+                                \"from\": 100\n+                              }\n+                            ]\n+                          }\n+                        })","path":"elasticutils/tests/test_query.py","position":107,"original_position":107,"commit_id":"232a541cb83a5f7e3cc742986dfe382e2f3703d0","original_commit_id":"232a541cb83a5f7e3cc742986dfe382e2f3703d0","user":{"login":"willkg","id":820826,"avatar_url":"https://avatars.githubusercontent.com/u/820826?v=2","gravatar_id":"cc327cef30f763a450644d4b5df895c7","url":"https://api.github.com/users/willkg","html_url":"https://github.com/willkg","followers_url":"https://api.github.com/users/willkg/followers","following_url":"https://api.github.com/users/willkg/following{/other_user}","gists_url":"https://api.github.com/users/willkg/gists{/gist_id}","starred_url":"https://api.github.com/users/willkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willkg/subscriptions","organizations_url":"https://api.github.com/users/willkg/orgs","repos_url":"https://api.github.com/users/willkg/repos","events_url":"https://api.github.com/users/willkg/events{/privacy}","received_events_url":"https://api.github.com/users/willkg/received_events","type":"User","site_admin":false},"body":"Pretty sure we added geo_distance, so we're going to need to make this something else. :p","created_at":"2014-09-11T15:42:42Z","updated_at":"2014-09-11T15:42:42Z","html_url":"https://github.com/mozilla/elasticutils/pull/254#discussion_r17428643","pull_request_url":"https://api.github.com/repos/mozilla/elasticutils/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/comments/17428643"},"html":{"href":"https://github.com/mozilla/elasticutils/pull/254#discussion_r17428643"},"pull_request":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/elasticutils/pulls/254","id":20211277,"html_url":"https://github.com/mozilla/elasticutils/pull/254","diff_url":"https://github.com/mozilla/elasticutils/pull/254.diff","patch_url":"https://github.com/mozilla/elasticutils/pull/254.patch","issue_url":"https://api.github.com/repos/mozilla/elasticutils/issues/254","number":254,"state":"open","locked":false,"title":"terms_stats facet type support","user":{"login":"eire1130","id":1371080,"avatar_url":"https://avatars.githubusercontent.com/u/1371080?v=2","gravatar_id":"e4d46a8d204b274a6e7ea6ea3598ba94","url":"https://api.github.com/users/eire1130","html_url":"https://github.com/eire1130","followers_url":"https://api.github.com/users/eire1130/followers","following_url":"https://api.github.com/users/eire1130/following{/other_user}","gists_url":"https://api.github.com/users/eire1130/gists{/gist_id}","starred_url":"https://api.github.com/users/eire1130/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eire1130/subscriptions","organizations_url":"https://api.github.com/users/eire1130/orgs","repos_url":"https://api.github.com/users/eire1130/repos","events_url":"https://api.github.com/users/eire1130/events{/privacy}","received_events_url":"https://api.github.com/users/eire1130/received_events","type":"User","site_admin":false},"body":"adds terms stats support.\r\n\r\nI think it's failing because travis pulling down the wrong version of ES and my code is still based on .9. I can update it if need be. Tests are passing locally for me though.\r\n\r\nMuch <3 if this can be into .10.","created_at":"2014-08-23T16:23:00Z","updated_at":"2014-09-11T15:42:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a07353bbef943c903476cd07fba4028c1bf9aa79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/elasticutils/pulls/254/commits","review_comments_url":"https://api.github.com/repos/mozilla/elasticutils/pulls/254/comments","review_comment_url":"https://api.github.com/repos/mozilla/elasticutils/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/elasticutils/issues/254/comments","statuses_url":"https://api.github.com/repos/mozilla/elasticutils/statuses/232a541cb83a5f7e3cc742986dfe382e2f3703d0","head":{"label":"eire1130:terms-stats-facets","ref":"terms-stats-facets","sha":"232a541cb83a5f7e3cc742986dfe382e2f3703d0","user":{"login":"eire1130","id":1371080,"avatar_url":"https://avatars.githubusercontent.com/u/1371080?v=2","gravatar_id":"e4d46a8d204b274a6e7ea6ea3598ba94","url":"https://api.github.com/users/eire1130","html_url":"https://github.com/eire1130","followers_url":"https://api.github.com/users/eire1130/followers","following_url":"https://api.github.com/users/eire1130/following{/other_user}","gists_url":"https://api.github.com/users/eire1130/gists{/gist_id}","starred_url":"https://api.github.com/users/eire1130/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eire1130/subscriptions","organizations_url":"https://api.github.com/users/eire1130/orgs","repos_url":"https://api.github.com/users/eire1130/repos","events_url":"https://api.github.com/users/eire1130/events{/privacy}","received_events_url":"https://api.github.com/users/eire1130/received_events","type":"User","site_admin":false},"repo":{"id":9983673,"name":"elasticutils","full_name":"eire1130/elasticutils","owner":{"login":"eire1130","id":1371080,"avatar_url":"https://avatars.githubusercontent.com/u/1371080?v=2","gravatar_id":"e4d46a8d204b274a6e7ea6ea3598ba94","url":"https://api.github.com/users/eire1130","html_url":"https://github.com/eire1130","followers_url":"https://api.github.com/users/eire1130/followers","following_url":"https://api.github.com/users/eire1130/following{/other_user}","gists_url":"https://api.github.com/users/eire1130/gists{/gist_id}","starred_url":"https://api.github.com/users/eire1130/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eire1130/subscriptions","organizations_url":"https://api.github.com/users/eire1130/orgs","repos_url":"https://api.github.com/users/eire1130/repos","events_url":"https://api.github.com/users/eire1130/events{/privacy}","received_events_url":"https://api.github.com/users/eire1130/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eire1130/elasticutils","description":"A friendly chainable ElasticSearch interface for python ","fork":true,"url":"https://api.github.com/repos/eire1130/elasticutils","forks_url":"https://api.github.com/repos/eire1130/elasticutils/forks","keys_url":"https://api.github.com/repos/eire1130/elasticutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eire1130/elasticutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eire1130/elasticutils/teams","hooks_url":"https://api.github.com/repos/eire1130/elasticutils/hooks","issue_events_url":"https://api.github.com/repos/eire1130/elasticutils/issues/events{/number}","events_url":"https://api.github.com/repos/eire1130/elasticutils/events","assignees_url":"https://api.github.com/repos/eire1130/elasticutils/assignees{/user}","branches_url":"https://api.github.com/repos/eire1130/elasticutils/branches{/branch}","tags_url":"https://api.github.com/repos/eire1130/elasticutils/tags","blobs_url":"https://api.github.com/repos/eire1130/elasticutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eire1130/elasticutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eire1130/elasticutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/eire1130/elasticutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eire1130/elasticutils/statuses/{sha}","languages_url":"https://api.github.com/repos/eire1130/elasticutils/languages","stargazers_url":"https://api.github.com/repos/eire1130/elasticutils/stargazers","contributors_url":"https://api.github.com/repos/eire1130/elasticutils/contributors","subscribers_url":"https://api.github.com/repos/eire1130/elasticutils/subscribers","subscription_url":"https://api.github.com/repos/eire1130/elasticutils/subscription","commits_url":"https://api.github.com/repos/eire1130/elasticutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/eire1130/elasticutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/eire1130/elasticutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/eire1130/elasticutils/issues/comments/{number}","contents_url":"https://api.github.com/repos/eire1130/elasticutils/contents/{+path}","compare_url":"https://api.github.com/repos/eire1130/elasticutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eire1130/elasticutils/merges","archive_url":"https://api.github.com/repos/eire1130/elasticutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eire1130/elasticutils/downloads","issues_url":"https://api.github.com/repos/eire1130/elasticutils/issues{/number}","pulls_url":"https://api.github.com/repos/eire1130/elasticutils/pulls{/number}","milestones_url":"https://api.github.com/repos/eire1130/elasticutils/milestones{/number}","notifications_url":"https://api.github.com/repos/eire1130/elasticutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eire1130/elasticutils/labels{/name}","releases_url":"https://api.github.com/repos/eire1130/elasticutils/releases{/id}","created_at":"2013-05-10T14:56:14Z","updated_at":"2014-08-23T16:05:29Z","pushed_at":"2014-08-23T16:18:00Z","git_url":"git://github.com/eire1130/elasticutils.git","ssh_url":"git@github.com:eire1130/elasticutils.git","clone_url":"https://github.com/eire1130/elasticutils.git","svn_url":"https://github.com/eire1130/elasticutils","homepage":"http://elasticutils.rtfd.org","size":1424,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"2b301e1258a8a3b87d3e2b0649f4c231ccb0137f","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":1757973,"name":"elasticutils","full_name":"mozilla/elasticutils","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=2","gravatar_id":"9ba739c8f3288e256b13553e4d257b5e","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/elasticutils","description":"A friendly chainable ElasticSearch interface for python ","fork":false,"url":"https://api.github.com/repos/mozilla/elasticutils","forks_url":"https://api.github.com/repos/mozilla/elasticutils/forks","keys_url":"https://api.github.com/repos/mozilla/elasticutils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/elasticutils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/elasticutils/teams","hooks_url":"https://api.github.com/repos/mozilla/elasticutils/hooks","issue_events_url":"https://api.github.com/repos/mozilla/elasticutils/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/elasticutils/events","assignees_url":"https://api.github.com/repos/mozilla/elasticutils/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/elasticutils/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/elasticutils/tags","blobs_url":"https://api.github.com/repos/mozilla/elasticutils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/elasticutils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/elasticutils/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/elasticutils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/elasticutils/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/elasticutils/languages","stargazers_url":"https://api.github.com/repos/mozilla/elasticutils/stargazers","contributors_url":"https://api.github.com/repos/mozilla/elasticutils/contributors","subscribers_url":"https://api.github.com/repos/mozilla/elasticutils/subscribers","subscription_url":"https://api.github.com/repos/mozilla/elasticutils/subscription","commits_url":"https://api.github.com/repos/mozilla/elasticutils/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/elasticutils/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/elasticutils/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/elasticutils/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/elasticutils/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/elasticutils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/elasticutils/merges","archive_url":"https://api.github.com/repos/mozilla/elasticutils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/elasticutils/downloads","issues_url":"https://api.github.com/repos/mozilla/elasticutils/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/elasticutils/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/elasticutils/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/elasticutils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/elasticutils/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/elasticutils/releases{/id}","created_at":"2011-05-16T22:15:32Z","updated_at":"2014-09-10T10:35:35Z","pushed_at":"2014-09-11T15:18:10Z","git_url":"git://github.com/mozilla/elasticutils.git","ssh_url":"git@github.com:mozilla/elasticutils.git","clone_url":"https://github.com/mozilla/elasticutils.git","svn_url":"https://github.com/mozilla/elasticutils","homepage":"http://elasticutils.rtfd.org","size":3192,"stargazers_count":208,"watchers_count":208,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":70,"mirror_url":null,"open_issues_count":35,"forks":70,"open_issues":35,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/254"},"html":{"href":"https://github.com/mozilla/elasticutils/pull/254"},"issue":{"href":"https://api.github.com/repos/mozilla/elasticutils/issues/254"},"comments":{"href":"https://api.github.com/repos/mozilla/elasticutils/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/elasticutils/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/elasticutils/statuses/232a541cb83a5f7e3cc742986dfe382e2f3703d0"}}}}