Method: indexing.datasources.items.index

อัปเดต ACL, ข้อมูลเมตา และเนื้อหาของ Item ระบบจะแทรก Item หากยังไม่มี วิธีการนี้ไม่รองรับการอัปเดตบางส่วน ระบบจะล้างช่องที่ไม่มีค่าที่ระบุในดัชนี Cloud Search

API นี้ต้องใช้บัญชีผู้ดูแลระบบหรือบัญชีบริการในการดําเนินการ บัญชีบริการที่ใช้คือบัญชีที่อยู่ในรายการที่อนุญาตในแหล่งข้อมูลที่เกี่ยวข้อง

คำขอ HTTP

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

URL ใช้ไวยากรณ์การแปลง gRPC

พารามิเตอร์เส้นทาง

พารามิเตอร์
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)

Structured Data สำหรับรายการที่ควรเป็นไปตามคำจำกัดความออบเจ็กต์ที่ลงทะเบียนในสคีมาสำหรับแหล่งข้อมูล

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 ที่ไม่มีอยู่หรือถูกลบไปแล้วหรือไม่