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/cognitive-search-tutorial-blob-dotnet.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
75
75
76
76
### Azure AI services
77
77
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 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.
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
79
80
80
### Azure AI Search
81
81
@@ -109,7 +109,7 @@ For this project, install version 11 or later of the `Azure.Search.Documents` an
109
109
110
110
1. Browse for [Azure.Search.Document](https://www.nuget.org/packages/Azure.Search.Documents).
111
111
112
-
1. Select the latest version and then click **Install**.
112
+
1. Select the latest version and then select **Install**.
113
113
114
114
1. Repeat the previous steps to install [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration) and [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json).
115
115
@@ -181,7 +181,7 @@ public static void Main(string[] args)
181
181
182
182
### Add function to exit the program during failure
183
183
184
-
This tutorial is meant to help you understand each step of the indexing pipeline. If there is a critical issue that prevents the program from creating the data source, skillset, index, or indexer the program will output the error message and exit so that the issue can be understood and addressed.
184
+
This tutorial is meant to help you understand each step of the indexing pipeline. If there's a critical issue that prevents the program from creating the data source, skillset, index, or indexer the program will output the error message and exit so that the issue can be understood and addressed.
185
185
186
186
Add `ExitProgram` to `Main` to handle scenarios that require the program to exit.
For a successful request, the method will return the data source that was created. If there is a problem with the request, such as an invalid parameter, the method will throw an exception.
236
+
For a successful request, the method returns the data source that was created. If there's a problem with the request, such as an invalid parameter, the method throws an exception.
237
237
238
238
Now add a line in `Main` to call the `CreateOrUpdateDataSource` function that you've just added.
239
239
@@ -271,7 +271,7 @@ For more information about skillset fundamentals, see [How to define a skillset]
271
271
272
272
### OCR skill
273
273
274
-
The [`OcrSkill`](/dotnet/api/azure.search.documents.indexes.models.ocrskill) extracts text from images. This skill assumes that a normalized_images field exists. To generate this field, later in the tutorial we'll set the ```"imageAction"``` configuration in the indexer definition to ```"generateNormalizedImages"```.
274
+
The [`OcrSkill`](/dotnet/api/azure.search.documents.indexes.models.ocrskill) extracts text from images. This skill assumes that a normalized_images field exists. To generate this field, later in the tutorial we set the ```"imageAction"``` configuration in the indexer definition to ```"generateNormalizedImages"```.
In this section, you'll create a [`MergeSkill`](/dotnet/api/azure.search.documents.indexes.models.mergeskill) that merges the document content field with the text that was produced by the OCR skill.
305
+
In this section, you create a [`MergeSkill`](/dotnet/api/azure.search.documents.indexes.models.mergeskill) that merges the document content field with the text that was produced by the OCR skill.
The [`LanguageDetectionSkill`](/dotnet/api/azure.search.documents.indexes.models.languagedetectionskill) detects the language of the input text and reports a single language code for every document submitted on the request. We'll use the output of the **Language Detection** skill as part of the input to the **Text Split** skill.
344
+
The [`LanguageDetectionSkill`](/dotnet/api/azure.search.documents.indexes.models.languagedetectionskill) detects the language of the input text and reports a single language code for every document submitted on the request. We use the output of the **Language Detection** skill as part of the input to the **Text Split** skill.
The below [`SplitSkill`](/dotnet/api/azure.search.documents.indexes.models.splitskill)will split text by pages and limit the page length to 4,000 characters as measured by `String.Length`. The algorithm will try to split the text into chunks that are at most `maximumPageLength` in size. In this case, the algorithm will do its best to break the sentence on a sentence boundary, so the size of the chunk may be slightly less than `maximumPageLength`.
373
+
The below [`SplitSkill`](/dotnet/api/azure.search.documents.indexes.models.splitskill)splits text by pages and limits the page length to 4,000 characters as measured by `String.Length`. The algorithm tries to split the text into chunks that are at most `maximumPageLength` in size. In this case, the algorithm does its best to break the sentence on a sentence boundary, so the size of the chunk might be slightly less than `maximumPageLength`.
In this section, you define the index schema by specifying which fields to include in the searchable index, and the search attributes for each field. Fields have a type and can take attributes that determine how the field is used (searchable, sortable, and so forth). Field names in an index are not required to identically match the field names in the source. In a later step, you add field mappings in an indexer to connect source-destination fields. For this step, define the index using field naming conventions pertinent to your search application.
533
+
In this section, you define the index schema by specifying which fields to include in the searchable index, and the search attributes for each field. Fields have a type and can take attributes that determine how the field is used (searchable, sortable, and so forth). Field names in an index aren't required to identically match the field names in the source. In a later step, you add field mappings in an indexer to connect source-destination fields. For this step, define the index using field naming conventions pertinent to your search application.
534
534
535
535
This exercise uses the following fields and field types:
536
536
@@ -544,13 +544,13 @@ This exercise uses the following fields and field types:
544
544
545
545
#### Create DemoIndex Class
546
546
547
-
The fields for this index are defined using a model class. Each property of the model class has attributes which determine the search-related behaviors of the corresponding index field.
547
+
The fields for this index are defined using a model class. Each property of the model class has attributes that determine the search-related behaviors of the corresponding index field.
548
548
549
-
We'll add the model class to a new C# file. Right click on your project and select **Add** > **New Item...**, select "Class" and name the file `DemoIndex.cs`, then select **Add**.
549
+
We'll add the model class to a new C# file. Right select on your project and select **Add** > **New Item...**, select "Class" and name the file `DemoIndex.cs`, then select **Add**.
550
550
551
551
Make sure to indicate that you want to use types from the `Azure.Search.Documents.Indexes` and `System.Text.Json.Serialization` namespaces.
552
552
553
-
Add the below model class definition to `DemoIndex.cs` and include it in the same namespace where you'll create the index.
553
+
Add the below model class definition to `DemoIndex.cs` and include it in the same namespace where you create the index.
554
554
555
555
```csharp
556
556
usingAzure.Search.Documents.Indexes;
@@ -585,7 +585,7 @@ namespace EnrichwithAI
585
585
}
586
586
```
587
587
588
-
Now that you've defined a model class, back in `Program.cs` you can create an index definition fairly easily. The name for this index will be `demoindex`. If an index already exists with that name, it will be deleted.
588
+
Now that you've defined a model class, back in `Program.cs` you can create an index definition fairly easily. The name for this index will be `demoindex`. If an index already exists with that name, it's deleted.
During testing, you may find that you're attempting to create the index more than once. Because of this, check to see if the index that you're about to create already exists before attempting to create it.
623
+
During testing, you might find that you're attempting to create the index more than once. Because of this, check to see if the index that you're about to create already exists before attempting to create it.
624
624
625
625
Add the following lines to `Main`.
626
626
@@ -630,7 +630,7 @@ Console.WriteLine("Creating the index...");
`demoIndexerExecutionInfo` represents the current status and execution history of an indexer.
778
778
779
-
Warnings are common with some source file and skill combinations and do not always indicate a problem. In this tutorial, the warnings are benign (for example, no text inputs from the JPEG files).
779
+
Warnings are common with some source file and skill combinations and don't always indicate a problem. In this tutorial, the warnings are benign (for example, no text inputs from the JPEG files).
0 commit comments