Skip to content

Commit 4b10ff6

Browse files
authored
Merge pull request #210760 from HeidiSteen/heidist-fresh
[azure search] Freshness pass (nav pages, find encryption key)
2 parents 396d631 + 8db59ed commit 4b10ff6

File tree

6 files changed

+44
-26
lines changed

6 files changed

+44
-26
lines changed

articles/search/cognitive-search-predefined-skills.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: HeidiSteen
77
ms.author: heidist
88
ms.service: cognitive-search
99
ms.topic: conceptual
10-
ms.date: 08/12/2021
10+
ms.date: 09/09/2022
1111
---
1212
# Built-in skills for text and image processing during indexing (Azure Cognitive Search)
1313

articles/search/samples-dotnet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 10/01/2021
11+
ms.date: 09/09/2022
1212
---
1313

1414
# .NET (C#) code samples for Azure Cognitive Search
@@ -58,7 +58,7 @@ Code samples from the Cognitive Search team demonstrate features and workflows.
5858
5959
## Other samples
6060

61-
The following samples are also published by the Cognitive Search team, but are not referenced in documentation. Associated readme files provide usage instructions.
61+
The following samples are also published by the Cognitive Search team, but aren't referenced in documentation. Associated readme files provide usage instructions.
6262

6363
| Samples | Description |
6464
|---------|-------------|

articles/search/samples-java.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 01/27/2021
11+
ms.date: 09/09/2022
1212
---
1313

1414
# Java code samples for Azure Cognitive Search
@@ -42,16 +42,16 @@ Code samples from the Cognitive Search team demonstrate features and workflows.
4242

