SearchResult

Represents the search results.

JSON representation
 { 
 "id" 
 : 
 string 
 , 
 "document" 
 : 
 { 
 object (  Document 
 
) 
 } 
 , 
 "chunk" 
 : 
 { 
 object (  Chunk 
 
) 
 } 
 , 
 "modelScores" 
 : 
 { 
 string 
 : 
 { 
 object (  DoubleList 
 
) 
 } 
 , 
 ... 
 } 
 , 
 "rankSignals" 
 : 
 { 
 object (  RankSignals 
 
) 
 } 
 } 
Fields
id

string

Document.id of the searched Document .

document

object ( Document )

The document data snippet in the search response. Only fields that are marked as retrievable are populated.

chunk

object ( Chunk )

The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS .

modelScores

map (key: string, value: object ( DoubleList ))

Output only. Google provided available scores.

rankSignals

object ( RankSignals )

Optional. A set of ranking signals associated with the result.

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 (  DocumentMetadata 
 
) 
 } 
 , 
 "derivedStructData" 
 : 
 { 
 object 
 } 
 , 
 "pageSpan" 
 : 
 { 
 object (  PageSpan 
 
) 
 } 
 , 
 "chunkMetadata" 
 : 
 { 
 object (  ChunkMetadata 
 
) 
 } 
 , 
 "dataUrls" 
 : 
 [ 
 string 
 ] 
 , 
 "annotationContents" 
 : 
 [ 
 string 
 ] 
 , 
 "annotationMetadata" 
 : 
 [ 
 { 
 object (  AnnotationMetadata 
 
) 
 } 
 ] 
 , 
 "relevanceScore" 
 : 
 number 
 } 
Fields
name

string

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.

id

string

Unique chunk ID of the current chunk.

content

string

Content is a string from a document (parsed content).

derivedStructData

object ( Struct format)

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

pageSpan

object ( PageSpan )

Page span of the chunk.

dataUrls[]

string

Output only. Image Data URLs if the current chunk contains images. Data URLs are composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[ ][;base64],

annotationContents[]

string

Output only. Annotation contents if the current chunk contains annotations.

relevanceScore

number

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 .

PageSpan

Page span of the chunk.

JSON representation
 { 
 "pageStart" 
 : 
 integer 
 , 
 "pageEnd" 
 : 
 integer 
 } 
Fields
pageStart

integer

The start page of the chunk.

pageEnd

integer

The end page of the chunk.

StructuredContent

The structured content information.

JSON representation
 { 
 "structureType" 
 : 
 enum (  StructureType 
 
) 
 , 
 "content" 
 : 
 string 
 } 
Fields
structureType

enum ( StructureType )

Output only. The structure type of the structured content.

content

string

Output only. The content of the structured content.

StructureType

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.

DoubleList

Double list.

JSON representation
 { 
 "values" 
 : 
 [ 
 number 
 ] 
 } 
Fields
values[]

number

Double values.

RankSignals

A set of ranking signals.

JSON representation
 { 
 "defaultRank" 
 : 
 number 
 , 
 "customSignals" 
 : 
 [ 
 { 
 object (  CustomSignal 
 
) 
 } 
 ] 
 , 
 "keywordSimilarityScore" 
 : 
 number 
 , 
 "relevanceScore" 
 : 
 number 
 , 
 "semanticSimilarityScore" 
 : 
 number 
 , 
 "pctrRank" 
 : 
 number 
 , 
 "topicalityRank" 
 : 
 number 
 , 
 "documentAge" 
 : 
 number 
 , 
 "boostingFactor" 
 : 
 number 
 } 
Fields
defaultRank

number

Optional. The default rank of the result.

customSignals[]

object ( CustomSignal )

Optional. A list of custom clearbox signals.

keywordSimilarityScore

number

Optional. Keyword matching adjustment.

relevanceScore

number

Optional. Semantic relevance adjustment.

semanticSimilarityScore

number

Optional. Semantic similarity adjustment.

pctrRank

number

Optional. Predicted conversion rate adjustment as a rank.

topicalityRank

number

Optional. Topicality adjustment as a rank.

documentAge

number

Optional. Age of the document in hours.

boostingFactor

number

Optional. Combined custom boosts for a doc.

CustomSignal

Custom clearbox signal represented by name and value pair.

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "value" 
 : 
 number 
 } 
Fields
name

string

Optional. name of the signal.

value

number

Optional. Float value representing the ranking signal (e.g. 1.25 for BM25).

Design a Mobile Site
View Site in Mobile | Classic
Share by: