Skip to content

Commit 87532d3

Browse files
Merge pull request #268874 from HeidiSteen/heidist-fix
[azure search] VS Code updates
2 parents 03996bb + 8688453 commit 87532d3

9 files changed

+258
-271
lines changed

articles/search/cognitive-search-tutorial-blob-dotnet.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Skillsets add AI processing to raw content, making that content more uniform and
2525
This tutorial helps you learn how to:
2626

2727
> [!div class="checklist"]
28-
> + Define objects in an enrichment pipeline
29-
> + Build a skillset that invokes OCR, language detection, entity recognition, and key phrase extraction
30-
> + Execute the pipeline to invoke transformations, and to create and load a search index
31-
> + Check the results using full text search
28+
> + Define objects in an enrichment pipeline.
29+
> + Build a skillset. Invoke OCR, language detection, entity recognition, and key phrase extraction.
30+
> + Execute the pipeline. Create and load a search index.
31+
> + Check the results using full text search.
3232
3333
If you don't have an Azure subscription, open a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
3434

@@ -50,40 +50,36 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
5050

5151
+ [Azure AI Search](search-create-app-portal.md)
5252

53-
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media)
54-
5553
> [!NOTE]
56-
> You can use the free search service for this tutorial. A free search service limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
54+
> You can use a free search service for this tutorial. The free tier limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
55+
56+
### Download files
57+
58+
Download a zip file of the sample data repository and extract the contents.
59+
60+
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media)
5761

5862
### Upload sample data to Azure Storage
5963

6064
1. In Azure Storage, create a new container and name it *cog-search-demo*.
6165

6266
1. [Upload the sample data files](/azure/storage/blobs/storage-quickstart-blobs-portal).
6367

64-
:::image type="content" source="media/cognitive-search-tutorial-blob/sample-files.png" alt-text="Screenshot of the files in File Explorer." border="true":::
65-
6668
1. Get a storage connection string so that you can formulate a connection in Azure AI Search.
6769

6870
1. On the left, select **Access keys**.
6971

7072
1. Copy the connection string for either key one or key two. The connection string is similar to the following example:
7173

7274
```http
73-
DefaultEndpointsProtocol=https;AccountName=cogsrchdemostorage;AccountKey=<your account key>;EndpointSuffix=core.windows.net
75+
DefaultEndpointsProtocol=https;AccountName=<your account name>;AccountKey=<your account key>;EndpointSuffix=core.windows.net
7476
```
7577
7678
### Azure AI services
7779
78-
AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of 20 transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](cognitive-search-attach-cognitive-services.md) for pay-as-you-go pricing.
79-
80-
### Azure AI Search
81-
82-
The third component is Azure AI Search, which you can [create in the portal](search-create-service-portal.md) or [find an existing search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices) in your subscription.
80+
Built-in AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of 20 transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](cognitive-search-attach-cognitive-services.md) for pay-as-you-go pricing.
8381
84-
You can use the Free tier to complete this walkthrough.
85-
86-
### Copy a key and URL
82+
### Copy a search service URL and API key
8783
8884
For this tutorial, connections to Azure AI Search require an endpoint and an API key. You can get these values from the Azure portal.
8985
@@ -93,8 +89,6 @@ For this tutorial, connections to Azure AI Search require an endpoint and an API
9389
9490
:::image type="content" source="media/search-get-started-rest/get-url-key.png" alt-text="Screenshot of the URL and API keys in the Azure portal.":::
9591
96-
A valid API key establishes trust, on a per request basis, between the application sending the request and the search service handling it.
97-
9892
## Set up your environment
9993
10094
Begin by opening Visual Studio and creating a new Console App project that can run on .NET Core.

articles/search/cognitive-search-tutorial-blob.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Skillsets add AI processing to raw content, making that content more uniform and
2121
This tutorial helps you learn how to:
2222

2323
> [!div class="checklist"]
24-
> + Define objects in an enrichment pipeline
25-
> + Build a skillset that invokes OCR, language detection, entity recognition, and key phrase extraction
26-
> + Execute the pipeline to invoke transformations, and to create and load a search index
27-
> + Check the results using full text search
24+
> + Define objects in an enrichment pipeline.
25+
> + Build a skillset. Invoke OCR, language detection, entity recognition, and key phrase extraction.
26+
> + Execute the pipeline. Create and load a search index.
27+
> + Check the results using full text search.
2828
2929
If you don't have an Azure subscription, open a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
3030

@@ -44,42 +44,36 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
4444

4545
+ [Azure AI Search](search-create-app-portal.md)
4646

