{"action":"created","comment":{"url":"https://api.github.com/repos/CTTV/rest_api/pulls/comments/93345919","pull_request_review_id":13663985,"id":93345919,"diff_hunk":"@@ -493,110 +493,63 @@ def get_label_for_eco_code(self, code):\n             return hit['_source']\n \n     def get_evidence(self,\n-                     targets=[],\n-                     diseases=[],\n-                     evidence_types=[],\n-                     datasources=[],\n-                     datatypes=[],\n-                     gene_operator='OR',\n-                     object_operator='OR',\n-                     evidence_type_operator='OR',\n                      **kwargs):\n         params = SearchParams(**kwargs)\n         if params.datastructure == SourceDataStructureOptions.DEFAULT:\n             params.datastructure = SourceDataStructureOptions.FULL\n-        '''convert boolean to elasticsearch syntax'''\n-        gene_operator = getattr(BooleanFilterOperator, gene_operator.upper())\n-        object_operator = getattr(BooleanFilterOperator, object_operator.upper())\n-        evidence_type_operator = getattr(BooleanFilterOperator, evidence_type_operator.upper())\n-        '''create multiple condition boolean query'''\n-        conditions = []\n-        if targets:\n-            conditions.append(self.get_complex_target_filter(targets, gene_operator))\n-        if diseases:\n-            conditions.append(self.get_complex_disease_filter(diseases, object_operator, is_direct=False))#temporary until params.is_direct is supported again\n-        if evidence_types:\n-            conditions.append(self._get_complex_evidence_type_filter(evidence_types, evidence_type_operator))\n-        if datasources or datatypes:\n-            requested_datasources = []\n-            if datasources:\n-                requested_datasources.extend(datasources)\n-            if datatypes:\n-                for datatype in datatypes:\n-                    requested_datasources.extend(self.datatypes.get_datasources(datatype))\n-            requested_datasources = list(set(requested_datasources))\n-            conditions.append(\n-                self._get_complex_datasource_filter_evidencestring(requested_datasources, BooleanFilterOperator.OR))\n-        if params.pathway:\n-            pathway_filter = self._get_complex_pathway_filter(params.pathway)\n-            if pathway_filter:\n-                conditions.append(pathway_filter)\n-        if params.uniprot_kw:","path":"app/common/elasticsearchclient.py","position":208,"original_position":208,"commit_id":"477ee79da3e4623831ee39a21802d5a5df2acfba","original_commit_id":"477ee79da3e4623831ee39a21802d5a5df2acfba","user":{"login":"apierleoni","id":148221,"avatar_url":"https://avatars.githubusercontent.com/u/148221?v=3","gravatar_id":"","url":"https://api.github.com/users/apierleoni","html_url":"https://github.com/apierleoni","followers_url":"https://api.github.com/users/apierleoni/followers","following_url":"https://api.github.com/users/apierleoni/following{/other_user}","gists_url":"https://api.github.com/users/apierleoni/gists{/gist_id}","starred_url":"https://api.github.com/users/apierleoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apierleoni/subscriptions","organizations_url":"https://api.github.com/users/apierleoni/orgs","repos_url":"https://api.github.com/users/apierleoni/repos","events_url":"https://api.github.com/users/apierleoni/events{/privacy}","received_events_url":"https://api.github.com/users/apierleoni/received_events","type":"User","site_admin":false},"body":"test needed for this as well","created_at":"2016-12-20T23:15:10Z","updated_at":"2016-12-20T23:15:10Z","html_url":"https://github.com/CTTV/rest_api/pull/23#discussion_r93345919","pull_request_url":"https://api.github.com/repos/CTTV/rest_api/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/comments/93345919"},"html":{"href":"https://github.com/CTTV/rest_api/pull/23#discussion_r93345919"},"pull_request":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/CTTV/rest_api/pulls/23","id":97767371,"html_url":"https://github.com/CTTV/rest_api/pull/23","diff_url":"https://github.com/CTTV/rest_api/pull/23.diff","patch_url":"https://github.com/CTTV/rest_api/pull/23.patch","issue_url":"https://api.github.com/repos/CTTV/rest_api/issues/23","number":23,"state":"open","locked":false,"title":"Evidence facets ","user":{"login":"PriyankaW","id":20305377,"avatar_url":"https://avatars.githubusercontent.com/u/20305377?v=3","gravatar_id":"","url":"https://api.github.com/users/PriyankaW","html_url":"https://github.com/PriyankaW","followers_url":"https://api.github.com/users/PriyankaW/followers","following_url":"https://api.github.com/users/PriyankaW/following{/other_user}","gists_url":"https://api.github.com/users/PriyankaW/gists{/gist_id}","starred_url":"https://api.github.com/users/PriyankaW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriyankaW/subscriptions","organizations_url":"https://api.github.com/users/PriyankaW/orgs","repos_url":"https://api.github.com/users/PriyankaW/repos","events_url":"https://api.github.com/users/PriyankaW/events{/privacy}","received_events_url":"https://api.github.com/users/PriyankaW/received_events","type":"User","site_admin":false},"body":"@apierleoni @elipapa \r\nEvidence facets for disease,pub_date,journal(viz. medline-abbr), mesh-terms\r\nFixed journal mapping in data-pipeline to get journal facet working as expected. \r\nSome mesh-terms are comma-separated - this needs to be handled.","created_at":"2016-12-13T15:01:27Z","updated_at":"2016-12-20T23:26:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd62e185e4ff4682b25af6483b01a32a915f0b7f","assignee":{"login":"PriyankaW","id":20305377,"avatar_url":"https://avatars.githubusercontent.com/u/20305377?v=3","gravatar_id":"","url":"https://api.github.com/users/PriyankaW","html_url":"https://github.com/PriyankaW","followers_url":"https://api.github.com/users/PriyankaW/followers","following_url":"https://api.github.com/users/PriyankaW/following{/other_user}","gists_url":"https://api.github.com/users/PriyankaW/gists{/gist_id}","starred_url":"https://api.github.com/users/PriyankaW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriyankaW/subscriptions","organizations_url":"https://api.github.com/users/PriyankaW/orgs","repos_url":"https://api.github.com/users/PriyankaW/repos","events_url":"https://api.github.com/users/PriyankaW/events{/privacy}","received_events_url":"https://api.github.com/users/PriyankaW/received_events","type":"User","site_admin":false},"assignees":[{"login":"PriyankaW","id":20305377,"avatar_url":"https://avatars.githubusercontent.com/u/20305377?v=3","gravatar_id":"","url":"https://api.github.com/users/PriyankaW","html_url":"https://github.com/PriyankaW","followers_url":"https://api.github.com/users/PriyankaW/followers","following_url":"https://api.github.com/users/PriyankaW/following{/other_user}","gists_url":"https://api.github.com/users/PriyankaW/gists{/gist_id}","starred_url":"https://api.github.com/users/PriyankaW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriyankaW/subscriptions","organizations_url":"https://api.github.com/users/PriyankaW/orgs","repos_url":"https://api.github.com/users/PriyankaW/repos","events_url":"https://api.github.com/users/PriyankaW/events{/privacy}","received_events_url":"https://api.github.com/users/PriyankaW/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/CTTV/rest_api/pulls/23/commits","review_comments_url":"https://api.github.com/repos/CTTV/rest_api/pulls/23/comments","review_comment_url":"https://api.github.com/repos/CTTV/rest_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CTTV/rest_api/issues/23/comments","statuses_url":"https://api.github.com/repos/CTTV/rest_api/statuses/477ee79da3e4623831ee39a21802d5a5df2acfba","head":{"label":"CTTV:evidence-facets-1","ref":"evidence-facets-1","sha":"477ee79da3e4623831ee39a21802d5a5df2acfba","user":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"repo":{"id":49883675,"name":"rest_api","full_name":"CTTV/rest_api","owner":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTTV/rest_api","description":"Flask-based Rest API for OpenTargets CoreDB Data","fork":false,"url":"https://api.github.com/repos/CTTV/rest_api","forks_url":"https://api.github.com/repos/CTTV/rest_api/forks","keys_url":"https://api.github.com/repos/CTTV/rest_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTTV/rest_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTTV/rest_api/teams","hooks_url":"https://api.github.com/repos/CTTV/rest_api/hooks","issue_events_url":"https://api.github.com/repos/CTTV/rest_api/issues/events{/number}","events_url":"https://api.github.com/repos/CTTV/rest_api/events","assignees_url":"https://api.github.com/repos/CTTV/rest_api/assignees{/user}","branches_url":"https://api.github.com/repos/CTTV/rest_api/branches{/branch}","tags_url":"https://api.github.com/repos/CTTV/rest_api/tags","blobs_url":"https://api.github.com/repos/CTTV/rest_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTTV/rest_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTTV/rest_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTTV/rest_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTTV/rest_api/statuses/{sha}","languages_url":"https://api.github.com/repos/CTTV/rest_api/languages","stargazers_url":"https://api.github.com/repos/CTTV/rest_api/stargazers","contributors_url":"https://api.github.com/repos/CTTV/rest_api/contributors","subscribers_url":"https://api.github.com/repos/CTTV/rest_api/subscribers","subscription_url":"https://api.github.com/repos/CTTV/rest_api/subscription","commits_url":"https://api.github.com/repos/CTTV/rest_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTTV/rest_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTTV/rest_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTTV/rest_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTTV/rest_api/contents/{+path}","compare_url":"https://api.github.com/repos/CTTV/rest_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTTV/rest_api/merges","archive_url":"https://api.github.com/repos/CTTV/rest_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTTV/rest_api/downloads","issues_url":"https://api.github.com/repos/CTTV/rest_api/issues{/number}","pulls_url":"https://api.github.com/repos/CTTV/rest_api/pulls{/number}","milestones_url":"https://api.github.com/repos/CTTV/rest_api/milestones{/number}","notifications_url":"https://api.github.com/repos/CTTV/rest_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTTV/rest_api/labels{/name}","releases_url":"https://api.github.com/repos/CTTV/rest_api/releases{/id}","deployments_url":"https://api.github.com/repos/CTTV/rest_api/deployments","created_at":"2016-01-18T14:54:15Z","updated_at":"2016-10-27T06:39:16Z","pushed_at":"2016-12-20T10:08:14Z","git_url":"git://github.com/CTTV/rest_api.git","ssh_url":"git@github.com:CTTV/rest_api.git","clone_url":"https://github.com/CTTV/rest_api.git","svn_url":"https://github.com/CTTV/rest_api","homepage":"https://www.targetvalidation.org/documentation/api","size":665,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"CTTV:master","ref":"master","sha":"21302db5c7014c0e877b5185b67a806b1731b121","user":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"repo":{"id":49883675,"name":"rest_api","full_name":"CTTV/rest_api","owner":{"login":"CTTV","id":8728108,"avatar_url":"https://avatars.githubusercontent.com/u/8728108?v=3","gravatar_id":"","url":"https://api.github.com/users/CTTV","html_url":"https://github.com/CTTV","followers_url":"https://api.github.com/users/CTTV/followers","following_url":"https://api.github.com/users/CTTV/following{/other_user}","gists_url":"https://api.github.com/users/CTTV/gists{/gist_id}","starred_url":"https://api.github.com/users/CTTV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTTV/subscriptions","organizations_url":"https://api.github.com/users/CTTV/orgs","repos_url":"https://api.github.com/users/CTTV/repos","events_url":"https://api.github.com/users/CTTV/events{/privacy}","received_events_url":"https://api.github.com/users/CTTV/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTTV/rest_api","description":"Flask-based Rest API for OpenTargets CoreDB Data","fork":false,"url":"https://api.github.com/repos/CTTV/rest_api","forks_url":"https://api.github.com/repos/CTTV/rest_api/forks","keys_url":"https://api.github.com/repos/CTTV/rest_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTTV/rest_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTTV/rest_api/teams","hooks_url":"https://api.github.com/repos/CTTV/rest_api/hooks","issue_events_url":"https://api.github.com/repos/CTTV/rest_api/issues/events{/number}","events_url":"https://api.github.com/repos/CTTV/rest_api/events","assignees_url":"https://api.github.com/repos/CTTV/rest_api/assignees{/user}","branches_url":"https://api.github.com/repos/CTTV/rest_api/branches{/branch}","tags_url":"https://api.github.com/repos/CTTV/rest_api/tags","blobs_url":"https://api.github.com/repos/CTTV/rest_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTTV/rest_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTTV/rest_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTTV/rest_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTTV/rest_api/statuses/{sha}","languages_url":"https://api.github.com/repos/CTTV/rest_api/languages","stargazers_url":"https://api.github.com/repos/CTTV/rest_api/stargazers","contributors_url":"https://api.github.com/repos/CTTV/rest_api/contributors","subscribers_url":"https://api.github.com/repos/CTTV/rest_api/subscribers","subscription_url":"https://api.github.com/repos/CTTV/rest_api/subscription","commits_url":"https://api.github.com/repos/CTTV/rest_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTTV/rest_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTTV/rest_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTTV/rest_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTTV/rest_api/contents/{+path}","compare_url":"https://api.github.com/repos/CTTV/rest_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTTV/rest_api/merges","archive_url":"https://api.github.com/repos/CTTV/rest_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTTV/rest_api/downloads","issues_url":"https://api.github.com/repos/CTTV/rest_api/issues{/number}","pulls_url":"https://api.github.com/repos/CTTV/rest_api/pulls{/number}","milestones_url":"https://api.github.com/repos/CTTV/rest_api/milestones{/number}","notifications_url":"https://api.github.com/repos/CTTV/rest_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTTV/rest_api/labels{/name}","releases_url":"https://api.github.com/repos/CTTV/rest_api/releases{/id}","deployments_url":"https://api.github.com/repos/CTTV/rest_api/deployments","created_at":"2016-01-18T14:54:15Z","updated_at":"2016-10-27T06:39:16Z","pushed_at":"2016-12-20T10:08:14Z","git_url":"git://github.com/CTTV/rest_api.git","ssh_url":"git@github.com:CTTV/rest_api.git","clone_url":"https://github.com/CTTV/rest_api.git","svn_url":"https://github.com/CTTV/rest_api","homepage":"https://www.targetvalidation.org/documentation/api","size":665,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/23"},"html":{"href":"https://github.com/CTTV/rest_api/pull/23"},"issue":{"href":"https://api.github.com/repos/CTTV/rest_api/issues/23"},"comments":{"href":"https://api.github.com/repos/CTTV/rest_api/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CTTV/rest_api/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/CTTV/rest_api/statuses/477ee79da3e4623831ee39a21802d5a5df2acfba"}}}}
{"actor":{"display_login":"apierleoni"}}