Skip to content

Commit a4cbbc8

Browse files
authored
Merge pull request #189899 from HeidiSteen/heidist-work
Configure indexer section
2 parents d14d1bd + 17ee3cb commit a4cbbc8

File tree

2 files changed

+29
-38
lines changed

2 files changed

+29
-38
lines changed

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

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,43 @@ In a [search index](search-what-is-an-index.md), add fields to accept values fro
9999
| uniqueidentifer |Edm.String | |
100100
| geography |Edm.GeographyPoint |Only geography instances of type POINT with SRID 4326 (which is the default) are supported |
101101
| rowversion |Not applicable |Row-version columns cannot be stored in the search index, but they can be used for change tracking |
102-
| time, timespan, binary, varbinary, image, xml, geometry, CLR types |N/A |Not supported |
102+
| time, timespan, binary, varbinary, image, xml, geometry, CLR types |Not applicable |Not supported |
103103
104104
## Configure and run the Azure SQL indexer
105105
106-
Create the indexer by giving it a name and referencing the data source and target index:
106+
Indexer configuration specifies the inputs, parameters, and properties controlling run time behaviors.
107107
108-
```http
109-
POST https://myservice.search.windows.net/indexers?api-version=2020-06-30
110-
Content-Type: application/json
111-
api-key: admin-key
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.
112109
110+
```http
111+
POST https://[service name].search.windows.net/indexers?api-version=2020-06-30
112+
Content-Type: application/json
113+
api-key: [search service admin key]
113114
{
114-
"name" : "myindexer",
115-
"dataSourceName" : "myazuresqldatasource",
116-
"targetIndexName" : "target index name"
115+
"name" : "[my-sqldb-indexer]",
116+
"dataSourceName" : "[my-sqldb-ds]",
117+
"targetIndexName" : "[my-search-index]",
118+
"disabled": null,
119+
"schedule": null,
120+
"parameters": {
121+
"batchSize": null,
122+
"maxFailedItems": 0,
123+
"maxFailedItemsPerBatch": 0,
124+
"base64EncodeKeys": false,
125+
"configuration": {}
126+
},
127+
"fieldMappings": [],
128+
"encryptionKey": null
117129
}
118-
```
130+
```
119131
120-
An indexer created in this way doesn’t have a schedule. It automatically runs once when it’s created. You can run it again at any time using a **run indexer** request:
132+
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.
121133
122-
```http
123-
POST https://myservice.search.windows.net/indexers/myindexer/run?api-version=2020-06-30
124-
api-key: admin-key
125-
```
134+
1. See [Create an indexer](search-howto-create-indexers.md) for more information about other properties.
126135
127-
You can customize several aspects of indexer behavior, such as batch size and how many documents can be skipped before an indexer execution fails. For more information, see [Create Indexer API](/rest/api/searchservice/Create-Indexer).
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).
128137
129-
You may need to allow Azure services to connect to your database. See [Connecting From Azure](../azure-sql/database/firewall-configure.md) for instructions on how to do that.
138+
## Check indexer status
130139
131140
To monitor the indexer status and execution history (number of items indexed, failures, etc.), use an **indexer status** request:
132141
@@ -173,26 +182,6 @@ The response should look similar to the following:
173182
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).
174183
Additional information about the response can be found in [Get Indexer Status](/rest/api/searchservice/get-indexer-status)
175184

176-
## Run indexers on a schedule
177-
178-
You can also arrange the indexer to run periodically on a schedule. To do this, add the **schedule** property when creating or updating the indexer. The example below shows a PUT request to update the indexer:
179-
180-
```http
181-
PUT https://myservice.search.windows.net/indexers/myindexer?api-version=2020-06-30
182-
Content-Type: application/json
183-
api-key: admin-key
184-
185-
{
186-
"dataSourceName" : "myazuresqldatasource",
187-
"targetIndexName" : "target index name",
188-
"schedule" : { "interval" : "PT10M", "startTime" : "2015-01-01T00:00:00Z" }
189-
}
190-
```
191-
192-
The **interval** parameter is required. The interval refers to the time between the start of two consecutive indexer executions. The smallest allowed interval is 5 minutes; the longest is one day. It must be formatted as an XSD "dayTimeDuration" value (a restricted subset of an [ISO 8601 duration](https://www.w3.org/TR/xmlschema11-2/#dayTimeDuration) value). The pattern for this is: `P(nD)(T(nH)(nM))`. Examples: `PT15M` for every 15 minutes, `PT2H` for every 2 hours.
193-
194-
For more information about defining indexer schedules see [How to schedule indexers for Azure Cognitive Search](search-howto-schedule-indexers.md).
195-
196185
<a name="CaptureChangedRows"></a>
197186

198187
## Indexing new, changed, and deleted rows

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ In a [search index](search-what-is-an-index.md), add fields to accept the source
203203
204204
Indexer configuration specifies the inputs, parameters, and properties controlling run time behaviors.
205205
206-
1. [Create or update an indexer](/rest/api/searchservice/create-indexer) to use the predefined data source and search index.
206+
1. [Create or update an indexer](/rest/api/searchservice/create-indexer) by giving it a name and referencing the data source and target index.
207207
208208
```http
209209
POST https://[service name].search.windows.net/indexers?api-version=2020-06-30
@@ -231,6 +231,8 @@ 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).
235+
234236
<a name="DataChangeDetectionPolicy"></a>
235237
236238
## Indexing changed documents

0 commit comments

Comments
 (0)