47-
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media)
47+
> [!NOTE]
48+
> You can use a free search service for this tutorial. The free tier limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
4849
49-
+ [Sample REST file](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/skillset-tutorial)
50+
### Download files
5051

51-
> [!NOTE]
52-
> You can use the free service for this tutorial. A free search service limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
52+
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media). Download a zip file of the sample data repository and extract the contents.
53+
54+
+ [Sample REST file](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/skillset-tutorial)
5355

5456
### Upload sample data to Azure Storage
5557

5658
1. In Azure Storage, create a new container and name it *cog-search-demo*.
5759

5860
1. [Upload the sample data files](/azure/storage/blobs/storage-quickstart-blobs-portal).
5961

60-
:::image type="content" source="media/cognitive-search-tutorial-blob/sample-files.png" alt-text="Screenshot of the files in File Explorer." border="true":::
61-
6262
1. Get a storage connection string so that you can formulate a connection in Azure AI Search.
6363

6464
1. On the left, select **Access keys**.
6565

6666
1. Copy the connection string for either key one or key two. The connection string is similar to the following example:
6767

6868
```http
69-
DefaultEndpointsProtocol=https;AccountName=cogsrchdemostorage;AccountKey=<your account key>;EndpointSuffix=core.windows.net
69+
DefaultEndpointsProtocol=https;AccountName=<your account name>;AccountKey=<your account key>;EndpointSuffix=core.windows.net
7070
```
7171
7272
### Azure AI services
7373
74-
AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of twenty transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](cognitive-search-attach-cognitive-services.md) for pay-as-you-go pricing.
75-
76-
### Azure AI Search
77-
78-
The third component is Azure AI Search, which you can [create in the portal](search-create-service-portal.md) or [find an existing search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices) in your subscription.
74+
Built-in AI enrichment is backed by Azure AI services, including Language service and Azure AI Vision for natural language and image processing. For small workloads like this tutorial, you can use the free allocation of twenty transactions per indexer. For larger workloads, [attach an Azure AI Services multi-region resource to a skillset](cognitive-search-attach-cognitive-services.md) for pay-as-you-go pricing.
7975
80-
You can use the Free tier to complete this walkthrough.
81-
82-
### Copy a key and URL
76+
### Copy a search service URL and API key
8377
8478
For this tutorial, connections to Azure AI Search require an endpoint and an API key. You can get these values from the Azure portal.
8579
@@ -89,8 +83,6 @@ For this tutorial, connections to Azure AI Search require an endpoint and an API
8983
9084
:::image type="content" source="media/search-get-started-rest/get-url-key.png" alt-text="Screenshot of the URL and API keys in the Azure portal.":::
9185
92-
A valid API key establishes trust, on a per request basis, between the application sending the request and the search service handling it.
93-
9486
## Set up your REST file
9587
9688
1. Start Visual Studio Code and open the [skillset-tutorial.rest](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/skillset-tutorial) file. See [Quickstart: Text search using REST](search-get-started-rest.md) if you need help with the REST client.

articles/search/search-get-started-rest.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ If you're not familiar with the REST client for Visual Studio Code, this section
5656
1. Paste in the following example. Replace the base URL and API key with the values you copied earlier.
5757