4343
| Samples | Article |
4444
|---------|-------------|
45-
| [quickstart](https://github.com/Azure-Samples/azure-search-java-samples/tree/java-rest-api/quickstart) | Source code for [Quickstart: Create a search index in Java and REST](search-get-started-java.md). This sample has not been updated for the Java SDK. It calls the REST APIs. |
45+
| [quickstart](https://github.com/Azure-Samples/azure-search-java-samples/tree/java-rest-api/quickstart) | Source code for [Quickstart: Create a search index in Java and REST](search-get-started-java.md). This sample hasn't been updated for the Java SDK. It calls the REST APIs. |
4646

4747
> [!Tip]
4848
> Try the [Samples browser](/samples/browse/?languages=java&products=azure-cognitive-search) to search for Microsoft code samples in GitHub, filtered by product, service, and language.
4949
5050
## Other samples
5151

52-
The following samples are also published by the Cognitive Search team, but are not referenced in documentation. Associated readme files provide usage instructions.
52+
The following samples are also published by the Cognitive Search team, but aren't referenced in documentation. Associated readme files provide usage instructions.
5353

5454
| Samples | Description |
5555
|---------|-------------|
5656
| [search-java-getting-started](https://github.com/Azure-Samples/azure-search-java-samples/tree/master/search-java-getting-started) | Uses the Java SDK client library to create, load, and query a search index. This sample is currently standalone. |
57-
| [search-java-indexer-demo](https://github.com/Azure-Samples/azure-search-java-samples/tree/java-rest-api/search-java-indexer-demo) | Demonstrates an Azure Cosmos DB indexer in Java. This sample has not been updated for the Java SDK. It calls the REST APIs.|
57+
| [search-java-indexer-demo](https://github.com/Azure-Samples/azure-search-java-samples/tree/java-rest-api/search-java-indexer-demo) | Demonstrates an Azure Cosmos DB indexer in Java. This sample hasn't been updated for the Java SDK. It calls the REST APIs.|

articles/search/samples-javascript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 06/11/2021
11+
ms.date: 09/09/2022
1212
---
1313

1414
# JavaScript code samples for Azure Cognitive Search
@@ -60,7 +60,7 @@ Code samples from the Cognitive Search team demonstrate features and workflows.
6060
6161
## Other samples
6262

63-
The following samples are also published by the Cognitive Search team, but are not referenced in documentation. Associated readme files provide usage instructions.
63+
The following samples are also published by the Cognitive Search team, but aren't referenced in documentation. Associated readme files provide usage instructions.
6464

6565
| Samples | Description |
6666
|---------|-------------|

articles/search/samples-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 06/11/2021
11+
ms.date: 09/09/2022
1212
---
1313

1414
# Python code samples for Azure Cognitive Search

articles/search/search-security-get-encryption-keys.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 06/21/2021
11+
ms.date: 09/09/2022
1212
ms.custom: devx-track-azurepowershell
1313
---
1414

1515
# Find encrypted objects and information
1616

1717
In Azure Cognitive Search, customer-managed encryption keys are created, stored, and managed in Azure Key Vault. If you need to determine whether an object is encrypted, or what key name or version was used in Azure Key Vault, use the REST API or an Azure SDK to retrieve the **encryptionKey** property from the object definition in your search service.
1818

19-
Objects that are not encrypted with a customer-managed key will have an empty **encryptionKey** property. Otherwise, you might see a definition similar to the following example.
19+
Objects that aren't encrypted with a customer-managed key will have an empty **encryptionKey** property. Otherwise, you might see a definition similar to the following example.
2020

2121
```json
2222
"encryptionKey": {
@@ -34,47 +34,65 @@ The **encryptionKey** construct is the same for all encrypted objects. It's a fi
3434

3535
## Get the admin API key
3636

37-
Before you can retrieve object definitions from a search service, you will need to provide an admin API key. Admin API keys are required on requests that query for object definitions and metadata. The easiest way to get the admin API key is through the portal.
37+
Before you can retrieve object definitions from a search service, you'll need to provide an admin API key. Admin API keys are required on requests that query for object definitions and metadata. The easiest way to get the admin API key is through the portal.
3838

3939
1. Sign in to the [Azure portal](https://portal.azure.com/) and open the search service overview page.
4040

41-
1. On the left side, click **Keys** and copy an admin API. An admin key is required for index and synonym map retrieval.
41+
1. On the left side, select **Keys** and copy an admin API.
4242

43-
For the remaining steps, switch to PowerShell and the REST API. The portal does not show encryption key information for any object.
43+
For the remaining steps, switch to PowerShell and the REST API. The portal doesn't show encryption key information for any object.
4444

4545
## Retrieve object properties
4646

4747
Use PowerShell and REST to run the following commands to set up the variables and get object definitions.
4848

4949
Alternatively, you can also use the Azure SDKs for [.NET](/dotnet/api/azure.search.documents.indexes.searchindexclient.getindexes), [Python](/python/api/azure-search-documents/azure.search.documents.indexes.searchindexclient), [JavaScript](/javascript/api/@azure/search-documents/searchindexclient), and [Java](/java/api/com.azure.search.documents.indexes.searchindexclient.getindex).
5050

51+
First, connect to your Azure account.
52+
5153
```powershell
52-
<# Connect to Azure #>
53-
$Connect-AzAccount
54+
Connect-AzAccount
55+
```
5456

55-
<# Provide the admin API key used for search service authentication #>
57+
Set up the headers used on each request in the current session. Provide the admin API key used for search service authentication.
58+
59+
```powershell
5660
$headers = @{
5761
'api-key' = '<YOUR-ADMIN-API-KEY>'
5862
'Content-Type' = 'application/json'
5963
'Accept' = 'application/json' }
64+
```
6065

61-
<# List all existing synonym maps #>
62-
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/synonyms?api-version=2020-06-30&$select=name'
63-
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
66+
To return a list of all search indexes, set the endpoint to the indexes collection.
6467

65-
<# List all existing indexes #>
68+
```powershell
6669
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/indexes?api-version=2020-06-30&$select=name'
6770
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
71+
```
6872

69-
<# Return a specific synonym map definition. The encryptionKey property is at the end #>
70-
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/synonyms/<YOUR-SYNONYM-MAP-NAME>?api-version=2020-06-30'
71-
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
73+
To return a specific index definition, provide its name in the path. The encryptionKey property is at the end.
7274

73-
<# Return a specific index definition. The encryptionKey property is at the end #>
75+
```powershell
7476
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/indexes/<YOUR-INDEX-NAME>?api-version=2020-06-30'
7577
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
7678
```
7779

80+
To return synonym maps, set the endpoint to the synonyms collection and then send the request.
81+
82+
```powershell
83+
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/synonyms?api-version=2020-06-30&$select=name'
84+
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
85+
```
86+
87+
The following example returns a specific synonym map definition, including the encryptionKey property at the end.
88+
89+
```powershell
90+
$uri= 'https://<YOUR-SEARCH-SERVICE>.search.windows.net/synonyms/<YOUR-SYNONYM-MAP-NAME>?api-version=2020-06-30'
91+
Invoke-RestMethod -Uri $uri -Headers $headers | ConvertTo-Json
92+
```
93+
94+
Use the same pattern to return the encryptionKey property for other top-level objects such as indexers, skillsets, data sources, and index aliases.
95+
7896
## Next steps
7997

8098
We recommend that you [enable logging](../key-vault/general/logging.md) on Azure Key Vault so that you can monitor key usage.

0 commit comments

Comments
 (0)