Skip to content

Commit df769bd

Browse files
committed
Fixed link issue and rolled out same steps to related tutorials
1 parent 0b47683 commit df769bd

File tree

3 files changed

+74
-32
lines changed

3 files changed

+74
-32
lines changed

articles/search/tutorial-csharp-create-load-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Create a new search resource using PowerShell and the **Az.Search** module.
3232
```
3333

3434
> [!NOTE]
35-
> You might need to provide a tenant ID, which you can find in the Azure portal in [Portal settings > Directories + subscriptions](https://learn.microsoft.com/azure/azure-portal/set-preferences).
35+
> You might need to provide a tenant ID, which you can find in the Azure portal in [Portal settings > Directories + subscriptions](/azure/azure-portal/set-preferences).
3636
3737
1. Before creating a new search service, you can list existing search services for your subscription to see if there's one you want to use:
3838

articles/search/tutorial-javascript-create-load-index.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,57 @@ Continue to build your search-enabled website by following these steps:
1919
* Create a new index
2020
* Import data with JavaScript using the [sample script](https://github.com/Azure-Samples/azure-search-javascript-samples/blob/main/search-website-functions-v4/bulk-insert/bulk_insert_books.js) and Azure SDK [@azure/search-documents](https://www.npmjs.com/package/@azure/search-documents).
2121

22-
## Create an Azure Cognitive Search resource
22+
## Create an Azure Cognitive Search resource
2323

24-
Create a new Search resource with the Azure Cognitive Search extension for Visual Studio Code.
24+
Create a new search resource using PowerShell and the **Az.Search** module.
2525

26-
1. In Visual Studio Code, open the [Activity bar](https://code.visualstudio.com/docs/getstarted/userinterface), and select the Azure icon.
26+
1. In Visual Studio Code, open a new terminal window.
2727

28-
1. In the Side bar, **right-click on your Azure subscription** under the `Azure: Cognitive Search` area and select **Create new search service**.
28+
1. Connect to Azure:
2929

30-
:::image type="content" source="./media/tutorial-javascript-create-load-index/visual-studio-code-create-search-resource.png" alt-text="Screenshot of Visual Studio Code showing Azure explorer, right-click on your Azure subscription under the Azure: Cognitive Search area and select Create new search service.":::
30+
```powershell
31+
Connect-AzAccount -TenantID <your-tenant-ID>
32+
```
3133

32-
1. Follow the prompts to provide the following information:
34+
> [!NOTE]
35+
> You might need to provide a tenant ID, which you can find in the Azure portal in [Portal settings > Directories + subscriptions](/azure/azure-portal/set-preferences).
36+
37+
1. Before creating a new search service, you can list existing search services for your subscription to see if there's one you want to use:
38+
39+
```powershell
40+
Get-AzResource -ResourceType Microsoft.Search/searchServices | ft
41+
```
42+
43+
1. Load the **Az.Search** module:
44+
45+
```powershell
46+
Install-Module -Name Az.Search
47+
```
48+
49+
1. Create a new search service. Use the following cmdlet as a template, substituting valid values for the resource group, service name, tier, region, partitions, and replicas:
50+
51+
```powershell
52+
New-AzSearchService -ResourceGroupName "my resource group" -Name "myDemoSearchSvc" -Sku "Free" -Location "West US" -PartitionCount 1 -ReplicaCount 1 -HostingMode Default
53+
```
3354

3455
|Prompt|Enter|
3556
|--|--|
36-
|Enter a globally unique name for the new Search Service.|**Remember this name**. This resource name becomes part of your resource endpoint.|
57+
|Enter a globally unique name for the new search service.|**Remember this name**. This resource name becomes part of your resource endpoint.|
3758
|Select a resource group for new resources|Use the resource group you created for this tutorial.|
38-
|Select the SKU for your Search service.|Select **Free** for this tutorial. You can't change a SKU pricing tier after the service is created.|
59+
|Select the SKU for your search service.|Use **Free** for this tutorial. You can't change a SKU pricing tier after the service is created.|
3960
|Select a location for new resources.|Select a region close to you.|
4061

41-
1. After you complete the prompts, your new Search resource is created.
42-
43-
## Get your Search resource admin key
44-
45-
Get your Search resource admin key with the Visual Studio Code extension.
62+
1. Create a query key that grants read access to a search service. Query keys have to be explicitly created. Copy the query key to Notepad so that you can paste it into the client code in a later step:
4663

47-
1. In Visual Studio Code, in the Side bar, right-click on your Search resource and select **Copy Admin Key**.
64+
```powershell
65+
New-AzSearchQueryKey -ResourceGroupName "my resource group" -ServiceName "myDemoSearchSvc" -Name "mySrchQueryKey"
66+
```
4867

49-
:::image type="content" source="./media/tutorial-javascript-create-load-index/visual-studio-code-copy-admin-key.png" alt-text="Screenshot of Visual Studio Code showing Azure explorer, right-click on your Search resource and select Copy Admin Key.":::
68+
1. Get the search service admin API key that was automatically created for your search service. An admin API key provides write access to the search service. Copy either one of the admin keys to Notepad so that you can use it in the bulk import step that creates and loads an index:
5069

51-
1. Keep this admin key, you'll need to use it in [a later section](#prepare-the-bulk-import-script-for-search).
70+
```powershell
71+
Get-AzSearchAdminKeyPair -ResourceGroupName "my resource group" -ServiceName "myDemoSearchSvc"
72+
```
5273

5374
## Prepare the bulk import script for Search
5475

articles/search/tutorial-python-create-load-index.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,55 @@ Continue to build your search-enabled website by following these steps:
2121

2222
## Create an Azure Cognitive Search resource
2323

24-
Create a new Search resource with the Azure Cognitive Search extension for Visual Studio Code.
24+
Create a new search resource using PowerShell and the **Az.Search** module.
2525

26-
1. In Visual Studio Code, open the [Activity bar](https://code.visualstudio.com/docs/getstarted/userinterface), and select the Azure icon.
26+
1. In Visual Studio Code, open a new terminal window.
2727

28-
1. In the Side bar, **right-click on your Azure subscription** under the `Azure: Cognitive Search` area and select **Create new search service**.
28+
1. Connect to Azure:
2929

30-
:::image type="content" source="./media/tutorial-javascript-create-load-index/visual-studio-code-create-search-resource.png" alt-text="Screenshot of Visual Studio Code showing the Azure explorer, right-click on your Azure subscription under the Azure: Cognitive Search area and select Create new search service.":::
30+
```powershell
31+
Connect-AzAccount -TenantID <your-tenant-ID>
32+
```
3133

32-
1. Follow the prompts to provide the following information:
34+
> [!NOTE]
35+
> You might need to provide a tenant ID, which you can find in the Azure portal in [Portal settings > Directories + subscriptions](/azure/azure-portal/set-preferences).
36+
37+
1. Before creating a new search service, you can list existing search services for your subscription to see if there's one you want to use:
38+
39+
```powershell
40+
Get-AzResource -ResourceType Microsoft.Search/searchServices | ft
41+
```
42+
43+
1. Load the **Az.Search** module:
44+
45+
```powershell
46+
Install-Module -Name Az.Search
47+
```
48+
49+
1. Create a new search service. Use the following cmdlet as a template, substituting valid values for the resource group, service name, tier, region, partitions, and replicas:
50+
51+
```powershell
52+
New-AzSearchService -ResourceGroupName "my resource group" -Name "myDemoSearchSvc" -Sku "Free" -Location "West US" -PartitionCount 1 -ReplicaCount 1 -HostingMode Default
53+
```
3354

3455
|Prompt|Enter|
3556
|--|--|
36-
|Enter a globally unique name for the new Search Service.|**Remember this name**. This resource name becomes part of your resource endpoint.|
57+
|Enter a globally unique name for the new search service.|**Remember this name**. This resource name becomes part of your resource endpoint.|
3758
|Select a resource group for new resources|Use the resource group you created for this tutorial.|
38-
|Select the SKU for your Search service.|Select **Free** for this tutorial. You can't change a pricing tier after the service is created.|
59+
|Select the SKU for your search service.|Use **Free** for this tutorial. You can't change a SKU pricing tier after the service is created.|
3960
|Select a location for new resources.|Select a region close to you.|
4061

41-
1. After you complete the prompts, your new Search resource is created.
42-
43-
## Get your Search resource admin key
44-
45-
Get your Search resource admin key with the Visual Studio Code extension.
62+
1. Create a query key that grants read access to a search service. Query keys have to be explicitly created. Copy the query key to Notepad so that you can paste it into the client code in a later step:
4663

47-
1. In Visual Studio Code, in the Side bar, right-click on your Search resource and select **Copy Admin Key**.
64+
```powershell
65+
New-AzSearchQueryKey -ResourceGroupName "my resource group" -ServiceName "myDemoSearchSvc" -Name "mySrchQueryKey"
66+
```
4867

49-
:::image type="content" source="./media/tutorial-javascript-create-load-index/visual-studio-code-copy-admin-key.png" alt-text="Screenshot of Visual Studio Code showing the Azure explorer, right-click on your Search resource and select Copy Admin Key.":::
68+
1. Get the search service admin API key that was automatically created for your search service. An admin API key provides write access to the search service. Copy either one of the admin keys to Notepad so that you can use it in the bulk import step that creates and loads an index:
5069

51-
1. Keep this admin key, you'll need to use it to create objects in [a later section](#prepare-the-bulk-import-script-for-search).
70+
```powershell
71+
Get-AzSearchAdminKeyPair -ResourceGroupName "my resource group" -ServiceName "myDemoSearchSvc"
72+
```
5273

5374
## Prepare the bulk import script for Search
5475

0 commit comments

Comments
 (0)