共用方式為


Indexes - Get Statistics

傳回指定索引的統計數據,包括檔計數和記憶體使用量。

GET {endpoint}/indexes('{indexName}')/search.stats?api-version=2024-03-01-Preview

URI 參數

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

string

搜尋服務的端點 URL。

indexName
path True

string

要為其擷取統計數據的索引名稱。

api-version
query True

string

用戶端 API 版本。

要求標頭

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

string

uuid

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

回應

名稱 類型 Description
200 OK

GetIndexStatisticsResult

Other Status Codes

ErrorResponse

錯誤回應。

範例

SearchServiceGetIndexStatistics

範例要求

GET https://myservice.search.windows.net/indexes('hotels')/search.stats?api-version=2024-03-01-Preview

範例回覆

{
  "documentCount": 239572,
  "storageSize": 72375920,
  "vectorIndexSize": 123456
}

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

GetIndexStatisticsResult

指定索引的統計數據。 統計數據會定期收集,不保證一律為最新狀態。

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

GetIndexStatisticsResult

指定索引的統計數據。 統計數據會定期收集,不保證一律為最新狀態。

名稱 類型 Description
documentCount

integer

索引中的文件數目。

storageSize

integer

索引所耗用位元組的記憶體數量。

vectorIndexSize

integer

索引中向量所耗用的位元組記憶體數量。