Represents the search results.
JSON representation |
---|
{ "id": string, "document": { object ( |
Fields | |
---|---|
id |
|
document |
The document data snippet in the search response. Only fields that are marked as |
chunk |
The chunk data in the search response if the |
Chunk
Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.
JSON representation |
---|
{ "name": string, "id": string, "content": string, "documentMetadata": { object ( |
Fields | |
---|---|
name |
The full resource name of the chunk. Format: This field must be a UTF-8 encoded string with a length limit of 1024 characters. |
id |
Unique chunk ID of the current chunk. |
content |
Content is a string from a document (parsed content). |
document |
Metadata of the document from the current chunk. |
derived |
Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. |
page |
Page span of the chunk. |
chunk |
Output only. Metadata of the current chunk. |
relevance |
Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on [SearchService.SearchResponse][]. |
DocumentMetadata
Document metadata contains the information of the document of the current chunk.
JSON representation |
---|
{ "uri": string, "title": string, "structData": { object } } |
Fields | |
---|---|
uri |
Uri of the document. |
title |
Title of the document. |
struct |
Data representation. The structured JSON data for the document. It should conform to the registered |
PageSpan
Page span of the chunk.
JSON representation |
---|
{ "pageStart": integer, "pageEnd": integer } |
Fields | |
---|---|
page |
The start page of the chunk. |
page |
The end page of the chunk. |
ChunkMetadata
Metadata of the current chunk. This field is only populated on SearchService.Search
API.
JSON representation |
---|
{ "previousChunks": [ { object ( |
Fields | |
---|---|
previous |
The previous chunks of the current chunk. The number is controlled by |
next |
The next chunks of the current chunk. The number is controlled by |