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 ( |
Fields | |
---|---|
name |
Immutable. The full resource name of the document. Format: This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
id |
Immutable. The identifier of the document. Id should conform to RFC-1034 standard with a length limit of 63 characters. |
schema |
The identifier of the schema located in the same data store. |
content |
The unstructured data linked to this document. Content must be set if this document is under a |
parent |
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. |
derived |
Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. |
index |
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: |
index |
Output only. The index status of the document.
|
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: |
|
struct |
The structured JSON data for the document. It should conform to the registered |
json |
The JSON string representation of the document. It should conform to the registered |
Content
Unstructured data linked to this document.
JSON representation |
---|
{ "mimeType": string, // Union field |
Fields | |
---|---|
mime |
The MIME type of the content. Supported types:
See https://www.iana.org/assignments/media-types/media-types.xhtml. |
Union field
|
|
raw |
The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all A base64-encoded string. |
uri |
The URI of the content. Only Cloud Storage URIs (e.g. |
IndexStatus
Index status of the document.
JSON representation |
---|
{
"indexTime": string,
"errorSamples": [
{
object ( |
Fields | |
---|---|
index |
The time when the document was indexed. If this field is populated, it means the document has been indexed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
error |
A sample of errors encountered while indexing the document. If this field is populated, the document is not indexed due to errors. |
pending |
Immutable. The message indicates the document index is in progress. If this field is populated, the document index is pending. |
Methods |
|
---|---|
|
Creates a Document . |
|
Deletes a Document . |
|
Gets a Document . |
|
Bulk import of multiple Document s. |
|
Gets a list of Document s. |
|
Updates a Document . |
|
Permanently deletes all selected Document s in a branch. |