SearchResult

Represents the search results.

JSON representation
{
  "id": string,
  "document": {
    object (Document)
  },
  "chunk": {
    object (Chunk)
  },
  "modelScores": {
    string: {
      object (DoubleList)
    },
    ...
  }
}
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))

Google provided available scores.

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)
  },
  "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).

documentMetadata

object (DocumentMetadata)

Metadata of the document from the current chunk.

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.

chunkMetadata

object (ChunkMetadata)

Output only. Metadata of the current chunk.

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.

DocumentMetadata

Document metadata contains the information of the document of the current chunk.

JSON representation
{
  "uri": string,
  "title": string,
  "structData": {
    object
  }
}
Fields
uri

string

Uri of the document.

title

string

Title of the document.

structData

object (Struct format)

Data representation. The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

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.

ChunkMetadata

Metadata of the current chunk. This field is only populated on SearchService.Search API.

JSON representation
{
  "previousChunks": [
    {
      object (Chunk)
    }
  ],
  "nextChunks": [
    {
      object (Chunk)
    }
  ]
}
Fields
previousChunks[]

object (Chunk)

The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.

nextChunks[]

object (Chunk)

The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.

DoubleList

Double list.

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

number

Double values.