Method: stats.getIndex

获取汇总了所有数据源的已编入索引的内容统计信息。此 API 仅返回之前日期的统计信息,而不会返回当天的统计信息。

注意:执行此 API 需要标准的最终用户帐号。

HTTP 请求

GET https://cloudsearch.googleapis.com/v1/stats/index

网址采用 gRPC 转码语法。

查询参数

参数
fromDate

object (Date)

检索统计信息的日期范围的开始日期。此值必须在自当前日期起的 1 年内。

toDate

object (Date)

检索统计信息的日期范围的结束日期。此值必须在当前日期的 1 年内,且必须大于 fromDate。

请求正文

请求正文必须为空。

响应正文

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "stats": [
    {
      object (CustomerIndexStats)
    }
  ],
  "averageIndexedItemCount": string
}
字段
stats[]

object (CustomerIndexStats)

已编入索引的内容项计数摘要,所请求范围内的每一天对应一项内容。

averageIndexedItemCount

string (int64 format)

指定日期范围内完成结算的平均项目数。

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/cloud_search.stats.indexing
  • https://www.googleapis.com/auth/cloud_search.stats
  • https://www.googleapis.com/auth/cloud_search

有关详情,请参阅授权指南

CustomerIndexStats

截至指定日期,按状态代码汇总的商品数量。

JSON 表示法
{
  "date": {
    object (Date)
  },
  "itemCountByStatus": [
    {
      object (ItemCountByStatus)
    }
  ]
}
字段
date

object (Date)

统计信息的计算日期。

itemCountByStatus[]

object (ItemCountByStatus)

按状态代码汇总的商品数量。