{"action":"created","comment":{"url":"https://api.github.com/repos/socrata/cetera/pulls/comments/46858157","id":46858157,"diff_hunk":"@@ -51,31 +51,35 @@ object SearchServer extends App {\n                               config.http.liveness.missable,\n                               executor) with Startable)\n \n-    elasticSearch <- managed(\n-      ElasticSearchClient(config.elasticSearch.elasticSearchServer,\n-                          config.elasticSearch.elasticSearchPort,\n-                          config.elasticSearch.elasticSearchClusterName,\n-                          config.elasticSearch.typeBoosts.getOrElse(Map.empty),\n-                          config.elasticSearch.titleBoost,\n-                          config.elasticSearch.minShouldMatch,\n-                          config.elasticSearch.functionScoreScripts.flatMap(fnName =>\n-                            ScriptScoreFunction.getScriptFunction(fnName)).toSet))\n-    domainSearch <- managed(new DomainSearchClient(elasticSearch.client))\n-  } {\n+    esClient <- managed(\n+      new ElasticSearchClient(config.elasticSearch.elasticSearchServer,\n+                              config.elasticSearch.elasticSearchPort,\n+                              config.elasticSearch.elasticSearchClusterName))\n+    } {\n+\n+    val documentClient = DocumentClient(\n+      esClient,\n+      config.elasticSearch.typeBoosts.getOrElse(Map.empty),\n+      config.elasticSearch.titleBoost,\n+      config.elasticSearch.minShouldMatch,\n+      config.elasticSearch.functionScoreScripts.flatMap(fnName =>\n+      ScriptScoreFunction.getScriptFunction(fnName)).toSet)","path":"src/main/scala/com/socrata/cetera/SearchServer.scala","position":36,"original_position":36,"commit_id":"0046d513f7f1482f14581986a0886b674153194a","original_commit_id":"0046d513f7f1482f14581986a0886b674153194a","user":{"login":"aynleslie","id":6155686,"avatar_url":"https://avatars.githubusercontent.com/u/6155686?v=3","gravatar_id":"","url":"https://api.github.com/users/aynleslie","html_url":"https://github.com/aynleslie","followers_url":"https://api.github.com/users/aynleslie/followers","following_url":"https://api.github.com/users/aynleslie/following{/other_user}","gists_url":"https://api.github.com/users/aynleslie/gists{/gist_id}","starred_url":"https://api.github.com/users/aynleslie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aynleslie/subscriptions","organizations_url":"https://api.github.com/users/aynleslie/orgs","repos_url":"https://api.github.com/users/aynleslie/repos","events_url":"https://api.github.com/users/aynleslie/events{/privacy}","received_events_url":"https://api.github.com/users/aynleslie/received_events","type":"User","site_admin":false},"body":"confused what y'all want.  I thought I was following what was previously in the ElasticSearchClient file by starting arguments on the next line, tabbed over once, one-per-line with the `)` on it's own line.   I screwed up the `)` here, but I'll fix that.  What is voyer's complaint above?","created_at":"2015-12-07T18:40:19Z","updated_at":"2015-12-07T18:40:19Z","html_url":"https://github.com/socrata/cetera/pull/96#discussion_r46858157","pull_request_url":"https://api.github.com/repos/socrata/cetera/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/socrata/cetera/pulls/comments/46858157"},"html":{"href":"https://github.com/socrata/cetera/pull/96#discussion_r46858157"},"pull_request":{"href":"https://api.github.com/repos/socrata/cetera/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/socrata/cetera/pulls/96","id":52880277,"html_url":"https://github.com/socrata/cetera/pull/96","diff_url":"https://github.com/socrata/cetera/pull/96.diff","patch_url":"https://github.com/socrata/cetera/pull/96.patch","issue_url":"https://api.github.com/repos/socrata/cetera/issues/96","number":96,"state":"open","locked":false,"title":"Cetera elasticSearch clients","user":{"login":"aynleslie","id":6155686,"avatar_url":"https://avatars.githubusercontent.com/u/6155686?v=3","gravatar_id":"","url":"https://api.github.com/users/aynleslie","html_url":"https://github.com/aynleslie","followers_url":"https://api.github.com/users/aynleslie/followers","following_url":"https://api.github.com/users/aynleslie/following{/other_user}","gists_url":"https://api.github.com/users/aynleslie/gists{/gist_id}","starred_url":"https://api.github.com/users/aynleslie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aynleslie/subscriptions","organizations_url":"https://api.github.com/users/aynleslie/orgs","repos_url":"https://api.github.com/users/aynleslie/repos","events_url":"https://api.github.com/users/aynleslie/events{/privacy}","received_events_url":"https://api.github.com/users/aynleslie/received_events","type":"User","site_admin":false},"body":"#### What it do?\r\n\r\nI've split out the elasticsearchClient into a separate class that is responsible only for managing the transport client. This is now used by the DomainClient and the DocumentClient (which was formerly known as the ElasticSearchClient).\r\n\r\nI also added a test for the DomainClient, which was previously being indirectly testes in the `SearchServiceSpecWithTestData`.  I also closed test clients where they previously weren't being closed.\r\n\r\n#### How tested?\r\n\r\nThe usual `sbt test` suite, as well as running it and issuing several queries. \r\n\r\n\r\n#### Notes\r\nThis commit is really much smaller than it looks, thanks to github showing the name change to the ElasticSearchClient as a big positive and negative commit.","created_at":"2015-12-07T18:14:07Z","updated_at":"2015-12-07T18:40:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fcf27e3ddca6e3f63a8908ee27d876e1c446936","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/socrata/cetera/pulls/96/commits","review_comments_url":"https://api.github.com/repos/socrata/cetera/pulls/96/comments","review_comment_url":"https://api.github.com/repos/socrata/cetera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socrata/cetera/issues/96/comments","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/0046d513f7f1482f14581986a0886b674153194a","head":{"label":"socrata:clients","ref":"clients","sha":"0046d513f7f1482f14581986a0886b674153194a","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":29320951,"name":"cetera","full_name":"socrata/cetera","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/cetera","description":"Cetera -- the golden-throated search service. Basically a wrapper around elasticsearch to enable keyword search to return dataset metadata for use by the front end in displaying search results.","fork":false,"url":"https://api.github.com/repos/socrata/cetera","forks_url":"https://api.github.com/repos/socrata/cetera/forks","keys_url":"https://api.github.com/repos/socrata/cetera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/cetera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/cetera/teams","hooks_url":"https://api.github.com/repos/socrata/cetera/hooks","issue_events_url":"https://api.github.com/repos/socrata/cetera/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/cetera/events","assignees_url":"https://api.github.com/repos/socrata/cetera/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/cetera/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/cetera/tags","blobs_url":"https://api.github.com/repos/socrata/cetera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/cetera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/cetera/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/cetera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/cetera/languages","stargazers_url":"https://api.github.com/repos/socrata/cetera/stargazers","contributors_url":"https://api.github.com/repos/socrata/cetera/contributors","subscribers_url":"https://api.github.com/repos/socrata/cetera/subscribers","subscription_url":"https://api.github.com/repos/socrata/cetera/subscription","commits_url":"https://api.github.com/repos/socrata/cetera/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/cetera/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/cetera/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/cetera/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/cetera/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/cetera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/cetera/merges","archive_url":"https://api.github.com/repos/socrata/cetera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/cetera/downloads","issues_url":"https://api.github.com/repos/socrata/cetera/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/cetera/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/cetera/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/cetera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/cetera/labels{/name}","releases_url":"https://api.github.com/repos/socrata/cetera/releases{/id}","created_at":"2015-01-15T22:15:58Z","updated_at":"2015-11-29T07:40:07Z","pushed_at":"2015-12-07T18:32:06Z","git_url":"git://github.com/socrata/cetera.git","ssh_url":"git@github.com:socrata/cetera.git","clone_url":"https://github.com/socrata/cetera.git","svn_url":"https://github.com/socrata/cetera","homepage":"","size":529,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":6,"default_branch":"master"}},"base":{"label":"socrata:master","ref":"master","sha":"9b1854cbb4ee383d4d3bae20653764428d8425bb","user":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"repo":{"id":29320951,"name":"cetera","full_name":"socrata/cetera","owner":{"login":"socrata","id":57695,"avatar_url":"https://avatars.githubusercontent.com/u/57695?v=3","gravatar_id":"","url":"https://api.github.com/users/socrata","html_url":"https://github.com/socrata","followers_url":"https://api.github.com/users/socrata/followers","following_url":"https://api.github.com/users/socrata/following{/other_user}","gists_url":"https://api.github.com/users/socrata/gists{/gist_id}","starred_url":"https://api.github.com/users/socrata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socrata/subscriptions","organizations_url":"https://api.github.com/users/socrata/orgs","repos_url":"https://api.github.com/users/socrata/repos","events_url":"https://api.github.com/users/socrata/events{/privacy}","received_events_url":"https://api.github.com/users/socrata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socrata/cetera","description":"Cetera -- the golden-throated search service. Basically a wrapper around elasticsearch to enable keyword search to return dataset metadata for use by the front end in displaying search results.","fork":false,"url":"https://api.github.com/repos/socrata/cetera","forks_url":"https://api.github.com/repos/socrata/cetera/forks","keys_url":"https://api.github.com/repos/socrata/cetera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socrata/cetera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socrata/cetera/teams","hooks_url":"https://api.github.com/repos/socrata/cetera/hooks","issue_events_url":"https://api.github.com/repos/socrata/cetera/issues/events{/number}","events_url":"https://api.github.com/repos/socrata/cetera/events","assignees_url":"https://api.github.com/repos/socrata/cetera/assignees{/user}","branches_url":"https://api.github.com/repos/socrata/cetera/branches{/branch}","tags_url":"https://api.github.com/repos/socrata/cetera/tags","blobs_url":"https://api.github.com/repos/socrata/cetera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socrata/cetera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socrata/cetera/git/refs{/sha}","trees_url":"https://api.github.com/repos/socrata/cetera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socrata/cetera/statuses/{sha}","languages_url":"https://api.github.com/repos/socrata/cetera/languages","stargazers_url":"https://api.github.com/repos/socrata/cetera/stargazers","contributors_url":"https://api.github.com/repos/socrata/cetera/contributors","subscribers_url":"https://api.github.com/repos/socrata/cetera/subscribers","subscription_url":"https://api.github.com/repos/socrata/cetera/subscription","commits_url":"https://api.github.com/repos/socrata/cetera/commits{/sha}","git_commits_url":"https://api.github.com/repos/socrata/cetera/git/commits{/sha}","comments_url":"https://api.github.com/repos/socrata/cetera/comments{/number}","issue_comment_url":"https://api.github.com/repos/socrata/cetera/issues/comments{/number}","contents_url":"https://api.github.com/repos/socrata/cetera/contents/{+path}","compare_url":"https://api.github.com/repos/socrata/cetera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socrata/cetera/merges","archive_url":"https://api.github.com/repos/socrata/cetera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socrata/cetera/downloads","issues_url":"https://api.github.com/repos/socrata/cetera/issues{/number}","pulls_url":"https://api.github.com/repos/socrata/cetera/pulls{/number}","milestones_url":"https://api.github.com/repos/socrata/cetera/milestones{/number}","notifications_url":"https://api.github.com/repos/socrata/cetera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socrata/cetera/labels{/name}","releases_url":"https://api.github.com/repos/socrata/cetera/releases{/id}","created_at":"2015-01-15T22:15:58Z","updated_at":"2015-11-29T07:40:07Z","pushed_at":"2015-12-07T18:32:06Z","git_url":"git://github.com/socrata/cetera.git","ssh_url":"git@github.com:socrata/cetera.git","clone_url":"https://github.com/socrata/cetera.git","svn_url":"https://github.com/socrata/cetera","homepage":"","size":529,"stargazers_count":6,"watchers_count":6,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socrata/cetera/pulls/96"},"html":{"href":"https://github.com/socrata/cetera/pull/96"},"issue":{"href":"https://api.github.com/repos/socrata/cetera/issues/96"},"comments":{"href":"https://api.github.com/repos/socrata/cetera/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/socrata/cetera/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/socrata/cetera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socrata/cetera/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/socrata/cetera/statuses/0046d513f7f1482f14581986a0886b674153194a"}}}}