5858
```http
59-
@baseUrl = https://PUT-YOUR-SERVICE-NAME-HERE.search.windows.net
59+
@baseUrl = PUT-YOUR-SEARCH-SERVICE-ENDPOINT-HERE
6060
@apiKey = PUT-YOUR-API-KEY-HERE
6161
6262
### List existing indexes by name
@@ -322,7 +322,14 @@ When you're working in your own subscription, it's a good idea at the end of a p
322322
323323
You can find and manage resources in the portal, using the **All resources** or **Resource groups** link in the left-navigation pane.
324324
325-
On a free service, remember the limitation of three indexes, indexers, and data sources. You can delete individual items in the portal to stay under the limit.
325+
You can also try this DELETE command:
326+
327+
```http
328+
### Delete an index
329+
DELETE {{baseUrl}}/indexes/hotels-quickstart?api-version=2023-11-01 HTTP/1.1
330+
Content-Type: application/json
331+
api-key: {{apiKey}}
332+
```
326333

327334
## Next steps
328335

articles/search/search-get-started-vector.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,18 @@ Here's the last query in the collection: a hybrid query, with semantic ranking,
805805
806806
## Clean up
807807
808-
Azure AI Search is a billable resource. If it's no longer needed, delete it from your subscription to avoid charges.
808+
When you're working in your own subscription, it's a good idea at the end of a project to identify whether you still need the resources you created. Resources left running can cost you money. You can delete resources individually or delete the resource group to delete the entire set of resources.
809+
810+
You can find and manage resources in the portal, using the **All resources** or **Resource groups** link in the left-navigation pane.
811+
812+
You can also try this DELETE command:
813+
814+
```http
815+
### Delete an index
816+
DELETE {{baseUrl}}/indexes/hotels-vector-quickstart?api-version=2023-11-01 HTTP/1.1
817+
Content-Type: application/json
818+
api-key: {{apiKey}}
819+
```
809820

810821
## Next steps
811822

articles/search/search-indexer-tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
3333

3434
* [Azure SQL Database](https://azure.microsoft.com/services/sql-database/) using SQL Server authentication
3535
* [Visual Studio](https://visualstudio.microsoft.com/downloads/)
36-
* [Create](search-create-service-portal.md) or [find an existing search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices)
36+
* [Azure AI Search](search-what-is-azure-search.md). [Create](search-create-service-portal.md) or [find an existing search service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices)
3737

3838
> [!NOTE]
39-
> You can use the free service for this tutorial. A free search service limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
39+
> You can use a free search service for this tutorial. The free tier limits you to three indexes, three indexers, and three data sources. This tutorial creates one of each. Before starting, make sure you have room on your service to accept the new resources.
4040
4141
## Download files
4242

articles/search/search-query-partial-matching.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ The approach looks like this:
5454
1. Assign the analyzer to the field
5555
1. Build and test the index
5656

57-
> [!TIP]
58-
> Evaluating analyzers is an iterative process that requires frequent index rebuilds. You can make this step easier by using Postman, the REST APIs for [Create Index](/rest/api/searchservice/create-index), [Delete Index](/rest/api/searchservice/delete-index),[Load Documents](/rest/api/searchservice/addupdate-or-delete-documents), and [Search Documents](/rest/api/searchservice/search-documents). For Load Documents, the request body should contain a small representative data set that you want to test (for example, a field with phone numbers or product codes). With these APIs in the same Postman collection, you can cycle through these steps quickly.
59-
6057
## 1 - Create a dedicated field
6158

6259
Analyzers determine how terms are tokenized in an index. Since analyzers are assigned on a per-field basis, you can create fields in your index to optimize for different scenarios. For example, you might define "featureCode" and "featureCodeRegex" to support regular full text search on the first, and advanced pattern matching on the second. The analyzers assigned to each field determine how the contents of each field are tokenized in the index.
@@ -91,7 +88,7 @@ When choosing an analyzer that produces whole-term tokens, the following analyze
9188
| [whitespace](https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/WhitespaceAnalyzer.html) | Separates on white spaces only. Terms that include dashes or other characters are treated as a single token. |
9289
| [custom analyzer](index-add-custom-analyzers.md) | (recommended) Creating a custom analyzer lets you specify both the tokenizer and token filter. The previous analyzers must be used as-is. A custom analyzer lets you pick which tokenizers and token filters to use. <br><br>A recommended combination is the [keyword tokenizer](https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/KeywordTokenizer.html) with a [lower-case token filter](https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/LowerCaseFilter.html). By itself, the built-in [keyword analyzer](https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/KeywordAnalyzer.html) doesn't lower-case any upper-case text, which can cause queries to fail. A custom analyzer gives you a mechanism for adding the lower-case token filter. |
9390

94-
If you're using a web API test tool like Postman, you can add the [Test Analyzer REST call](/rest/api/searchservice/test-analyzer) to inspect tokenized output.
91+
Using a REST client, you can add the [Test Analyzer REST call](/rest/api/searchservice/test-analyzer) to inspect tokenized output.
9592

9693
The index must exist on the search service, but it can be empty. Given an existing index and a field containing dashes or partial terms, you can try various analyzers over specific terms to see what tokens are emitted.
9794

@@ -231,7 +228,7 @@ Once you've defined an index with analyzers and field definitions that support y
231228

232229
If you're familiar with Postman and REST APIs, [download the query examples collection](https://github.com/Azure-Samples/azure-search-rest-samples/) to query partial terms and special characters described in this article. The collection includes REST API requests for index creation and deletion, sample documents and an upload documents request, a test analyzer request, and queries.
233230

234-
The previous sections explained the logic. This section steps through each API you should call when testing your solution. As previously noted, if you use an interactive web test tool such as Postman, you can step through these tasks quickly.
231+
The previous sections explained the logic. This section steps through each API you should call when testing your solution.
235232

236233
+ [Delete Index](/rest/api/searchservice/delete-index) removes an existing index of the same name so that you can recreate it.
237234

0 commit comments

Comments
 (0)