Skip to content

Commit 2aac8fe

Browse files
authored
Merge pull request #189901 from HeidiSteen/heidist-work
Check indexer status
2 parents a4cbbc8 + e79dc1c commit 2aac8fe

File tree

2 files changed

+69
-37
lines changed

2 files changed

+69
-37
lines changed

articles/search/search-howto-connecting-azure-sql-database-to-azure-search-using-indexers.md

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ In a [search index](search-what-is-an-index.md), add fields to accept values fro
105105
106106
Indexer configuration specifies the inputs, parameters, and properties controlling run time behaviors.
107107
108-
1. [Create or update an indexer](/rest/api/searchservice/create-indexer) by giving it a name and referencing the data source and target index.
108+
1. [Create or update an indexer](/rest/api/searchservice/create-indexer) by giving it a name and referencing the data source and target index:
109109
110110
```http
111111
POST https://[service name].search.windows.net/indexers?api-version=2020-06-30
@@ -118,43 +118,48 @@ Indexer configuration specifies the inputs, parameters, and properties controlli
118118
"disabled": null,
119119
"schedule": null,
120120
"parameters": {
121-
"batchSize": null,
122-
"maxFailedItems": 0,
123-
"maxFailedItemsPerBatch": 0,
124-
"base64EncodeKeys": false,
125-
"configuration": {}
121+
"batchSize": null,
122+
"maxFailedItems": 0,
123+
"maxFailedItemsPerBatch": 0,
124+
"base64EncodeKeys": false,
125+
"configuration": {
126+
"queryTimeout": "00:05:00",
127+
"disableOrderByHighWaterMarkColumn": false
128+
}
126129
},
127130
"fieldMappings": [],
128131
"encryptionKey": null
129132
}
130133
```
131134
135+
1. Under parameter configuration, you can set a timeout for SQL query execution. In the example above, the timeout is 5 minutes. The second configuration setting is "disableOrderByHighWaterMarkColumn". It causes the SQL query used by the [high water mark policy](#HighWaterMarkPolicy) to omit the ORDER BY clause.
136+
132137
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.
133138
134139
1. See [Create an indexer](search-howto-create-indexers.md) for more information about other properties.
135140
136-
An indexer runs automatically when it's created. You can prevent this by setting "disabled" to true. To control indexer execution, [run an indexer on demand](search-howto-run-reset-indexers.md) or [put it on a schedule](search-howto-schedule-indexers.md).
141+
An indexer runs automatically when it's created. You can prevent this by setting "disabled" to true. To control indexer execution, [run an indexer on demand](search-howto-run-reset-indexers.md) or [put it on a schedule](search-howto-schedule-indexers.md).
137142
138143
## Check indexer status
139144
140-
To monitor the indexer status and execution history (number of items indexed, failures, etc.), use an **indexer status** request:
145+
To monitor the indexer status and execution history, send a [Get Indexer Status](/rest/api/searchservice/get-indexer-status) request:
141146
142147
```http
143-
GET https://myservice.search.windows.net/indexers/myindexer/status?api-version=2020-06-30
144-
api-key: admin-key
148+
GET https://myservice.search.windows.net/indexers/myindexer/status?api-version=2020-06-30
149+
Content-Type: application/json
150+
api-key: [admin key]
145151
```
146152

147-
The response should look similar to the following:
153+
The response includes status and the number of items processed. It should look similar to the following example:
148154

149155
```json
150156
{
151-
"@odata.context":"https://myservice.search.windows.net/$metadata#Microsoft.Azure.Search.V2015_02_28.IndexerExecutionInfo",
152157
"status":"running",
153158
"lastResult": {
154159
"status":"success",
155160
"errorMessage":null,
156-
"startTime":"2015-02-21T00:23:24.957Z",
157-
"endTime":"2015-02-21T00:36:47.752Z",
161+
"startTime":"2022-02-21T00:23:24.957Z",
162+
"endTime":"2022-02-21T00:36:47.752Z",
158163
"errors":[],
159164
"itemsProcessed":1599501,
160165
"itemsFailed":0,
@@ -166,8 +171,8 @@ The response should look similar to the following:
166171
{
167172
"status":"success",
168173
"errorMessage":null,
169-
"startTime":"2015-02-21T00:23:24.957Z",
170-
"endTime":"2015-02-21T00:36:47.752Z",
174+
"startTime":"2022-02-21T00:23:24.957Z",
175+
"endTime":"2022-02-21T00:36:47.752Z",
171176
"errors":[],
172177
"itemsProcessed":1599501,
173178
"itemsFailed":0,
@@ -179,8 +184,7 @@ The response should look similar to the following:
179184
}
180185
```
181186

182-
Execution history contains up to 50 of the most recently completed executions, which are sorted in the reverse chronological order (so that the latest execution comes first in the response).
183-
Additional information about the response can be found in [Get Indexer Status](/rest/api/searchservice/get-indexer-status)
187+
Execution history contains up to 50 of the most recently completed executions, which are sorted in the reverse chronological order so that the latest execution comes first.
184188

185189
<a name="CaptureChangedRows"></a>
186190

@@ -336,24 +340,6 @@ The **softDeleteMarkerValue** must be a string in the JSON representation of you
336340

337341
If you are setting up a soft delete policy from the Azure portal, don't add quotes around the soft delete marker value. The field contents are already understood as a string and will be translated automatically into a JSON string for you. In the examples above, simply type `1`, `True` or `true` into the portal's field.
338342

339-
## Configuration Settings
340-
SQL indexer exposes several configuration settings:
341-
342-
| Setting | Data type | Purpose | Default value |
343-
| --- | --- | --- | --- |
344-
| queryTimeout |string |Sets the timeout for SQL query execution |5 minutes ("00:05:00") |
345-
| disableOrderByHighWaterMarkColumn |bool |Causes the SQL query used by the high water mark policy to omit the ORDER BY clause. See [High Water Mark policy](#HighWaterMarkPolicy) |false |
346-
347-
These settings are used in the `parameters.configuration` object in the indexer definition. For example, to set the query timeout to 10 minutes, create or update the indexer with the following configuration:
348-
349-
```http
350-
{
351-
... other indexer definition properties
352-
"parameters" : {
353-
"configuration" : { "queryTimeout" : "00:10:00" } }
354-
}
355-
```
356-
357343
## FAQ
358344

359345
**Q: Can I use Azure SQL indexer with SQL databases running on IaaS VMs in Azure?**

articles/search/search-howto-index-cosmosdb.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,53 @@ Indexer configuration specifies the inputs, parameters, and properties controlli
231231
232232
1. See [Create an indexer](search-howto-create-indexers.md) for more information about other properties.
233233
234-
An indexer runs automatically when it's created. You can prevent this by setting "disabled" to true. To control indexer execution, [run an indexer on demand](search-howto-run-reset-indexers.md) or [put it on a schedule](search-howto-schedule-indexers.md).
234+
An indexer runs automatically when it's created. You can prevent this by setting "disabled" to true. To control indexer execution, [run an indexer on demand](search-howto-run-reset-indexers.md) or [put it on a schedule](search-howto-schedule-indexers.md).
235+
236+
## Check indexer status
237+
238+
To monitor the indexer status and execution history, send a [Get Indexer Status](/rest/api/searchservice/get-indexer-status) request:
239+
240+
```http
241+
GET https://myservice.search.windows.net/indexers/myindexer/status?api-version=2020-06-30
242+
Content-Type: application/json
243+
api-key: [admin key]
244+
```
245+
246+
The response includes status and the number of items processed. It should look similar to the following example:
247+
248+
```json
249+
{
250+
"status":"running",
251+
"lastResult": {
252+
"status":"success",
253+
"errorMessage":null,
254+
"startTime":"2022-02-21T00:23:24.957Z",
255+
"endTime":"2022-02-21T00:36:47.752Z",
256+
"errors":[],
257+
"itemsProcessed":1599501,
258+
"itemsFailed":0,
259+
"initialTrackingState":null,
260+
"finalTrackingState":null
261+
},
262+
"executionHistory":
263+
[
264+
{
265+
"status":"success",
266+
"errorMessage":null,
267+
"startTime":"2022-02-21T00:23:24.957Z",
268+
"endTime":"2022-02-21T00:36:47.752Z",
269+
"errors":[],
270+
"itemsProcessed":1599501,
271+
"itemsFailed":0,
272+
"initialTrackingState":null,
273+
"finalTrackingState":null
274+
},
275+
... earlier history items
276+
]
277+
}
278+
```
279+
280+
Execution history contains up to 50 of the most recently completed executions, which are sorted in the reverse chronological order so that the latest execution comes first.
235281

236282
<a name="DataChangeDetectionPolicy"></a>
237283

0 commit comments

Comments
 (0)