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 \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The full resource name of the chunk. Format: |
↳ 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 SearchService.SearchResponse. |
↳ document_metadata |
Google\Cloud\DiscoveryEngine\V1\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 |
Google\Cloud\DiscoveryEngine\V1\Chunk\PageSpan
Page span of the chunk. |
↳ chunk_metadata |
Google\Cloud\DiscoveryEngine\V1\Chunk\ChunkMetadata
Output only. Metadata of 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 SearchService.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 SearchService.SearchResponse.
Parameter | |
---|---|
Name | Description |
var |
float
|
Returns | |
---|---|
Type | Description |
$this |
getDocumentMetadata
Metadata of the document from the current chunk.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1\Chunk\DocumentMetadata|null |
hasDocumentMetadata
clearDocumentMetadata
setDocumentMetadata
Metadata of the document from the current chunk.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1\Chunk\DocumentMetadata
|
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 |
Google\Protobuf\Struct|null |
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 |
var |
Google\Protobuf\Struct
|
Returns | |
---|---|
Type | Description |
$this |
getPageSpan
Page span of the chunk.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1\Chunk\PageSpan|null |
hasPageSpan
clearPageSpan
setPageSpan
Page span of the chunk.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1\Chunk\PageSpan
|
Returns | |
---|---|
Type | Description |
$this |
getChunkMetadata
Output only. Metadata of the current chunk.
Returns | |
---|---|
Type | Description |
Google\Cloud\DiscoveryEngine\V1\Chunk\ChunkMetadata|null |
hasChunkMetadata
clearChunkMetadata
setChunkMetadata
Output only. Metadata of the current chunk.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1\Chunk\ChunkMetadata
|
Returns | |
---|---|
Type | Description |
$this |