- [JSON representation](https://developers.google.com/knowledge/reference/rest/v1alpha/DocumentChunk#SCHEMA_REPRESENTATION)

A DocumentChunk represents a piece of content from a `https://developers.google.com/knowledge/reference/rest/v1alpha/documents#Document` in the DeveloperKnowledge corpus. To fetch the entire document content, pass the `parent` to `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/get#google.developers.knowledge.v1alpha.DeveloperKnowledge.GetDocument` or `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/batchGet#google.developers.knowledge.v1alpha.DeveloperKnowledge.BatchGetDocuments`.

| JSON representation |
|---|
| ``` { "parent": string, "id": string, "content": string, "document": { object (`https://developers.google.com/knowledge/reference/rest/v1alpha/documents#Document`) }, "relevanceScore": number } ``` |

| Fields ||
|---|---|
| `parent` | `string` Output only. Contains the resource name of the document this chunk is from. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` |
| `id` | `string` Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time. |
| `content` | `string` Output only. Contains the content of the document chunk. |
| `document` | ``object (`https://developers.google.com/knowledge/reference/rest/v1alpha/documents#Document`)`` Output only. Represents metadata about the `https://developers.google.com/knowledge/reference/rest/v1alpha/documents#Document` this chunk is from. The `https://developers.google.com/knowledge/reference/rest/v1alpha/documents#DocumentView` of this `https://developers.google.com/knowledge/reference/rest/v1alpha/documents#Document` message will be set to `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients do not need to call `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/get#google.developers.knowledge.v1alpha.DeveloperKnowledge.GetDocument` or `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/batchGet#google.developers.knowledge.v1alpha.DeveloperKnowledge.BatchGetDocuments` if they only need the metadata fields. Otherwise, clients should use `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/get#google.developers.knowledge.v1alpha.DeveloperKnowledge.GetDocument` or `https://developers.google.com/knowledge/reference/rest/v1alpha/documents/batchGet#google.developers.knowledge.v1alpha.DeveloperKnowledge.BatchGetDocuments` to fetch the full document content. |
| `relevanceScore` | `number` Output only. Represents the relevance score of the chunk to the search query. Higher score indicates higher chunk relevance. The score is in range \[0.0, 1.0\]. |