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},"aclInfo": {object (AclInfo)},"indexTime": string,"indexStatus": {object (IndexStatus)},// 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 128 characters.
schemaId
string
The identifier of the schema located in the same data store.
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.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
If document is indexed successfully, the indexTime field is populated.
Otherwise, if document is not indexed due to errors, the errorSamples field is populated.
Otherwise, if document's index is in progress, the pendingMessage field is populated.
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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-07 UTC."],[[["Documents store raw metadata for items in searches or recommendations, and their names follow a specific format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}`."],["Each document has an ID, schema ID, and content, and it can include parent-child relationships with other documents, with parent identifiers conforming to the RFC-1034 standard."],["Documents can have access control information, are indexed with a timestamp, and can be represented as either structured JSON data or a JSON string."],["The indexing status of a document indicates whether it has been indexed successfully, is pending, or has encountered errors, with a successful indexing resulting in a populated `indexTime` field."],["Several methods exist to manage documents, including creating, deleting, retrieving, importing in bulk, listing, updating, and permanently deleting them in batches."]]],[]]