Skip to content

Commit

Permalink
CMK and Synonym code corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
HeidiSteen committed Oct 20, 2020
1 parent 725722a commit 60c84f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"SearchServiceName": "Put your search service name here",
"SearchServiceAdminApiKey": "Put your primary or secondary API key here",
"SearchServiceQueryApiKey": "Put your query API key here",
"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>'",
"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.",
"AzureActiveDirectoryApplicationSecret": "(optional): The authentication key of the specified AAD application."
"SearchServiceEndpoint": "Search service URL goes here",
"SearchServiceAdminApiKey": "Search service Admin API key goes here",
"SearchServiceQueryApiKey": "Search service query API key goes here",
"AzureKeyVaultKeyIdentifier": "Azure Key Vault key URL goes here. Expected format: 'https://<key-vault-name>.vault.azure.net/keys/<key-name>/<key-version>'",
"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.",
"AzureActiveDirectoryApplicationSecret": "Azure AD authentication key found in Certificates and Secrets."
}
14 changes: 7 additions & 7 deletions DotNetHowToSynonyms/DotNetHowToSynonyms/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ private static void EnableSynonymsInHotelsIndexSafely(SearchIndexClient indexCli

private static SearchIndex AddSynonymMapsToFields(SearchIndex index)
{
index.Fields.First(f => f.Name == "Category").SynonymMapNames.Add("desc-synonymmap");
index.Fields.First(f => f.Name == "Tags").SynonymMapNames.Add("desc-synonymmap");
index.Fields.First(f => f.Name == "category").SynonymMapNames.Add("desc-synonymmap");
index.Fields.First(f => f.Name == "tags").SynonymMapNames.Add("desc-synonymmap");
return index;
}

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

searchOptions = new SearchOptions();
searchOptions.SearchFields.Add("Category");
searchOptions.SearchFields.Add("Tags");
searchOptions.Select.Add("HotelName");
searchOptions.Select.Add("Category");
searchOptions.Select.Add("Tags");
searchOptions.SearchFields.Add("category");
searchOptions.SearchFields.Add("tags");
searchOptions.Select.Add("hotelName");
searchOptions.Select.Add("category");
searchOptions.Select.Add("tags");


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

0 comments on commit 60c84f7

Please sign in to comment.