REST Resource: projects.locations.dataStores.branches.documents

Resource: Document

Document captures all raw metadata information of items to be recommended or searched.

JSON representation
{
  "name": string,
  "id": string,
  "schemaId": string,
  "content": {
    object (Content)
  },
  "parentDocumentId": string,
  "derivedStructData": {
    object
  },
  "indexTime": string,

  // Union field data can be only one of the following:
  "structData": {
    object
  },
  "jsonData": string
  // End of list of possible types for union field data.
}
Fields
name

string

Immutable. The full resource name of the document. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

id

string

Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

schemaId

string

The identifier of the schema located in the same data store.

content

object (Content)

The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

parentDocumentId

string

The identifier of the parent document. Currently supports at most two level document hierarchy.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

derivedStructData

object (Struct format)

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

indexTime

string (Timestamp format)

Output only. The last time the document was indexed. If this field is set, the document could be returned in search results.

This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Union field data. Data representation. One of struct_data or json_data should be provided otherwise an INVALID_ARGUMENT error is thrown. data can be only one of the following:
structData

object (Struct format)

The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

jsonData

string

The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

Methods

create

Creates a Document.

delete

Deletes a Document.

get

Gets a Document.

import

Bulk import of multiple Documents.

list

Gets a list of Documents.

patch

Updates a Document.

purge

Permanently deletes all selected Documents in a branch.