Share via


Azure AI 搜尋中的服務統計資料

服務統計資料作業會傳回您服務中的物件數目和類型、每個物件類型所允許的最大數目,指定服務層級、實際和最大儲存體,以及依階層而有所不同的其他限制。 此要求會從服務提取資訊,因此您不需要查閱或計算 服務限制

文件計數和儲存體大小的統計資料會每隔幾分鐘收集,不會即時收集。 因此,此 API 所傳回的統計資料可能不會反映最新的索引作業所造成的變更。

GET https://[service name].search.windows.net/servicestats?api-version=[api-version]
   Content-Type: application/json  
   api-key: [admin key]  

URI 參數

參數 Description
服務名稱 必要。 將此設定為搜尋服務的唯一使用者定義名稱。 要求 URI 會指定應該傳回統計資料的索引名稱。
api-version 必要。 目前的穩定版本為 api-version=2020-06-30 。 如需更多版本,請參閱 API 版本

要求標頭

下表說明必要及選用的要求標頭。

欄位 Description
Content-Type 必要。 請設為 application/json
api-key 如果您使用 Azure 角色 ,而且要求會提供持有人權杖,則為選擇性,否則需要金鑰。 API 金鑰是唯一的系統產生字串,可驗證對搜尋服務的要求。 取得物件定義的要求必須包含設定為系統管理員金鑰的 api 金鑰欄位, (而不是查詢金鑰) 。 如需詳細資訊 ,請參閱使用金鑰驗證連線到 Azure AI 搜尋 服務。

要求本文

無。

回應

狀態碼:傳回 「200 OK」 以取得成功的回應。 回應本文的格式如下:

{
    "counters": {
        "documentCount": {
            "usage": number,
            "quota": number | null (if the service has unlimitied document counts, the quota will be null)
        },
        "indexesCount": {
            "usage": number,
            "quota": number
        },
        "indexersCount": {
            "usage": number,
            "quota": number
        },
        "dataSourcesCount": {
            "usage": number,
            "quota": number
        },
        "storageSize": {
            "usage": number (bytes),
            "quota": number (bytes) 
        },
        "synonymMaps": {
            "usage": number,
            "quota": number
        }
    },
    "limits": {
        "maxFieldsPerIndex": number,
        "maxIndexerRunTime": string,
        "maxFileExtractionSize": number,
        "maxFileContentCharactersToExtract": number,
        "maxFieldNestingDepthPerIndex": number,
        "maxComplexCollectionFieldsPerIndex": number,
        "maxComplexObjectsInCollectionsPerDocument": number
    }
}

範例

{
    "@odata.context": "https://my-search-service.search.windows.net/$metadata#Microsoft.Azure.Search.V2019_05_06.ServiceStatistics",
    "counters": {
        "documentCount": {
            "usage": 5072,
            "quota": null
        },
        "indexesCount": {
            "usage": 10,
            "quota": 15
        },
        "indexersCount": {
            "usage": 8,
            "quota": 15
        },
        "dataSourcesCount": {
            "usage": 9,
            "quota": 15
        },
        "storageSize": {
            "usage": 22265221,
            "quota": 2147483648
        },
        "synonymMaps": {
            "usage": 0,
            "quota": 3
        }
    },
    "limits": {
        "maxFieldsPerIndex": 1000,
        "maxIndexerRunTime": "P1D",
        "maxFileExtractionSize": 16777216,
        "maxFileContentCharactersToExtract": 65536,
        "maxFieldNestingDepthPerIndex": 10,
        "maxComplexCollectionFieldsPerIndex": 40,
        "maxComplexObjectsInCollectionsPerDocument": 3000
    }
}

另請參閱