Method: indexing.datasources.items.index

Item の ACL、メタデータ、コンテンツを更新します。Item が存在しない場合は挿入されます。この方法では、部分的な更新はサポートされていません。値が指定されていないフィールドは Cloud Search インデックスから消去されます。

この API を実行するには、管理者またはサービス アカウントが必要です。使用されるサービス アカウントは、対応するデータソースの許可リストに登録されているアカウントである。

HTTP リクエスト

POST https://cloudsearch.googleapis.com/v1/indexing/{item.name=datasources/*/items/*}:index

この URL は gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
item.name

string

アイテムの名前。形式: datasources/{sourceId}/items/{itemId}

これは必須項目です。最大文字数は 1,536 文字です。

リクエスト本文

リクエストの本文には、次の構造のデータが含まれます。

JSON 表現
{
  "item": {
    "name": string,
    "acl": {
      "inheritAclFrom": string,
      "aclInheritanceType": enum (ItemAcl.AclInheritanceType),
      "readers": [
        {
          object (Principal)
        }
      ],
      "deniedReaders": [
        {
          object (Principal)
        }
      ],
      "owners": [
        {
          object (Principal)
        }
      ]
    },
    "metadata": {
      "title": string,
      "sourceRepositoryUrl": string,
      "containerName": string,
      "objectType": string,
      "createTime": string,
      "updateTime": string,
      "interactions": [
        {
          object (Interaction)
        }
      ],
      "contentLanguage": string,
      "mimeType": string,
      "searchQualityMetadata": {
        object (SearchQualityMetadata)
      },
      "keywords": [
        string
      ],
      "hash": string,
      "contextAttributes": [
        {
          object (ContextAttribute)
        }
      ]
    },
    "structuredData": {
      "object": {
        object (StructuredDataObject)
      },
      "hash": string
    },
    "content": {
      "contentFormat": enum (ItemContent.ContentFormat),
      "hash": string,

      // Union field content can be only one of the following:
      "inlineContent": string,
      "contentDataRef": {
        object (UploadItemRef)
      }
      // End of list of possible types for union field content.
    },
    "version": string,
    "status": {
      "code": enum (ItemStatus.Code),
      "processingErrors": [
        {
          object (ProcessingError)
        }
      ],
      "repositoryErrors": [
        {
          object (RepositoryError)
        }
      ]
    },
    "queue": string,
    "payload": string,
    "itemType": enum (Item.ItemType)
  },
  "connectorName": string,
  "mode": enum (RequestMode.Mode),
  "debugOptions": {
    object (DebugOptions)
  },
  "indexItemOptions": {
    object (IndexItemOptions)
  }
}
フィールド
item.acl

object (ItemAcl)

このアイテムのアクセス制御リスト。

item.metadata

object (ItemMetadata)

メタデータ情報。

item.structuredData

object (ItemStructuredData)

データソースのスキーマに登録されているオブジェクト定義に適合するアイテムの構造化データ。

item.content

object (ItemContent)

インデックスに登録され、テキストを検索可能にするアイテムのコンテンツ。

item.version

string (bytes format)

必須。インデックス登録システムは、データソースのバージョンをバイト文字列として格納し、インデックス内のアイテムのバージョンと、キューに追加されたアイテムのバージョンを字句順で比較します。

Cloud Search インデックスでは、現在インデックス登録されているアイテムのバージョン値以下のバージョン値を持つキューに追加されたアイテムが、インデックス登録も削除もされません。このフィールドの最大長は 1,024 バイトです。

アイテムのバージョンが削除プロセスに与える影響については、手動削除後のリビジョンを処理するをご覧ください。

Base64 でエンコードされた文字列。

item.status

object (ItemStatus)

商品アイテムのステータス。出力専用フィールド。

item.queue

string

このアイテムが属するキュー。最大で 100 文字です。

item.payload

string (bytes format)

このアイテム用に追加の状態コネクタを保存できます。最大長は 10,000 バイトです。

Base64 でエンコードされた文字列。

item.itemType

enum (Item.ItemType)

このアイテムのタイプです。

connectorName

string

この呼び出しを行うコネクタの名前。

形式: datasources/{sourceId}/connectors/{ID}

mode

enum (RequestMode.Mode)

必須。このリクエストの RequestMode。

debugOptions

object (DebugOptions)

一般的なデバッグ オプション。

indexItemOptions

object (IndexItemOptions)

レスポンスの本文

成功した場合、レスポンスの本文には Operation のインスタンスが含まれます。

認可スコープ

次の OAuth スコープのいずれかが必要です。

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

詳細については、承認ガイドをご覧ください。

IndexItemOptions

JSON 表現
{
  "allowUnknownGsuitePrincipals": boolean
}
フィールド
allowUnknownGsuitePrincipals

boolean

インデックス リクエストで、存在しない、または削除された Google Workspace プリンシパルを許可するかどうかを指定します。