You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/tutorial-csharp-create-load-index.md
+40-19Lines changed: 40 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,48 +7,69 @@ author: diberry
7
7
ms.author: diberry
8
8
ms.service: cognitive-search
9
9
ms.topic: tutorial
10
-
ms.date: 11/01/2022
10
+
ms.date: 12/04/2022
11
11
ms.custom: devx-track-csharp
12
12
ms.devlang: csharp
13
13
---
14
14
15
15
# 2 - Create and load Search Index with .NET
16
16
17
-
Continue to build your Search-enabled website by:
18
-
* Create a Search resource with the VS Code extension
17
+
Continue to build your search-enabled website by following these steps:
18
+
* Create a search resource
19
19
* Create a new index
20
20
* Import data with .NET using the sample script and Azure SDK [Azure.Search.Documents](https://www.nuget.org/packages/Azure.Search.Documents/).
21
21
22
-
## Create an Azure Search resource
22
+
## Create an Azure Cognitive Search resource
23
23
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.
25
25
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.
27
27
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:
29
29
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 bar, 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
+
```
31
33
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:
|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.|
37
58
|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.|
39
60
|Select a location for new resources.|Select a region close to you.|
40
61
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:
46
63
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
+
```
48
67
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 bar, 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:
50
69
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"
Copy file name to clipboardExpand all lines: articles/search/tutorial-javascript-create-load-index.md
+40-19Lines changed: 40 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,48 +7,69 @@ author: diberry
7
7
ms.author: diberry
8
8
ms.service: cognitive-search
9
9
ms.topic: tutorial
10
-
ms.date: 11/01/2022
10
+
ms.date: 12/04/2022
11
11
ms.custom: devx-track-js
12
12
ms.devlang: javascript
13
13
---
14
14
15
15
# 2 - Create and load Search Index with JavaScript
16
16
17
-
Continue to build your Search-enabled website by:
18
-
* Create a Search resource with the VS Code extension
17
+
Continue to build your search-enabled website by following these steps:
18
+
* Create a search resource
19
19
* Create a new index
20
20
* 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).
21
21
22
-
## Create an Azure Search resource
22
+
## Create an Azure Cognitive Search resource
23
23
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.
25
25
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.
27
27
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:
29
29
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
+
```
31
33
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:
|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.|
37
58
|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.|
39
60
|Select a location for new resources.|Select a region close to you.|
40
61
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:
46
63
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
+
```
48
67
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:
50
69
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"
Copy file name to clipboardExpand all lines: articles/search/tutorial-python-create-load-index.md
+40-19Lines changed: 40 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,48 +7,69 @@ author: diberry
7
7
ms.author: diberry
8
8
ms.service: cognitive-search
9
9
ms.topic: tutorial
10
-
ms.date: 11/02/2022
10
+
ms.date: 12/04/2022
11
11
ms.custom: devx-track-python
12
12
ms.devlang: python
13
13
---
14
14
15
15
# 2 - Create and load Search Index with Python
16
16
17
-
Continue to build your Search-enabled website by:
18
-
* Create a Search resource with the VS Code extension
17
+
Continue to build your search-enabled website by following these steps:
18
+
* Create a search resource
19
19
* Create a new index
20
20
* Import data with Python using the [sample script](https://github.com/Azure-Samples/azure-search-python-samples/blob/main/search-website-functions-v4/bulk-upload/bulk-upload.py) and Azure SDK [azure-search-documents](https://pypi.org/project/azure-search-documents/).
21
21
22
-
## Create an Azure Cognitive Search resource
22
+
## Create an Azure Cognitive Search resource
23
23
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.
25
25
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.
27
27
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:
29
29
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
+
```
31
33
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:
|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.|
37
58
|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.|
39
60
|Select a location for new resources.|Select a region close to you.|
40
61
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:
46
63
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
+
```
48
67
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:
50
69
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"
0 commit comments