Share via


Indexers - Get Status

傳回索引子的目前狀態和執行記錄。

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

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

Sample Request

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

Sample Response

{
  "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
IndexerCurrentState

表示定義及指定索引器目前執行的所有狀態。

IndexerExecutionResult

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

IndexerExecutionStatus

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

IndexerExecutionStatusDetail

詳細說明個別索引器執行的狀態。

IndexerStatus

表示整體的索引子狀態。

IndexingMode

表示索引器執行所在的模式。

SearchError

描述 API 的錯誤狀況。

SearchIndexerError

表示項目或文件層級索引錯誤。

SearchIndexerLimits
SearchIndexerStatus

表示索引子的目前狀態和執行記錄。

SearchIndexerWarning

表示專案層級警告。

IndexerCurrentState

表示定義及指定索引器目前執行的所有狀態。

名稱 類型 Description
allDocsFinalChangeTrackingState

string

在數據源中的所有文件上編製索引完成時,變更追蹤狀態值。

allDocsInitialChangeTrackingState

string

在數據源中的所有文件上開始編製索引時,所使用的變更追蹤狀態。

mode

IndexingMode

索引器執行所在的模式。

resetDatasourceDocumentIds

string[]

已重設的數據源檔識別碼清單。 數據源文件標識碼是數據源中數據的唯一標識碼。 索引器會選擇性地重新擷取這些標識碼。

resetDocsFinalChangeTrackingState

string

當索引編製完成時變更追蹤狀態值,請在選取時重設數據源中的檔。

resetDocsInitialChangeTrackingState

string

變更索引開始於選取時使用的追蹤狀態,重設數據源中的檔。

resetDocumentKeys

string[]

已重設的檔案索引鍵清單。 檔索引鍵是搜尋索引中數據的檔唯一標識符。 索引器會選擇性地重新擷取這些索引鍵。

IndexerExecutionResult

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

名稱 類型 Description
currentState

IndexerCurrentState

定義和指定索引器目前執行的所有狀態。

endTime

string

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

errorMessage

string

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

errors

SearchIndexerError[]

專案層級的索引錯誤。

finalTrackingState

string

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

initialTrackingState

string

變更索引器執行啟動的追蹤狀態。

itemsFailed

integer

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

itemsProcessed

integer

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

startTime

string

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

status

IndexerExecutionStatus

這個索引器執行的結果。

statusDetail

IndexerExecutionStatusDetail

這個索引器執行的結果。

warnings

SearchIndexerWarning[]

專案層級的索引警告。

IndexerExecutionStatus

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

名稱 類型 Description
inProgress

string

索引子正在執行中。

reset

string

已重設索引子。

success

string

索引子執行已順利完成。

transientFailure

string

索引子引動過程失敗,但失敗可能是暫時性的。 索引子引動過程將依排程繼續執行。

IndexerExecutionStatusDetail

詳細說明個別索引器執行的狀態。

名稱 類型 Description
resetDocs

string

指出所發生的重設是針對 ResetDocs 的呼叫。

IndexerStatus

表示整體的索引子狀態。

名稱 類型 Description
error

string

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

running

string

表示索引器正常執行。

unknown

string

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

IndexingMode

表示索引器執行所在的模式。

名稱 類型 Description
indexingAllDocs

string

索引器正在為數據源中的所有文件編製索引。

indexingResetDocs

string

索引器正在編製索引,並重設數據源中的檔。 正在編製索引的檔是在索引器狀態上定義。

SearchError

描述 API 的錯誤狀況。

名稱 類型 Description
code

string

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

details

SearchError[]

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

message

string

人類看得懂的錯誤表示法。

SearchIndexerError

表示項目或文件層級索引錯誤。

名稱 類型 Description
details

string

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

documentationLink

string

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

errorMessage

string

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

key

string

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

name

string

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

statusCode

integer

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

SearchIndexerLimits

名稱 類型 Description
maxDocumentContentCharactersToExtract

number

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

maxDocumentExtractionSize

number

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

maxRunTime

string

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

SearchIndexerStatus

表示索引子的目前狀態和執行記錄。

名稱 類型 Description
executionHistory

IndexerExecutionResult[]

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

lastResult

IndexerExecutionResult

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

limits

SearchIndexerLimits

索引器的執行限制。

status

IndexerStatus

整體的索引子狀態。

SearchIndexerWarning

表示專案層級警告。

名稱 類型 Description
details

string

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

documentationLink

string

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

key

string

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

message

string

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

name

string

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