Developer Knowledge V1 API - Class Google::Developers::DeveloperKnowledge::V1::DocumentChunk (v0.5.0)

Reference documentation and code samples for the Developer Knowledge V1 API class Google::Developers::DeveloperKnowledge::V1::DocumentChunk.

A DocumentChunk represents a piece of content from a Document in the DeveloperKnowledge corpus. To fetch the entire document content, pass the parent to DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#content

def content() -> ::String
Returns
  • (::String) — Output only. Contains the content of the document chunk.

#document

def document() -> ::Google::Developers::DeveloperKnowledge::V1::Document
Returns

#id

def id() -> ::String
Returns
  • (::String) — Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time.

#parent

def parent() -> ::String
Returns
  • (::String) — Output only. Contains the resource name of the document this chunk is from. Format: documents/{uri_without_scheme} Example: documents/docs.cloud.google.com/storage/docs/creating-buckets

#relevance_score

def relevance_score() -> ::Float
Returns
  • (::Float) — Output only. Represents the relevance score of the chunk to the search query. Higher score indicates higher chunk relevance. The score is in range [0.0, 1.0].