Skip to content

Commit bf24212

Browse files
Merge pull request #216761 from diberry/diberry/1101-cog-search-load-index-includes
Cog Search - Search website - load index - includes
2 parents 5725797 + 17175d7 commit bf24212

4 files changed

+44
-18
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
ms.topic: include
3+
ms.date: 10/26/2022
4+
author: HeidiSteen
5+
ms.author: heidist
6+
ms.service: cognitive-search
7+
---
8+
Note your **Search resource name**. You'll need this to connect the Azure Function app to your search resource.
9+
10+
> [!CAUTION]
11+
> While you may be tempted to use your search admin key in the Azure Function, that isn't following the principle of least privilege. The Azure Function will use the query key to conform to least privilege.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
ms.topic: include
3+
ms.date: 10/26/2022
4+
author: HeidiSteen
5+
ms.author: heidist
6+
ms.service: cognitive-search
7+
---
8+
9+
Once the upload completes, the search index is ready to use. Review your new index.
10+
11+
1. In Visual Studio Code, open the Azure Cognitive Search extension and select your Search resource.
12+
13+
:::image type="content" source="../media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-resource.png" alt-text="Screenshot of Visual Studio Code using the search extension.":::
14+
15+
1. Expand Indexes, then Documents, then `good-books`, then select a doc to see all the document-specific data.
16+
17+
:::image type="content" source="../media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-docs.png" lightbox="../media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-docs.png" alt-text="Expandable screenshot of Visual Studio Code showing documents listed in an index.":::
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
ms.topic: include
3+
ms.date: 10/26/2022
4+
author: HeidiSteen
5+
ms.author: heidist
6+
ms.service: cognitive-search
7+
---
8+
Use the following git command in the Visual Studio Code integrated terminal at the `bulk-insert` directory, to roll back the changes. They aren't needed to continue the tutorial and you shouldn't save or push these secrets to your repo.
9+
10+
```git
11+
git checkout .
12+
```

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

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: diberry
77
ms.author: diberry
88
ms.service: cognitive-search
99
ms.topic: tutorial
10-
ms.date: 10/26/2022
10+
ms.date: 11/01/2022
1111
ms.custom: devx-track-js
1212
ms.devlang: javascript
1313
---
@@ -83,30 +83,16 @@ The script uses the Azure SDK for Cognitive Search:
8383
8484
## Review the new Search Index
8585
86-
Once the upload completes, the Search Index is ready to use. Review your new Index.
87-
88-
1. In Visual Studio Code, open the Azure Cognitive Search extension and select your Search resource.
89-
90-
:::image type="content" source="media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-resource.png" alt-text="In Visual Studio Code, open the Azure Cognitive Search extension and open your Search resource.":::
91-
92-
1. Expand Indexes, then Documents, then `good-books`, then select a doc to see all the document-specific data.
93-
94-
:::image type="content" source="media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-docs.png" lightbox="media/tutorial-javascript-create-load-index/visual-studio-code-search-extension-view-docs.png" alt-text="Expand Indexes, then `good-books`, then select a doc.":::
86+
[!INCLUDE [tutorial-load-index-review-index](includes/tutorial-add-search-website-load-index-review.md)]
9587
9688
## Rollback bulk import file changes
9789
98-
Use the following git command in the VS Code integrated terminal at the `bulk-insert` directory, to roll back the changes. They aren't needed to continue the tutorial and you shouldn't save or push these secrets to your repo.
99-
100-
```git
101-
git checkout .
102-
```
90+
[!INCLUDE [tutorial-load-index-rollback](includes/tutorial-add-search-website-load-index-rollback-changes.md)]
10391
10492
## Copy your Search resource name
10593
106-
Note your **Search resource name**. You'll need this to connect the Azure Function app to your Search resource.
94+
[!INCLUDE [tutorial-load-index-copy](includes/tutorial-add-search-website-load-index-copy-resource-name.md)]
10795
108-
> [!CAUTION]
109-
> While you may be tempted to use your Search admin key in the Azure Function, that isn't following the principle of least privilege. The Azure Function will use the query key to conform to least privilege.
11096
11197
## Next steps
11298

0 commit comments

Comments
 (0)