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
+ Tables containing text. If you have binary data, you can include[AI enrichment](cognitive-search-concept-intro.md) for image analysis.
25
+
+ Tables containing text. If you have binary data, consider[AI enrichment](cognitive-search-concept-intro.md) for image analysis.
26
26
27
-
+ Read permissions to access Azure Storage. A "full access" connection string includes a key that gives access to the content, but if you're using Azure roles, make sure the [search service managed identity](search-howto-managed-identities-data-sources.md) has **Data and Reader** permissions.
27
+
+ Read permissions on Azure Storage. A "full access" connection string includes a key that gives access to the content, but if you're using Azure roles, make sure the [search service managed identity](search-howto-managed-identities-data-sources.md) has **Data and Reader** permissions.
28
28
29
-
+A REST client, such as [Postman](search-get-started-rest.md), to send REST calls that create the data source, index, and indexer.
29
+
+Use a REST client, such as [Postman app](https://www.postman.com/downloads/), if you want to formulate REST calls similar to the ones shown in this article.
30
30
31
31
## Define the data source
32
32
33
-
The data source definition specifies the data to index, credentials, and policies for identifying changes in the data. A data source is defined as an independent resource so that it can be used by multiple indexers.
33
+
The data source definition specifies the source data to index, credentials, and policies for change detection. A data source is an independent resource that can be used by multiple indexers.
34
34
35
-
1.[Create or update a data source](/rest/api/searchservice/create-data-source) to set its definition:
35
+
1.[Create or update a data source](/rest/api/searchservice/create-data-source) to set its definition:
36
36
37
-
```json
37
+
```http
38
+
POST https://[service name].search.windows.net/datasources?api-version=2020-06-30
1. Set "credentials" to an Azure Storage connection string. The next section describes the supported formats.
49
61
50
62
1. Set "container" to the name of the table.
51
63
52
-
1. Optionally, set "query" to a filter on PartitionKey. This is a best practice that improves performance. If "query" is specified any other way, the indexer will execute a full table scan, resulting in poor performance if the tables are large.
64
+
1. Optionally, set "query" to a filter on PartitionKey. Setting this property is a best practice that improves performance. If "query" is null, the indexer executes a full table scan, which can result in poor performance if the tables are large.
53
65
54
66
A data source definition can also include [soft deletion policies](search-howto-index-changed-deleted-blobs.md), if you want the indexer to delete a search document when the source document is flagged for deletion.
55
67
@@ -80,7 +92,7 @@ Indexers can connect to a table using the following connections.
80
92
| The SAS should have the list and read permissions on the container. For more information, see [Using Shared Access Signatures](../storage/common/storage-sas-overview.md). |
81
93
82
94
> [!NOTE]
83
-
> If you use SAS credentials, you will need to update the data source credentials periodically with renewed signatures to prevent their expiration. If SAS credentials expire, the indexer will fail with an error message similar to "Credentials provided in the connection string are invalid or have expired".
95
+
> If you use SAS credentials, you'll need to update the data source credentials periodically with renewed signatures to prevent their expiration. When SAS credentials expire, the indexer will fail with an error message similar to "Credentials provided in the connection string are invalid or have expired".
84
96
85
97
<aname="Performance"></a>
86
98
@@ -100,7 +112,7 @@ To avoid a full scan, you can use table partitions to narrow the scope of each i
100
112
101
113
+ Monitor indexer progress by using [Get Indexer Status API](/rest/api/searchservice/get-indexer-status), and periodically update the `<TimeStamp>` condition of the query based on the latest successful high-water-mark value.
102
114
103
-
+ With this approach, if you need to trigger a complete reindexing, you need to reset the data source query in addition to resetting the indexer.
115
+
+ With this approach, if you need to trigger a full reindex, reset the data source query in addition to [resetting the indexer](search-howto-run-reset-indexers.md).
104
116
105
117
## Add search fields to an index
106
118
@@ -113,47 +125,72 @@ In a [search index](search-what-is-an-index.md), add fields to accept the conten
1. Create a document key field ("key": true), but allow the indexer to populate it automatically. Do not define a field mapping to alternative unique string field in your table.
134
+
1. Create a document key field ("key": true), but allow the indexer to populate it automatically. A table indexer populates the key field with concatenated partition and row keys from the table. For example, if a row’s PartitionKey is `1` and RowKey is `1_123`, then the key value is `11_123`. If the partition key is null, just the row key is used.
135
+
136
+
If you're using the Import data wizard to create the index, the portal infers a "Key" field for the search index and uses an implicit field mapping to connect the source and destination fields. You don't have to add the field yourself, and you don't need to set up a field mapping.
123
137
124
-
A table indexer populates the key field with concatenated partition and row keys from the table. For example, if a row’s PartitionKey is `PK1` and RowKey is `RK1`, then the key value is `PK1RK1`. If the partition key is null, just the row key is used.
138
+
If you're using the REST APIs and you want implicit field mappings, create and name the document key field "Key" in the search index definition as shown in the previous step (`{ "name": "Key", "type": "Edm.String", "key": true, "searchable": false }`). The indexer populates the Key field automatically, with no field mappings required.
125
139
126
-
1. Create additional fields that correspond to entity fields. For example, if an entity looks like the following example, your search index should have fields for HotelName, Description, and Category.
140
+
If you don't want a field named "Key" in your search index, add an explicit field mapping in the indexer definition with the field name you want, setting the source field to "Key":
141
+
142
+
```json
143
+
"fieldMappings" : [
144
+
{
145
+
"sourceFieldName" : "Key",
146
+
"targetFieldName" : "MyDocumentKeyFieldName"
147
+
}
148
+
]
149
+
```
150
+
151
+
1. Now add any other entity fields that you want in your index. For example, if an entity looks like the following example, your search index should have fields for HotelName, Description, and Category to receive those values.
127
152
128
153
:::image type="content" source="media/search-howto-indexing-tables/table.png" alt-text="Screenshot of table content in Storage browser." border="true":::
129
154
130
-
Using the same names and compatible [data types](/rest/api/searchservice/supported-data-types) minimizes the need for [field mappings](search-indexer-field-mappings.md).
155
+
Using the same names and compatible [data types](/rest/api/searchservice/supported-data-types) minimizes the need for [field mappings](search-indexer-field-mappings.md). When names and types are the same, the indexer can determine the data path automatically.
131
156
132
157
## Configure and run the table indexer
133
158
134
-
Once the index and data source have been created, you're ready to create the indexer. Indexer configuration specifies the inputs, parameters, and properties controlling run time behaviors.
159
+
Once you have an index and data source, you're ready to create the indexer. Indexer configuration specifies the inputs, parameters, and properties controlling run time behaviors.
135
160
136
161
1.[Create or update an indexer](/rest/api/searchservice/create-indexer) by giving it a name and referencing the data source and target index:
137
162
138
163
```http
139
164
POST https://[service name].search.windows.net/indexers?api-version=2020-06-30
140
165
{
141
-
"name" : "table-indexer",
142
-
"dataSourceName" : "my-table-datasource",
166
+
"name" : "my-table-indexer",
167
+
"dataSourceName" : "my-table-storage-ds",
143
168
"targetIndexName" : "my-search-index",
144
-
"parameters": {
145
-
"batchSize": null,
146
-
"maxFailedItems": null,
147
-
"maxFailedItemsPerBatch": null,
148
-
"base64EncodeKeys": null,
149
-
"configuration:" { }
169
+
"disabled": null,
170
+
"schedule": null,
171
+
"parameters" : {
172
+
"batchSize" : null,
173
+
"maxFailedItems" : null,
174
+
"maxFailedItemsPerBatch" : null,
175
+
"base64EncodeKeys" : null,
176
+
"configuration" : { }
150
177
},
151
-
"schedule" : { },
152
-
"fieldMappings" : [ ]
178
+
"fieldMappings" : [ ],
179
+
"cache": null,
180
+
"encryptionKey": null
153
181
}
154
182
```
155
183
156
-
1. [Specify field mappings](search-indexer-field-mappings.md) if there are differences in field name or type, or if you need multiple versions of a source field in the search index.
184
+
1. [Specify field mappings](search-indexer-field-mappings.md) if there are differences in field name or type, or if you need multiple versions of a source field in the search index. The Target field is the name of the field in the search index.
185
+
186
+
```json
187
+
"fieldMappings" : [
188
+
{
189
+
"sourceFieldName" : "Description",
190
+
"targetFieldName" : "HotelDescription"
191
+
}
192
+
]
193
+
```
157
194
158
195
1. See [Create an indexer](search-howto-create-indexers.md) for more information about other properties.
159
196
@@ -177,8 +214,8 @@ The response includes status and the number of items processed. It should look s
177
214
"lastResult": {
178
215
"status":"success",
179
216
"errorMessage":null,
180
-
"startTime":"2022-02-21T00:23:24.957Z",
181
-
"endTime":"2022-02-21T00:36:47.752Z",
217
+
"startTime":"2023-02-21T00:23:24.957Z",
218
+
"endTime":"2023-02-21T00:36:47.752Z",
182
219
"errors":[],
183
220
"itemsProcessed":1599501,
184
221
"itemsFailed":0,
@@ -190,8 +227,8 @@ The response includes status and the number of items processed. It should look s
190
227
{
191
228
"status":"success",
192
229
"errorMessage":null,
193
-
"startTime":"2022-02-21T00:23:24.957Z",
194
-
"endTime":"2022-02-21T00:36:47.752Z",
230
+
"startTime":"2023-02-21T00:23:24.957Z",
231
+
"endTime":"2023-02-21T00:36:47.752Z",
195
232
"errors":[],
196
233
"itemsProcessed":1599501,
197
234
"itemsFailed":0,
@@ -207,7 +244,7 @@ Execution history contains up to 50 of the most recently completed executions, w
207
244
208
245
## Next steps
209
246
210
-
You can now[run the indexer](search-howto-run-reset-indexers.md), [monitor status](search-howto-monitor-indexers.md), or [schedule indexer execution](search-howto-schedule-indexers.md). The following articles apply to indexers that pull content from Azure Storage:
247
+
Learn more about how to[run the indexer](search-howto-run-reset-indexers.md), [monitor status](search-howto-monitor-indexers.md), or [schedule indexer execution](search-howto-schedule-indexers.md). The following articles apply to indexers that pull content from Azure Storage:
211
248
212
-
+[Index large data sets](search-howto-large-index.md)
213
-
+[Indexer access to content protected by Azure network security features](search-indexer-securing-resources.md)
249
+
+[Tutorial: Index JSON blobs from Azure Storage](search-semi-structured-data.md)
250
+
+[Tutorial: Index encrypted blobs in Azure Storage](search-howto-index-encrypted-blobs.md)
Copy file name to clipboardExpand all lines: articles/search/search-security-trimming-for-azure-search-with-aad.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This article covers the following tasks:
22
22
> - Cache the new groups
23
23
> - Index documents with associated groups
24
24
> - Issue a search request with group identifiers filter
25
-
>
25
+
26
26
> [!NOTE]
27
27
> Sample code snippets in this article are written in C#. You can find the full source code [on GitHub](https://github.com/Azure-Samples/search-dotnet-getting-started).
|[**ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search (GitHub)**](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/README.md)| Sample | Python code and a template for combining Cognitive Search with the large language models in OpenAI. For background, see this Tech Community blog post: [Revolutionize your Enterprise Data with ChatGPT](https://techcommunity.microsoft.com/t5/ai-applied-ai-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w/ba-p/3762087). To summarize the key points: <ul><li>Use Cognitive Search to consolidate and index searchable content.</li> <li>Query the index for initial search results.</li> <li>Assemble prompts from those results and send to the gpt-35-turbo (preview) model in Azure OpenAI.</li> <li>Return a summary and provide citations and transparency in your customer-facing app so that users can evaluate the response.</li> </ul>|
25
+
|[**ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search (GitHub)**](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/README.md)| Sample | Python code and a template for combining Cognitive Search with the large language models in OpenAI. For background, see this Tech Community blog post: [Revolutionize your Enterprise Data with ChatGPT](https://techcommunity.microsoft.com/t5/ai-applied-ai-blog/revolutionize-your-enterprise-data-with-chatgpt-next-gen-apps-w/ba-p/3762087). <br><br>Key points: <br><br>Use Cognitive Search to consolidate and index searchable content.</br> <br>Query the index for initial search results.</br> <br>Assemble prompts from those results and send to the gpt-35-turbo (preview) model in Azure OpenAI.</br> <br>Return a cross-document answer and provide citations and transparency in your customer-facing app so that users can assess the response.</br>|
0 commit comments