Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunk

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1alpha/classes.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb,
lib/google/apis/discoveryengine_v1alpha/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaChunk

Returns a new instance of GoogleCloudDiscoveryengineV1alphaChunk.



4515
4516
4517
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4515

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#chunk_metadataGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata

Metadata of the current chunk. This field is only populated on SearchService. Search API. Corresponds to the JSON property chunkMetadata



4471
4472
4473
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4471

def 
  @chunk_metadata
end

#contentString

Content is a string from a document (parsed content). Corresponds to the JSON property content

Returns:

  • (String)


4476
4477
4478
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4476

def content
  @content
end

#derived_struct_dataHash<String,Object>

Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document. Corresponds to the JSON property derivedStructData

Returns:

  • (Hash<String,Object>)


4482
4483
4484
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4482

def derived_struct_data
  @derived_struct_data
end

#document_metadataGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata

Document metadata contains the information of the document of the current chunk. Corresponds to the JSON property documentMetadata



4488
4489
4490
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4488

def 
  @document_metadata
end

#idString

Unique chunk ID of the current chunk. Corresponds to the JSON property id

Returns:

  • (String)


4493
4494
4495
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4493

def id
  @id
end

#nameString

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. Corresponds to the JSON propertyname`

Returns:

  • (String)


4501
4502
4503
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4501

def name
  @name
end

#page_spanGoogle::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaChunkPageSpan

Page span of the chunk. Corresponds to the JSON property pageSpan



4506
4507
4508
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4506

def page_span
  @page_span
end

#relevance_scoreFloat

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. Corresponds to the JSON property relevanceScore

Returns:

  • (Float)


4513
4514
4515
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4513

def relevance_score
  @relevance_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 4520

def update!(**args)
  @chunk_metadata = args[:chunk_metadata] if args.key?(:chunk_metadata)
  @content = args[:content] if args.key?(:content)
  @derived_struct_data = args[:derived_struct_data] if args.key?(:derived_struct_data)
  @document_metadata = args[:document_metadata] if args.key?(:document_metadata)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @page_span = args[:page_span] if args.key?(:page_span)
  @relevance_score = args[:relevance_score] if args.key?(:relevance_score)
end