{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/comments/108012331","pull_request_review_id":29023016,"id":108012331,"diff_hunk":"@@ -241,6 +241,37 @@ protected void TestCanSearchWithLuceneSyntax()\n             Assert.Equal(expectedDoc, response.Results.First().Document);\n         }\n \n+        protected void TestCanSearchWithSynonyms()\n+        {\n+            SearchServiceClient searchClient = Data.GetSearchServiceClient();\n+\n+            string synonymMapName = \"names\";\n+            SynonymMap synonymMap = new SynonymMap(name: synonymMapName, format: SynonymMapFormat.Solr, synonyms: \"luxury,fancy\");\n+            searchClient.SynonymMaps.Create(synonymMap);\n+\n+            SearchIndexClient client = GetClientForQuery();\n+            Index index = searchClient.Indexes.Get(client.IndexName);\n+            index.Fields.First(f => f.Name == \"hotelName\").SynonymMaps = new String[1] { synonymMapName };\n+            searchClient.Indexes.CreateOrUpdate(index);\n+\n+            var searchParameters =\n+                new SearchParameters()\n+                {\n+                    QueryType = QueryType.Full,\n+                    SearchFields = new[] { \"hotelName\" },\n+                    Select = new[] { \"hotelName\", \"baseRate\" }\n+                };\n+\n+            DocumentSearchResult<Hotel> response =\n+                client.Documents.Search<Hotel>(@\"luxury\", searchParameters);","path":"src/Search/Search.Tests/Tests/SearchTests.cs","position":26,"original_position":26,"commit_id":"c5db16f149cf5b25bcb2f11cfcf3b3d24cb621cf","original_commit_id":"c5db16f149cf5b25bcb2f11cfcf3b3d24cb621cf","user":{"login":"brjohnstmsft","id":5523701,"avatar_url":"https://avatars1.githubusercontent.com/u/5523701?v=3","gravatar_id":"","url":"https://api.github.com/users/brjohnstmsft","html_url":"https://github.com/brjohnstmsft","followers_url":"https://api.github.com/users/brjohnstmsft/followers","following_url":"https://api.github.com/users/brjohnstmsft/following{/other_user}","gists_url":"https://api.github.com/users/brjohnstmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/brjohnstmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brjohnstmsft/subscriptions","organizations_url":"https://api.github.com/users/brjohnstmsft/orgs","repos_url":"https://api.github.com/users/brjohnstmsft/repos","events_url":"https://api.github.com/users/brjohnstmsft/events{/privacy}","received_events_url":"https://api.github.com/users/brjohnstmsft/received_events","type":"User","site_admin":false},"body":"nit: @ not needed","created_at":"2017-03-24T22:34:21Z","updated_at":"2017-03-24T22:42:38Z","html_url":"https://github.com/Azure/azure-sdk-for-net/pull/2916#discussion_r108012331","pull_request_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/comments/108012331"},"html":{"href":"https://github.com/Azure/azure-sdk-for-net/pull/2916#discussion_r108012331"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916","id":109995447,"html_url":"https://github.com/Azure/azure-sdk-for-net/pull/2916","diff_url":"https://github.com/Azure/azure-sdk-for-net/pull/2916.diff","patch_url":"https://github.com/Azure/azure-sdk-for-net/pull/2916.patch","issue_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/2916","number":2916,"state":"open","locked":false,"title":"Search SDK: Add coverage for the new synonyms feature in preview SDK for 2016-09-01-Preview","user":{"login":"mhko","id":5098082,"avatar_url":"https://avatars1.githubusercontent.com/u/5098082?v=3","gravatar_id":"","url":"https://api.github.com/users/mhko","html_url":"https://github.com/mhko","followers_url":"https://api.github.com/users/mhko/followers","following_url":"https://api.github.com/users/mhko/following{/other_user}","gists_url":"https://api.github.com/users/mhko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhko/subscriptions","organizations_url":"https://api.github.com/users/mhko/orgs","repos_url":"https://api.github.com/users/mhko/repos","events_url":"https://api.github.com/users/mhko/events{/privacy}","received_events_url":"https://api.github.com/users/mhko/received_events","type":"User","site_admin":false},"body":"First and last commits are generated* code. Please take a closer look at the 2nd and 3rd commits where I customized* CreateOrUpdate and Exists calls and added tests cases.\r\n\r\n* PR request for the swagger spec : https://github.com/Azure/azure-rest-api-specs-pr/pull/47\r\n\r\n** The customization is done for CreateOrUpdate() and Exists() calls in Synonyms API. The former is analogous to [this](https://github.com/Azure/azure-sdk-for-net/commit/17150524091d560fbb360db415b6cec5d15720ec#diff-502ae5bc6a272c5f5e3d7ae3b59fa3a9) Exists() call is just a wrapper around Get. \r\n\r\nFYI @brjohnstmsft @Yahnoosh @chaosrealm\r\n\r\n<!-- DO NOT DELETE THIS TEMPLATE -->\r\n\r\n## Description\r\n<!--\r\nPlease add an informative description that covers that changes made by the pull request.\r\n\r\nIf you are regenerating your SDK based off of a new swagger spec, please add the link to the corresponding swagger spec pull request that has been merged in the azure-rest-api-specs repository\r\n-->\r\n\r\n---\r\n\r\nThis checklist is used to make sure that common guidelines for a pull request are followed.\r\n\r\n- [x] **I have read the [contribution guidelines](https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/.github/CONTRIBUTING.md).**\r\n- [x] **The pull request does not introduce [breaking changes](https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/Documentation/breaking-changes.md).**\r\n\r\n### [General Guidelines](https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/.github/CONTRIBUTING.md#general-guidelines)\r\n- [x] Title of the pull request is clear and informative.\r\n- [x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/dev/documentation/cleaning-up-commits.md).\r\n\r\n### [Testing Guidelines](https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/.github/CONTRIBUTING.md#testing-guidelines)\r\n- [x] Pull request includes test coverage for the included changes.\r\n\r\n### [SDK Generation Guidelines](https://github.com/Azure/azure-sdk-for-net/blob/AutoRest/.github/CONTRIBUTING.md#sdk-generation-guidelines)\r\n- [x] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.\r\n- [x] The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as a link to the swagger spec, used to generate the code.\r\n- [x] The `project.json` and `AssemblyInfo.cs` files have been updated with the new version of the SDK.","created_at":"2017-03-09T20:10:11Z","updated_at":"2017-03-24T22:42:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06b73bc069f7c6ed86ac93ec37e19fc1add848e1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/2916/comments","statuses_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/statuses/c5db16f149cf5b25bcb2f11cfcf3b3d24cb621cf","head":{"label":"mhko:search-4x-preview","ref":"search-4x-preview","sha":"c5db16f149cf5b25bcb2f11cfcf3b3d24cb621cf","user":{"login":"mhko","id":5098082,"avatar_url":"https://avatars1.githubusercontent.com/u/5098082?v=3","gravatar_id":"","url":"https://api.github.com/users/mhko","html_url":"https://github.com/mhko","followers_url":"https://api.github.com/users/mhko/followers","following_url":"https://api.github.com/users/mhko/following{/other_user}","gists_url":"https://api.github.com/users/mhko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhko/subscriptions","organizations_url":"https://api.github.com/users/mhko/orgs","repos_url":"https://api.github.com/users/mhko/repos","events_url":"https://api.github.com/users/mhko/events{/privacy}","received_events_url":"https://api.github.com/users/mhko/received_events","type":"User","site_admin":false},"repo":{"id":84478096,"name":"azure-sdk-for-net","full_name":"mhko/azure-sdk-for-net","owner":{"login":"mhko","id":5098082,"avatar_url":"https://avatars1.githubusercontent.com/u/5098082?v=3","gravatar_id":"","url":"https://api.github.com/users/mhko","html_url":"https://github.com/mhko","followers_url":"https://api.github.com/users/mhko/followers","following_url":"https://api.github.com/users/mhko/following{/other_user}","gists_url":"https://api.github.com/users/mhko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhko/subscriptions","organizations_url":"https://api.github.com/users/mhko/orgs","repos_url":"https://api.github.com/users/mhko/repos","events_url":"https://api.github.com/users/mhko/events{/privacy}","received_events_url":"https://api.github.com/users/mhko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhko/azure-sdk-for-net","description":"Azure Tools for Visual Studio","fork":true,"url":"https://api.github.com/repos/mhko/azure-sdk-for-net","forks_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/forks","keys_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/teams","hooks_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/hooks","issue_events_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/issues/events{/number}","events_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/events","assignees_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/assignees{/user}","branches_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/branches{/branch}","tags_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/tags","blobs_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/statuses/{sha}","languages_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/languages","stargazers_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/stargazers","contributors_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/contributors","subscribers_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/subscribers","subscription_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/subscription","commits_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/contents/{+path}","compare_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/merges","archive_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/downloads","issues_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/issues{/number}","pulls_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/pulls{/number}","milestones_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/milestones{/number}","notifications_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/labels{/name}","releases_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/releases{/id}","deployments_url":"https://api.github.com/repos/mhko/azure-sdk-for-net/deployments","created_at":"2017-03-09T19:01:01Z","updated_at":"2017-03-09T19:01:23Z","pushed_at":"2017-03-09T19:28:09Z","git_url":"git://github.com/mhko/azure-sdk-for-net.git","ssh_url":"git@github.com:mhko/azure-sdk-for-net.git","clone_url":"https://github.com/mhko/azure-sdk-for-net.git","svn_url":"https://github.com/mhko/azure-sdk-for-net","homepage":"https://www.visualstudio.com/features/azure-tools-vs","size":144959,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"AutoRest"}},"base":{"label":"Azure:search-4x-preview","ref":"search-4x-preview","sha":"4d58449c21fc6c45e1c27be9ec8577ac974910f2","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":2928944,"name":"azure-sdk-for-net","full_name":"Azure/azure-sdk-for-net","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars3.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-sdk-for-net","description":"Azure Tools for Visual Studio","fork":false,"url":"https://api.github.com/repos/Azure/azure-sdk-for-net","forks_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/forks","keys_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/teams","hooks_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/events","assignees_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/tags","blobs_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/subscription","commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/merges","archive_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/downloads","issues_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-sdk-for-net/deployments","created_at":"2011-12-06T23:32:47Z","updated_at":"2017-03-24T17:13:41Z","pushed_at":"2017-03-24T22:28:36Z","git_url":"git://github.com/Azure/azure-sdk-for-net.git","ssh_url":"git@github.com:Azure/azure-sdk-for-net.git","clone_url":"https://github.com/Azure/azure-sdk-for-net.git","svn_url":"https://github.com/Azure/azure-sdk-for-net","homepage":"https://www.visualstudio.com/features/azure-tools-vs","size":147398,"stargazers_count":905,"watchers_count":905,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":759,"mirror_url":null,"open_issues_count":196,"forks":759,"open_issues":196,"watchers":905,"default_branch":"AutoRest"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916"},"html":{"href":"https://github.com/Azure/azure-sdk-for-net/pull/2916"},"issue":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/2916"},"comments":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/issues/2916/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/pulls/2916/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-net/statuses/c5db16f149cf5b25bcb2f11cfcf3b3d24cb621cf"}}}}
{"actor":{"display_login":"brjohnstmsft"}}