Indexers - Get Status

傳回索引器目前的狀態和執行歷程記錄。

GET {endpoint}/indexers('{indexerName}')/search.status?api-version=2023-11-01

URI 參數

名稱 位於 必要 類型 Description
endpoint
path True

string

搜尋服務的端點 URL。

indexerName
path True

string

要為其擷取狀態的索引器名稱。

api-version
query True

string

用戶端 API 版本。

要求標頭

名稱 必要 類型 Description
x-ms-client-request-id

string (uuid)

隨要求一起傳送的追蹤標識碼,以協助偵錯。

回應

名稱 類型 Description
200 OK

SearchIndexerStatus

Other Status Codes

SearchError

錯誤回應。

範例

SearchServiceGetIndexerStatus

範例要求

GET https://myservice.search.windows.net/indexers('myindexer')/search.status?api-version=2023-11-01

範例回覆

{
  "status": "running",
  "lastResult": {
    "status": "success",
    "errorMessage": null,
    "startTime": "2014-11-26T03:37:18.853Z",
    "endTime": "2014-11-26T03:37:19.012Z",
    "errors": [],
    "warnings": [],
    "itemsProcessed": 11,
    "itemsFailed": 0,
    "initialTrackingState": null,
    "finalTrackingState": null
  },
  "executionHistory": [
    {
      "status": "success",
      "errorMessage": null,
      "startTime": "2014-11-26T03:37:18.853Z",
      "endTime": "2014-11-26T03:37:19.012Z",
      "errors": [],
      "warnings": [],
      "itemsProcessed": 11,
      "itemsFailed": 0,
      "initialTrackingState": null,
      "finalTrackingState": null
    },
    {
      "status": "transientFailure",
      "errorMessage": null,
      "startTime": "2014-11-26T03:28:10.125Z",
      "endTime": "2014-11-26T03:28:12.007Z",
      "errors": [
        {
          "key": "",
          "errorMessage": "Document key cannot be missing or empty.",
          "statusCode": 400,
          "name": null,
          "details": null,
          "documentationLink": null
        },
        {
          "key": "document id 1",
          "errorMessage": "Could not read the value of column 'foo' at index '0'.",
          "statusCode": 400,
          "name": "DocumentExtraction.AzureBlob.MyDataSource",
          "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.",
          "name": null,
          "details": null,
          "documentationLink": null
        },
        {
          "key": "document id 2",
          "message": "Document was truncated to 50000 characters.",
          "name": "Enrichment.LanguageDetectionSkill.#4",
          "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"
        }
      ],
      "itemsProcessed": 1,
      "itemsFailed": 2,
      "initialTrackingState": null,
      "finalTrackingState": null
    }
  ],
  "limits": {
    "maxRunTime": "PT22H",
    "maxDocumentExtractionSize": 256000000,
    "maxDocumentContentCharactersToExtract": 4000000
  }
}

定義

名稱 Description
IndexerExecutionResult

表示個別索引器執行的結果。

IndexerExecutionStatus

表示個別索引器執行的狀態。

IndexerStatus

表示整體索引器狀態。

SearchError

描述 API 的錯誤狀況。

SearchIndexerError

表示專案或檔層級的索引編製錯誤。

SearchIndexerLimits
SearchIndexerStatus

表示索引器目前的狀態和執行歷程記錄。

SearchIndexerWarning

表示專案層級警告。

IndexerExecutionResult

表示個別索引器執行的結果。

名稱 類型 Description
endTime

string (date-time)

如果執行已完成,則為這個索引器執行的結束時間。

errorMessage

string

指出最上層錯誤的錯誤訊息,如果有的話。

errors

SearchIndexerError[]

專案層級的索引編製錯誤。

finalTrackingState

string

變更索引器執行完成的追蹤狀態。

initialTrackingState

string

變更索引器執行開始的追蹤狀態。

itemsFailed

integer (int32)

此索引器執行期間無法編製索引的項目數目。

itemsProcessed

integer (int32)

在這個索引器執行期間處理的項目數目。 這包括成功處理的項目和嘗試編製索引但失敗的專案。

startTime

string (date-time)

這個索引器執行的開始時間。

status

IndexerExecutionStatus

這個索引器執行的結果。

warnings

SearchIndexerWarning[]

專案層級的索引編製警告。

IndexerExecutionStatus

表示個別索引器執行的狀態。

值 Description
transientFailure

索引器調用失敗,但失敗可能是暫時性的。 索引器調用會繼續每個排程。

success

索引器執行已順利完成。

inProgress

索引器執行正在進行中。

reset

索引器已重設。

IndexerStatus

表示整體索引器狀態。

值 Description
unknown

表示索引器處於未知狀態。

error

表示索引器發生錯誤,而不需要人為介入便無法更正。

running

表示索引器正常執行。

SearchError

描述 API 的錯誤狀況。

名稱 類型 Description
code

string

其中一組伺服器定義的錯誤碼。

details

SearchError[]

導致此錯誤之特定錯誤的詳細數據陣列。

message

string

錯誤的人類可讀取表示法。

SearchIndexerError

表示專案或檔層級的索引編製錯誤。

名稱 類型 Description
details

string

此外,有關錯誤的詳細資訊,可協助偵錯索引器。 這不一定是可用的。

documentationLink

string

這些錯誤類別疑難解答指南的連結。 這不一定是可用的。

errorMessage

string

描述處理專案時發生錯誤的訊息。

key

string

索引編製失敗之專案的索引鍵。

name

string

產生錯誤的來源名稱。 例如,這可能是指附加技能集中的特定技能。 這不一定是可用的。

statusCode

integer (int32)

狀態代碼,指出索引作業失敗的原因。 可能的值包括:400 表示格式錯誤的輸入檔、找不到檔的 404、版本衝突為 409、索引暫時無法使用時為 422,或服務忙碌時為 503。

SearchIndexerLimits

名稱 類型 Description
maxDocumentContentCharactersToExtract

number (int64)

要從檔擷取以編製索引的字元數上限。

maxDocumentExtractionSize

number (int64)

檔的大小上限,以位元組為單位,這會被視為有效的索引編制。

maxRunTime

string (duration)

索引器允許執行一次執行的最大持續時間。

SearchIndexerStatus

表示索引器目前的狀態和執行歷程記錄。

名稱 類型 Description
executionHistory

IndexerExecutionResult[]

最近索引器執行的歷程記錄,依反向時間順序排序。

lastResult

IndexerExecutionResult

最近或進行中索引器執行的結果。

limits

SearchIndexerLimits

索引器的執行限制。

status

IndexerStatus

整體索引器狀態。

SearchIndexerWarning

表示專案層級警告。

名稱 類型 Description
details

string

此外,有關警告的詳細資訊,可協助偵錯索引器。 這不一定是可用的。

documentationLink

string

這些警告類別疑難解答指南的連結。 這不一定是可用的。

key

string

產生警告之專案的索引鍵。

message

string

描述處理專案時所發生警告的訊息。

name

string

發出警告的來源名稱。 例如,這可能是指附加技能集中的特定技能。 這不一定是可用的。