Skip to content

Commit 02d2a0b

Browse files
Merge pull request #268985 from HeidiSteen/heidist-fix
[azure search] Revised the semi-structured JSON tutorial
2 parents f948b2b + a06cc50 commit 02d2a0b

File tree

4 files changed

+196
-154
lines changed

4 files changed

+196
-154
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
5555
5656
### Download files
5757

58-
Download a zip file of the sample data repository and extract the contents.
58+
Download a zip file of the sample data repository and extract the contents. [Learn how](https://docs.github.com/get-started/start-your-journey/downloading-files-from-github).
5959

6060
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media)
6161

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ Once content is extracted, the [skillset](cognitive-search-working-with-skillset
4949
5050
### Download files
5151

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.
52+
Download a zip file of the sample data repository and extract the contents. [Learn how](https://docs.github.com/get-started/start-your-journey/downloading-files-from-github).
53+
54+
+ [Sample data files (mixed media)](https://github.com/Azure-Samples/azure-search-sample-data/tree/main/ai-enrichment-mixed-media).
5355

5456
+ [Sample REST file](https://github.com/Azure-Samples/azure-search-rest-samples/tree/main/skillset-tutorial)
5557

@@ -122,7 +124,7 @@ POST {{baseUrl}}/datasources?api-version=2023-11-01 HTTP/1.1
122124

123125
### Step 2: Create a skillset
124126

125-
Call [Create Skillset](/rest/api/searchservice/create-skillset) to specify which enrichment steps are applied to your content.
127+
Call [Create Skillset](/rest/api/searchservice/create-skillset) to specify which enrichment steps are applied to your content. Skills execute in parallel unless there's a dependency.
126128

127129
```http
128130
### Create a skillset
@@ -309,7 +311,9 @@ POST {{baseUrl}}/skillsets?api-version=2023-11-01 HTTP/1.1
309311
310312
### Step 3: Create an index
311313

312-
Call [Create Index](/rest/api/searchservice/create-index) to provide the schema used to create inverted indexes and other constructs in Azure AI Search. The largest component of an index is the fields collection, where data type and attributes determine content and behavior in Azure AI Search.
314+
Call [Create Index](/rest/api/searchservice/create-index) to provide the schema used to create inverted indexes and other constructs in Azure AI Search.
315+
316+
The largest component of an index is the fields collection, where data type and attributes determine content and behavior in Azure AI Search. Make sure you have fields for your newly generated output.
313317

314318
```http
315319
### Create an index
@@ -398,7 +402,6 @@ POST {{baseUrl}}/indexes?api-version=2023-11-01 HTTP/1.1
398402
}
399403
```
400404

401-
402405
### Step 4: Create and run an indexer
403406

404407
Call [Create Indexer](/rest/api/searchservice/create-indexer) to drive the pipeline. The three components you have created thus far (data source, skillset, index) are inputs to an indexer. Creating the indexer on Azure AI Search is the event that puts the entire pipeline into motion.

articles/search/search-indexer-field-mappings.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Field mappings are added to the `fieldMappings` array of an indexer definition.
6363
| targetFieldName | Optional. Represents a field in your search index. If omitted, the value of `sourceFieldName` is assumed for the target. Target fields must be top-level simple fields or collections. It can't be a complex type or collection. If you're handling a data type issue, a field's data type is specified in the index definition. The field mapping just needs to have the field's name.|
6464
| mappingFunction | Optional. Consists of [predefined functions](#mappingFunctions) that transform data. |
6565

66+
If you get an error similar to `"Field mapping specifies target field 'Address/city' that doesn't exist in the index"`, it's because target field mappings can't be a complex type. The workaround is to create an index schema that's identical to the raw content for field names and data types. See [Tutorial: Index nested JSON blobs](search-semi-structured-data.md) for an example.
67+
6668
Azure AI Search uses case-insensitive comparison to resolve the field and function names in field mappings. This is convenient (you don't have to get all the casing right), but it means that your data source or index can't have fields that differ only by case.
6769

6870
> [!NOTE]
@@ -386,7 +388,7 @@ This function converts a string into a formatted JSON object. This can be used f
386388

387389
### Example - map text content to a complex field
388390

389-
Assume there is a SQL row with a JSON string that needs to be mapped to a (correspondingly defined) complex field in the index, the `toJson` function can be used to achieve this. For instance, if a complex field in the index needs to be populated with the following data:
391+
Assume there's a SQL row with a JSON string that needs to be mapped to a (correspondingly defined) complex field in the index, the `toJson` function can be used to achieve this. For instance, if a complex field in the index needs to be populated with the following data:
390392

391393
```JSON
392394
{

0 commit comments

Comments
 (0)