Google Cloud Discovery Engine V1 Client - Class Chunk (1.7.0)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class Chunk.

Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.

Generated from protobuf message google.cloud.discoveryengine.v1.Chunk

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ name
string

The full resource name of the chunk. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/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).

↳ relevance_score
float

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
Chunk\DocumentMetadata

Metadata of the document from the current chunk.

↳ derived_struct_data
Google\Protobuf\Struct

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

↳ page_span
Chunk\PageSpan

Page span of the chunk.

↳ chunk_metadata
Chunk\ChunkMetadata

Output only. Metadata of the current chunk.

↳ data_urls
array

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:[

↳ annotation_contents
array

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

↳ annotation_metadata
array< Chunk\AnnotationMetadata >

Output only. The annotation metadata includes structured content in the current chunk.

getName

The full resource name of the chunk.

Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id} . This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Returns
Type
Description
string

setName

The full resource name of the chunk.

Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id} . This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getId

Unique chunk ID of the current chunk.

Returns
Type
Description
string

setId

Unique chunk ID of the current chunk.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getContent

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

Returns
Type
Description
string

setContent

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

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getRelevanceScore

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 .

Returns
Type
Description
float

hasRelevanceScore

clearRelevanceScore

setRelevanceScore

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 .

Parameter
Name
Description
var
float
Returns
Type
Description
$this

Metadata of the document from the current chunk.

Returns
Type
Description

Metadata of the document from the current chunk.

Parameter
Name
Description
Returns
Type
Description
$this

getDerivedStructData

Output only. This field is OUTPUT_ONLY.

It contains derived data that are not in the original input document.

Returns
Type
Description

hasDerivedStructData

clearDerivedStructData

setDerivedStructData

Output only. This field is OUTPUT_ONLY.

It contains derived data that are not in the original input document.

Parameter
Name
Description
Returns
Type
Description
$this

getPageSpan

Page span of the chunk.

Returns
Type
Description

hasPageSpan

clearPageSpan

setPageSpan

Page span of the chunk.

Parameter
Name
Description
Returns
Type
Description
$this

Output only. Metadata of the current chunk.

Returns
Type
Description

Output only. Metadata of the current chunk.

Parameter
Name
Description
Returns
Type
Description
$this

getDataUrls

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:[

Returns
Type
Description

setDataUrls

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:[

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

getAnnotationContents

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

Returns
Type
Description

setAnnotationContents

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

Parameter
Name
Description
var
string[]
Returns
Type
Description
$this

Output only. The annotation metadata includes structured content in the current chunk.

Returns
Type
Description

Output only. The annotation metadata includes structured content in the current chunk.

Parameter
Name
Description
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: