你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

Indexers - Get Status

返回索引器的当前状态和执行历史记录。

GET {endpoint}/indexers('{indexerName}')/search.status?api-version=2025-08-01-preview

URI 参数

名称 在 必需 类型 说明
endpoint
path True

string

搜索服务的终结点 URL。

indexerName
path True

string

要检索其状态的索引器的名称。

api-version
query True

string

客户端 API 版本。

请求头

名称 必需 类型 说明
x-ms-client-request-id

string (uuid)

随请求一起发送的跟踪 ID,以帮助调试。

响应

名称 类型 说明
200 OK

SearchIndexerStatus

Other Status Codes

ErrorResponse

错误响应。

示例

SearchServiceGetIndexerStatus

示例请求

GET https://previewexampleservice.search.windows.net/indexers('myindexer')/search.status?api-version=2025-08-01-preview

示例响应

{
  "name": "myindexer",
  "status": "running",
  "lastResult": {
    "status": "success",
    "startTime": "2014-11-26T03:37:18.853Z",
    "endTime": "2014-11-26T03:37:19.012Z",
    "itemsProcessed": 11,
    "itemsFailed": 0,
    "mode": "indexingAllDocs",
    "errors": [],
    "warnings": []
  },
  "executionHistory": [
    {
      "status": "success",
      "startTime": "2014-11-26T03:37:18.853Z",
      "endTime": "2014-11-26T03:37:19.012Z",
      "itemsProcessed": 11,
      "itemsFailed": 0,
      "mode": "indexingAllDocs",
      "errors": [],
      "warnings": []
    },
    {
      "status": "transientFailure",
      "startTime": "2014-11-26T03:28:10.125Z",
      "endTime": "2014-11-26T03:28:12.007Z",
      "itemsProcessed": 1,
      "itemsFailed": 2,
      "mode": "indexingAllDocs",
      "errors": [
        {
          "key": "",
          "statusCode": 400,
          "errorMessage": "Document key cannot be missing or empty."
        },
        {
          "key": "document id 1",
          "statusCode": 400,
          "name": "DocumentExtraction.AzureBlob.MyDataSource",
          "errorMessage": "Could not read the value of column 'foo' at index '0'.",
          "details": "The file could not be parsed.",
          "documentationLink": "https://go.microsoft.com/fwlink/?linkid=2049388"
        }
      ],
      "warnings": [
        {
          "key": "document id",
          "message": "A warning doesn't stop indexing, and is intended to inform you of certain interesting situations, like when a blob indexer truncates the amount of text extracted from a blob."
        },
        {
          "key": "document id 2",
          "name": "Enrichment.LanguageDetectionSkill.#4",
          "message": "Document was truncated to 50000 characters.",
          "details": "The skill did something that didn't break anything, nonetheless something we didn't expect happened, so it might be worth double checking.",
          "documentationLink": "https://go.microsoft.com/fwlink/?linkid=2099692"
        }
      ]
    }
  ],
  "limits": {
    "maxRunTime": "PT22H",
    "maxDocumentExtractionSize": 256000000,
    "maxDocumentContentCharactersToExtract": 4000000
  },
  "currentState": {
    "mode": "indexingAllDocs",
    "resetDocumentKeys": [],
    "resetDatasourceDocumentIds": []
  }
}

定义

名称 说明
ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

IndexerCurrentState

表示定义和指示索引器当前执行的所有状态。

IndexerExecutionResult

表示单个索引器执行的结果。

IndexerExecutionStatus

表示单个索引器执行的状态。

IndexerExecutionStatusDetail

详细说明单个索引器执行的状态。

IndexerStatus

表示总体索引器状态。

IndexingMode

表示索引器正在执行的模式。

SearchIndexerError

表示项级或文档级索引错误。

SearchIndexerLimits
SearchIndexerStatus

表示索引器的当前状态和执行历史记录。

SearchIndexerWarning

表示项级警告。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

IndexerCurrentState

表示定义和指示索引器当前执行的所有状态。

名称 类型 说明
allDocsFinalTrackingState

string

更改数据源中所有文档的索引完成时的跟踪状态值。

allDocsInitialTrackingState

string

在数据源中的所有文档上开始索引时使用的更改跟踪状态。

mode

IndexingMode

索引器运行的模式。

resetDatasourceDocumentIds

string[]

已重置的数据源文档 ID 列表。 数据源文档 ID 是数据源中数据的唯一标识符。 索引器将优先选择性地重新引入这些 ID。

resetDocsFinalTrackingState

string

更改索引完成时的跟踪状态值,选择、重置数据源中的文档。

resetDocsInitialTrackingState

string

更改索引开始时使用的跟踪状态,选择、重置数据源中的文档。

resetDocumentKeys

string[]

已重置的文档键列表。 文档键是搜索索引中数据的文档的唯一标识符。 索引器将优先选择性地重新引入这些键。

resyncFinalTrackingState

string

在数据源中的选择性选项上完成索引时更改跟踪状态值。

resyncInitialTrackingState

string

在数据源中的选择性选项上开始索引时使用的更改跟踪状态。

IndexerExecutionResult

表示单个索引器执行的结果。

名称 类型 说明
endTime

string (date-time)

此索引器执行的结束时间(如果执行已完成)。

errorMessage

string

指示顶级错误(如果有)的错误消息。

errors

SearchIndexerError[]

项级索引错误。

finalTrackingState

string

更改索引器执行完成的跟踪状态。

initialTrackingState

string

更改索引器执行开始时使用的跟踪状态。

itemsFailed

integer (int32)

在此索引器执行期间无法编制索引的项数。

itemsProcessed

integer (int32)

在此索引器执行期间处理的项数。 这包括成功处理的项和尝试编制索引但失败的项。

mode

IndexingMode

索引器运行的模式。

startTime

string (date-time)

此索引器执行的开始时间。

status

IndexerExecutionStatus

此索引器执行的结果。

statusDetail

IndexerExecutionStatusDetail

此索引器执行的结果。

warnings

SearchIndexerWarning[]

项级索引警告。

IndexerExecutionStatus

表示单个索引器执行的状态。

值 说明
transientFailure

索引器调用失败,但失败可能是暂时性的。 索引器调用将按计划继续进行。

success

索引器执行已成功完成。

inProgress

索引器执行正在进行中。

reset

索引器已重置。

IndexerExecutionStatusDetail

详细说明单个索引器执行的状态。

值 说明
resetDocs

指示发生的重置是针对对 ResetDocs 的调用。

resync

指示根据数据源中的选项有选择地重新同步。

IndexerStatus

表示总体索引器状态。

值 说明
unknown

指示索引器处于未知状态。

error

指示索引器遇到错误,如果没有人工干预,该错误无法更正。

running

指示索引器正在正常运行。

IndexingMode

表示索引器正在执行的模式。

值 说明
indexingAllDocs

索引器正在为数据源中的所有文档编制索引。

indexingResetDocs

索引器正在索引数据源中的选择性重置文档。 要编制索引的文档是根据索引器状态定义的。

indexingResync

索引器正在重新同步和索引数据源中的选择性选项 () 。

SearchIndexerError

表示项级或文档级索引错误。

名称 类型 说明
details

string

有关错误的其他详细详细信息,以帮助调试索引器。 这可能并不总是可用。

documentationLink

string

指向这些错误类别的故障排除指南的链接。 这可能并不总是可用。

errorMessage

string

描述处理项目时发生的错误的消息。

key

string

索引编制失败的项的键。

name

string

错误源的名称。 例如,这可以指附加技能集中的特定技能。 这可能并不总是可用。

statusCode

integer (int32)

指示索引作失败原因的状态代码。 可能的值包括:400 表示格式错误的输入文档,404 表示找不到文档,409 表示版本冲突,422 表示索引暂时不可用,或 503 表示服务太忙时。

SearchIndexerLimits

名称 类型 说明
maxDocumentContentCharactersToExtract

number (int64)

将从为索引的文档中提取的最大字符数。

maxDocumentExtractionSize

number (int64)

文档的最大大小(以字节为单位),将被视为对索引有效。

maxRunTime

string (duration)

允许索引器运行一次执行的最长时间。

SearchIndexerStatus

表示索引器的当前状态和执行历史记录。

名称 类型 说明
currentState

IndexerCurrentState

定义和指示索引器当前执行的所有状态。

executionHistory

IndexerExecutionResult[]

最近索引器执行的历史记录,按时间倒序排序。

lastResult

IndexerExecutionResult

最近执行索引器或正在执行索引器的结果。

limits

SearchIndexerLimits

索引器的执行限制。

name

string

索引器的名称。

status

IndexerStatus

总体索引器状态。

SearchIndexerWarning

表示项级警告。

名称 类型 说明
details

string

有关警告的其他详细详细信息,以帮助调试索引器。 这可能并不总是可用。

documentationLink

string

指向这些类别警告的故障排除指南的链接。 这可能并不总是可用。

key

string

生成警告的项的键。

message

string

描述处理项目时发生的警告的消息。

name

string

发出警告的源的名称。 例如,这可以指附加技能集中的特定技能。 这可能并不总是可用。