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 |
modelScores |
Output only. Google provided available scores. |
rankSignals |
Optional. A set of ranking signals associated with the result. |
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 ( |
namestring
The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}/chunks/{chunk_id}.
This field must be a UTF-8 encoded string with a length limit of 1024 characters.
idstring
Unique chunk ID of the current chunk.
contentstring
Content is a string from a document (parsed content).
documentMetadataobject (DocumentMetadata)
Metadata of the document from the current chunk.
derivedStructDataobject (Struct format)
Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.
pageSpanobject (PageSpan)
Page span of the chunk.
chunkMetadataobject (ChunkMetadata)
Output only. Metadata of the current chunk.
dataUrls[]string
annotationContents[]string
Output only. Annotation contents if the current chunk contains annotations.
annotationMetadata[]object (AnnotationMetadata)
Output only. The annotation metadata includes structured content in the current chunk.
relevanceScorenumber
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 SearchResponse.
Document metadata contains the information of the document of the current chunk.
| JSON representation |
|---|
{ "uri": string, "title": string, "mimeType": string, "structData": { object } } |
| Fields | |
|---|---|
uri |
Uri of the document. |
title |
Title of the document. |
mimeType |
The mime type of the document. https://www.iana.org/assignments/media-types/media-types.xhtml. |
structData |
Data representation. The structured JSON data for the document. It should conform to the registered |
Page span of the chunk.
| JSON representation |
|---|
{ "pageStart": integer, "pageEnd": integer } |
| Fields | |
|---|---|
pageStart |
The start page of the chunk. |
pageEnd |
The end page of the chunk. |
Metadata of the current chunk. This field is only populated on SearchService.Search API.
| JSON representation |
|---|
{ "previousChunks": [ { object ( |
| Fields | |
|---|---|
previousChunks[] |
The previous chunks of the current chunk. The number is controlled by |
nextChunks[] |
The next chunks of the current chunk. The number is controlled by |
The annotation metadata includes structured content in the current chunk.
| JSON representation |
|---|
{
"structuredContent": {
object ( |
| Fields | |
|---|---|
structuredContent |
Output only. The structured content information. |
imageId |
Output only. Image ID is provided if the structured content is based on an image. |
The structured content information.
| JSON representation |
|---|
{
"structureType": enum ( |
| Fields | |
|---|---|
structureType |
Output only. The structure type of the structured content. |
content |
Output only. The content of the structured content. |
Defines the types of the structured content that can be extracted.
| Enums | |
|---|---|
STRUCTURE_TYPE_UNSPECIFIED |
Default value. |
SHAREHOLDER_STRUCTURE |
Shareholder structure. |
SIGNATURE_STRUCTURE |
signature structure. |
CHECKBOX_STRUCTURE |
Checkbox structure. |
Double list.
| JSON representation |
|---|
{ "values": [ number ] } |
| Fields | |
|---|---|
values[] |
Double values. |
A set of ranking signals.
| JSON representation |
|---|
{
"defaultRank": number,
"customSignals": [
{
object ( |
| Fields | |
|---|---|
defaultRank |
Optional. The default rank of the result. |
customSignals[] |
Optional. A list of custom clearbox signals. |
precomputedExpressionValues[] |
Optional. A list of precomputed expression results for a given document, in the same order as requested in |
keywordSimilarityScore |
Optional. Keyword matching adjustment. |
relevanceScore |
Optional. Semantic relevance adjustment. |
semanticSimilarityScore |
Optional. Semantic similarity adjustment. |
pctrRank |
Optional. Predicted conversion rate adjustment as a rank. |
topicalityRank |
Optional. Topicality adjustment as a rank. |
documentAge |
Optional. Age of the document in hours. |
boostingFactor |
Optional. Combined custom boosts for a doc. |
Custom clearbox signal represented by name and value pair.
| JSON representation |
|---|
{ "name": string, "value": number } |
| Fields | |
|---|---|
name |
Optional. name of the signal. |
value |
Optional. Float value representing the ranking signal (e.g. 1.25 for BM25). |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-04-21 UTC.