Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Search] Add ResetDocs API #15447

Merged
merged 6 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,7 @@ Rescan
reservationorders
resetapikey
resetconnection
resetdocs
resetvpnclientsharedkey
Resolvability
resourcegraph
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"endpoint": "https://myservice.search.windows.net",
"indexerName": "myindexer",
"api-version": "2021-04-30-preview",
"keysOrIds": {
"documentKeys": [
"documentKey1",
"documentKey2"
]
},
"overwrite": false
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,82 @@
}
}
},
"/indexers('{indexerName}')/search.resetdocs": {
"post": {
"tags": [
"Indexers"
],
"operationId": "Indexers_ResetDocs",
"x-ms-examples": {
"SearchServiceResetDocs": {
"$ref": "./examples/SearchServiceResetDocs.json"
}
},
"description": "Resets specific documents in the datasource to be selectively re-ingested by the indexer.",
"externalDocs": {
"url": "N/A"
},
"parameters": [
{
"name": "indexerName",
"in": "path",
"required": true,
"type": "string",
"description": "The name of the indexer to reset documents for."
},
{
"name": "keysOrIds",
"in": "body",
"required": false,
"schema": {
"type": "object",
"properties": {
"documentKeys": {
"type": "array",
"items": {
"type": "string"
},
"description": "document keys to be reset"
},
"datasourceDocumentIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "datasource document identifiers to be reset"
}
}
}
},
{
"name": "overwrite",
"in": "query",
"required": false,
"default": false,
"type": "boolean",
"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."
},
{
"$ref": "#/parameters/ClientRequestIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"x-ms-request-id": "request-id",
"responses": {
"204": {
"description": ""
},
"default": {
"description": "Error response.",
"schema": {
"$ref": "#/definitions/SearchError"
}
}
}
}
},
"/indexers('{indexerName}')/search.run": {
"post": {
"tags": [
Expand Down Expand Up @@ -6411,6 +6487,16 @@
"readOnly": true,
"description": "The outcome of this indexer execution."
},
"statusDetail": {
"$ref": "#/definitions/IndexerExecutionStatusDetail",
"readOnly": true,
"description": "The outcome of this indexer execution."
},
"currentState": {
"$ref": "#/definitions/IndexerCurrentState",
"readOnly": true,
"description": "All of the state that defines and dictates the indexer's current execution."
},
"errorMessage": {
"type": "string",
"readOnly": true,
Expand Down Expand Up @@ -6582,6 +6668,95 @@
"x-nullable": false,
"description": "Represents the overall indexer status."
},
"IndexerExecutionStatusDetail": {
"type": "string",
"enum": [
"resetDocs"
],
"x-ms-enum": {
"name": "IndexerExecutionStatusDetail",
"modelAsString": true,
"values": [
{
"value": "resetDocs",
"name": "ResetDocs",
"description": "Indicates that the reset that occurred was for a call to ResetDocs."
}
]
},
"description": "Details the status of an individual indexer execution."
},
"IndexerCurrentState": {
"properties": {
"mode": {
"$ref": "#/definitions/IndexingMode",
"readOnly": true,
"description": "The mode the indexer is running in."
},
"allDocsInitialChangeTrackingState": {
"type": "string",
"readOnly": true,
"description": "Change tracking state used when indexing all documents in the datasource starts."
shuyangmsft marked this conversation as resolved.
Show resolved Hide resolved
shuyangmsft marked this conversation as resolved.
Show resolved Hide resolved
},
"allDocsFinalChangeTrackingState": {
"type": "string",
"readOnly": true,
"description": "Change tracking state value when indexing all documents in the datasource finished."
shuyangmsft marked this conversation as resolved.
Show resolved Hide resolved
},
"resetDocsInitialChangeTrackingState": {
"type": "string",
"readOnly": true,
"description": "Change tracking state used when indexing select, reset documents in the datasource starts."
shuyangmsft marked this conversation as resolved.
Show resolved Hide resolved
},
"resetDocsFinalChangeTrackingState": {
"type": "string",
"readOnly": true,
"description": "Change tracking state value when indexing select, reset documents in the datasource finished."
shuyangmsft marked this conversation as resolved.
Show resolved Hide resolved
},
"resetDocumentKeys": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"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."
},
"resetDatasourceDocumentIds": {
"type": "array",
"items": {
"type": "string"
},
"readOnly": true,
"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."
}
},
"description": "Represents all of the state that defines and dictates the indexer's current execution."
},
"IndexingMode": {
"type": "string",
"enum": [
"indexingAllDocs",
"indexingResetDocs"
],
"x-ms-enum": {
"name": "IndexingMode",
"modelAsString": true,
"values": [
{
"value": "indexingAllDocs",
"name": "IndexingAllDocs",
"description": "The indexer is indexing all documents in the datasource."
},
{
"value": "indexingResetDocs",
"name": "indexingResetDocs",
"description": "The indexer is indexing selective, reset documents in the datasource. The documents being indexed are defined on indexer status."
}
]
},
"x-nullable": false,
"description": "Represents the mode the indexer is executing in."
},
"SearchIndexerLimits": {
"properties": {
"maxRunTime": {
Expand Down