Skip to content

Commit 1df5cd4

Browse files
authored
[Search] Add ResetDocs API (Azure#15447)
* Add ResetDocs API * Fix PrettierCheck Error * Update SearchServiceResetDocs.json * Update searchservice.json * Update searchservice.json * Update searchservice.json
1 parent 4dc3917 commit 1df5cd4

File tree

3 files changed

+193
-0
lines changed

3 files changed

+193
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,7 @@ reseller
16361636
reservationorders
16371637
resetapikey
16381638
resetconnection
1639+
resetdocs
16391640
resetvpnclientsharedkey
16401641
Resolvability
16411642
resourcegraph
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"parameters": {
3+
"endpoint": "https://myservice.search.windows.net",
4+
"indexerName": "myindexer",
5+
"api-version": "2021-04-30-preview",
6+
"keysOrIds": {
7+
"documentKeys": [
8+
"documentKey1",
9+
"documentKey2"
10+
]
11+
},
12+
"overwrite": false
13+
},
14+
"responses": {
15+
"204": {}
16+
}
17+
}

specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,82 @@
332332
}
333333
}
334334
},
335+
"/indexers('{indexerName}')/search.resetdocs": {
336+
"post": {
337+
"tags": [
338+
"Indexers"
339+
],
340+
"operationId": "Indexers_ResetDocs",
341+
"x-ms-examples": {
342+
"SearchServiceResetDocs": {
343+
"$ref": "./examples/SearchServiceResetDocs.json"
344+
}
345+
},
346+
"description": "Resets specific documents in the datasource to be selectively re-ingested by the indexer.",
347+
"externalDocs": {
348+
"url": "N/A"
349+
},
350+
"parameters": [
351+
{
352+
"name": "indexerName",
353+
"in": "path",
354+
"required": true,
355+
"type": "string",
356+
"description": "The name of the indexer to reset documents for."
357+
},
358+
{
359+
"name": "keysOrIds",
360+
"in": "body",
361+
"required": false,
362+
"schema": {
363+
"type": "object",
364+
"properties": {
365+
"documentKeys": {
366+
"type": "array",
367+
"items": {
368+
"type": "string"
369+
},
370+
"description": "document keys to be reset"
371+
},
372+
"datasourceDocumentIds": {
373+
"type": "array",
374+
"items": {
375+
"type": "string"
376+
},
377+
"description": "datasource document identifiers to be reset"
378+
}
379+
}
380+
}
381+
},
382+
{
383+
"name": "overwrite",
384+
"in": "query",
385+
"required": false,
386+
"default": false,
387+
"type": "boolean",
388+
"description": "If false, keys or ids will be appended to existing ones. If true, only the keys or ids in this payload will be queued to be re-ingested."
389+
},
390+
{
391+
"$ref": "#/parameters/ClientRequestIdParameter"
392+
},
393+
{
394+
"$ref": "#/parameters/ApiVersionParameter"
395+
}
396+
],
397+
"x-ms-request-id": "request-id",
398+
"responses": {
399+
"204": {
400+
"description": ""
401+
},
402+
"default": {
403+
"description": "Error response.",
404+
"schema": {
405+
"$ref": "#/definitions/SearchError"
406+
}
407+
}
408+
}
409+
}
410+
},
335411
"/indexers('{indexerName}')/search.run": {
336412
"post": {
337413
"tags": [
@@ -6438,6 +6514,16 @@
64386514
"readOnly": true,
64396515
"description": "The outcome of this indexer execution."
64406516
},
6517+
"statusDetail": {
6518+
"$ref": "#/definitions/IndexerExecutionStatusDetail",
6519+
"readOnly": true,
6520+
"description": "The outcome of this indexer execution."
6521+
},
6522+
"currentState": {
6523+
"$ref": "#/definitions/IndexerCurrentState",
6524+
"readOnly": true,
6525+
"description": "All of the state that defines and dictates the indexer's current execution."
6526+
},
64416527
"errorMessage": {
64426528
"type": "string",
64436529
"readOnly": true,
@@ -6609,6 +6695,95 @@
66096695
"x-nullable": false,
66106696
"description": "Represents the overall indexer status."
66116697
},
6698+
"IndexerExecutionStatusDetail": {
6699+
"type": "string",
6700+
"enum": [
6701+
"resetDocs"
6702+
],
6703+
"x-ms-enum": {
6704+
"name": "IndexerExecutionStatusDetail",
6705+
"modelAsString": true,
6706+
"values": [
6707+
{
6708+
"value": "resetDocs",
6709+
"name": "ResetDocs",
6710+
"description": "Indicates that the reset that occurred was for a call to ResetDocs."
6711+
}
6712+
]
6713+
},
6714+
"description": "Details the status of an individual indexer execution."
6715+
},
6716+
"IndexerCurrentState": {
6717+
"properties": {
6718+
"mode": {
6719+
"$ref": "#/definitions/IndexingMode",
6720+
"readOnly": true,
6721+
"description": "The mode the indexer is running in."
6722+
},
6723+
"allDocsInitialChangeTrackingState": {
6724+
"type": "string",
6725+
"readOnly": true,
6726+
"description": "Change tracking state used when indexing starts on all documents in the datasource."
6727+
},
6728+
"allDocsFinalChangeTrackingState": {
6729+
"type": "string",
6730+
"readOnly": true,
6731+
"description": "Change tracking state value when indexing finishes on all documents in the datasource."
6732+
},
6733+
"resetDocsInitialChangeTrackingState": {
6734+
"type": "string",
6735+
"readOnly": true,
6736+
"description": "Change tracking state used when indexing starts on select, reset documents in the datasource."
6737+
},
6738+
"resetDocsFinalChangeTrackingState": {
6739+
"type": "string",
6740+
"readOnly": true,
6741+
"description": "Change tracking state value when indexing finishes on select, reset documents in the datasource."
6742+
},
6743+
"resetDocumentKeys": {
6744+
"type": "array",
6745+
"items": {
6746+
"type": "string"
6747+
},
6748+
"readOnly": true,
6749+
"description": "The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys."
6750+
},
6751+
"resetDatasourceDocumentIds": {
6752+
"type": "array",
6753+
"items": {
6754+
"type": "string"
6755+
},
6756+
"readOnly": true,
6757+
"description": "The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids."
6758+
}
6759+
},
6760+
"description": "Represents all of the state that defines and dictates the indexer's current execution."
6761+
},
6762+
"IndexingMode": {
6763+
"type": "string",
6764+
"enum": [
6765+
"indexingAllDocs",
6766+
"indexingResetDocs"
6767+
],
6768+
"x-ms-enum": {
6769+
"name": "IndexingMode",
6770+
"modelAsString": true,
6771+
"values": [
6772+
{
6773+
"value": "indexingAllDocs",
6774+
"name": "IndexingAllDocs",
6775+
"description": "The indexer is indexing all documents in the datasource."
6776+
},
6777+
{
6778+
"value": "indexingResetDocs",
6779+
"name": "indexingResetDocs",
6780+
"description": "The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status."
6781+
}
6782+
]
6783+
},
6784+
"x-nullable": false,
6785+
"description": "Represents the mode the indexer is executing in."
6786+
},
66126787
"SearchIndexerLimits": {
66136788
"properties": {
66146789
"maxRunTime": {

0 commit comments

Comments
 (0)