Send feedback
Class Chunk (0.51.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.51.0 keyboard_arrow_down
public final class Chunk extends GeneratedMessageV3 implements ChunkOrBuilder
Chunk captures all raw metadata information of items to be recommended or
searched in the chunk mode.
Protobuf type google.cloud.discoveryengine.v1beta.Chunk
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
public static final int CHUNK_METADATA_FIELD_NUMBER
Field Value
Type
Description
int
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value
Type
Description
int
DERIVED_STRUCT_DATA_FIELD_NUMBER
public static final int DERIVED_STRUCT_DATA_FIELD_NUMBER
Field Value
Type
Description
int
public static final int DOCUMENT_METADATA_FIELD_NUMBER
Field Value
Type
Description
int
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
Field Value
Type
Description
int
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
Type
Description
int
PAGE_SPAN_FIELD_NUMBER
public static final int PAGE_SPAN_FIELD_NUMBER
Field Value
Type
Description
int
RELEVANCE_SCORE_FIELD_NUMBER
public static final int RELEVANCE_SCORE_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static Chunk getDefaultInstance ()
Returns
Type
Description
Chunk
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Chunk . Builder newBuilder ()
newBuilder(Chunk prototype)
public static Chunk . Builder newBuilder ( Chunk prototype )
Parameter
Name
Description
prototype
Chunk
public static Chunk parseDelimitedFrom ( InputStream input )
Returns
Type
Description
Chunk
public static Chunk parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
parseFrom(byte[] data)
public static Chunk parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
Returns
Type
Description
Chunk
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Chunk parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
parseFrom(ByteString data)
public static Chunk parseFrom ( ByteString data )
Returns
Type
Description
Chunk
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Chunk parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
public static Chunk parseFrom ( CodedInputStream input )
Returns
Type
Description
Chunk
public static Chunk parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
public static Chunk parseFrom ( InputStream input )
Returns
Type
Description
Chunk
public static Chunk parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
parseFrom(ByteBuffer data)
public static Chunk parseFrom ( ByteBuffer data )
Returns
Type
Description
Chunk
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Chunk parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
Returns
Type
Description
Chunk
parser()
public static Parser<Chunk> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
public Chunk . ChunkMetadata getChunkMetadata ()
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Chunk . ChunkMetadataOrBuilder getChunkMetadataOrBuilder ()
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContent()
public String getContent ()
Content is a string from a document (parsed content).
string content = 3;
Returns
Type
Description
String
The content.
getContentBytes()
public ByteString getContentBytes ()
Content is a string from a document (parsed content).
string content = 3;
Returns
Type
Description
ByteString
The bytes for content.
getDefaultInstanceForType()
public Chunk getDefaultInstanceForType ()
Returns
Type
Description
Chunk
getDerivedStructData()
public Struct getDerivedStructData ()
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
Struct
The derivedStructData.
getDerivedStructDataOrBuilder()
public StructOrBuilder getDerivedStructDataOrBuilder ()
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Chunk . DocumentMetadata getDocumentMetadata ()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;
public Chunk . DocumentMetadataOrBuilder getDocumentMetadataOrBuilder ()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;
getId()
Unique chunk ID of the current chunk.
string id = 2;
Returns
Type
Description
String
The id.
getIdBytes()
public ByteString getIdBytes ()
Unique chunk ID of the current chunk.
string id = 2;
Returns
Type
Description
ByteString
The bytes for id.
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.
string name = 1;
Returns
Type
Description
String
The name.
getNameBytes()
public ByteString getNameBytes ()
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.
string name = 1;
Returns
Type
Description
ByteString
The bytes for name.
getPageSpan()
public Chunk . PageSpan getPageSpan ()
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
getPageSpanOrBuilder()
public Chunk . PageSpanOrBuilder getPageSpanOrBuilder ()
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
getParserForType()
public Parser<Chunk> getParserForType ()
Overrides
getRelevanceScore()
public double 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][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
double
The relevanceScore.
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
public boolean hasChunkMetadata ()
Output only. Metadata of the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.ChunkMetadata chunk_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
boolean
Whether the chunkMetadata field is set.
hasDerivedStructData()
public boolean hasDerivedStructData ()
Output only. This field is OUTPUT_ONLY.
It contains derived data that are not in the original input document.
.google.protobuf.Struct derived_struct_data = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
boolean
Whether the derivedStructData field is set.
public boolean hasDocumentMetadata ()
Metadata of the document from the current chunk.
.google.cloud.discoveryengine.v1beta.Chunk.DocumentMetadata document_metadata = 5;
Returns
Type
Description
boolean
Whether the documentMetadata field is set.
hasPageSpan()
public boolean hasPageSpan ()
Page span of the chunk.
.google.cloud.discoveryengine.v1beta.Chunk.PageSpan page_span = 6;
Returns
Type
Description
boolean
Whether the pageSpan field is set.
hasRelevanceScore()
public boolean hasRelevanceScore ()
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][].
optional double relevance_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type
Description
boolean
Whether the relevanceScore field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Chunk . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Chunk . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public Chunk . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
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 2025-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]