Skip to content

Commit 60c84f7

Browse files
committed
CMK and Synonym code corrections
1 parent 725722a commit 60c84f7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"SearchServiceName": "Put your search service name here",
3-
"SearchServiceAdminApiKey": "Put your primary or secondary API key here",
4-
"SearchServiceQueryApiKey": "Put your query API key here",
5-
"AzureKeyVaultKeyIdentifier": "Put your Azure Key vault key URL to be used for encryption here. Expected format: 'https://<key-vault-name>.vault.azure.net/keys/<key-name>/<key-version>'",
6-
"AzureActiveDirectoryApplicationId": "(optional): AAD Application ID that was granted the required access permissions to the Azure Key Vault that is to be used when encrypting your data at rest. The Application ID should not be confused with the Object ID for your AAD Application.",
7-
"AzureActiveDirectoryApplicationSecret": "(optional): The authentication key of the specified AAD application."
2+
"SearchServiceEndpoint": "Search service URL goes here",
3+
"SearchServiceAdminApiKey": "Search service Admin API key goes here",
4+
"SearchServiceQueryApiKey": "Search service query API key goes here",
5+
"AzureKeyVaultKeyIdentifier": "Azure Key Vault key URL goes here. Expected format: 'https://<key-vault-name>.vault.azure.net/keys/<key-name>/<key-version>'",
6+
"AzureActiveDirectoryApplicationId": "Azure AD Application ID (not to be confused with Object ID or Tenant ID). Make sure this application has an Access Policy set up in Azure Key Vault.",
7+
"AzureActiveDirectoryApplicationSecret": "Azure AD authentication key found in Certificates and Secrets."
88
}

DotNetHowToSynonyms/DotNetHowToSynonyms/Program.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ private static void EnableSynonymsInHotelsIndexSafely(SearchIndexClient indexCli
121121

122122
private static SearchIndex AddSynonymMapsToFields(SearchIndex index)
123123
{
124-
index.Fields.First(f => f.Name == "Category").SynonymMapNames.Add("desc-synonymmap");
125-
index.Fields.First(f => f.Name == "Tags").SynonymMapNames.Add("desc-synonymmap");
124+
index.Fields.First(f => f.Name == "category").SynonymMapNames.Add("desc-synonymmap");
125+
index.Fields.First(f => f.Name == "tags").SynonymMapNames.Add("desc-synonymmap");
126126
return index;
127127
}
128128

@@ -192,11 +192,11 @@ private static void RunQueriesWithNonExistentTermsInIndex(SearchClient searchCli
192192
Console.WriteLine("Search with terms nonexistent in the index:\n");
193193

194194
searchOptions = new SearchOptions();
195-
searchOptions.SearchFields.Add("Category");
196-
searchOptions.SearchFields.Add("Tags");
197-
searchOptions.Select.Add("HotelName");
198-
searchOptions.Select.Add("Category");
199-
searchOptions.Select.Add("Tags");
195+
searchOptions.SearchFields.Add("category");
196+
searchOptions.SearchFields.Add("tags");
197+
searchOptions.Select.Add("hotelName");
198+
searchOptions.Select.Add("category");
199+
searchOptions.Select.Add("tags");
200200

201201

202202
Console.WriteLine("Search the entire index for the phrase \"five star\":\n");

0 commit comments

Comments
 (0)