Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument

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

Overview

Document entry with metadata inside SearchDocumentsResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument

Returns a new instance of GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument.



3638
3639
3640
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3638

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

Instance Attribute Details

#documentGoogle::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document

Defines the structure for content warehouse document proto. Corresponds to the JSON property document



3614
3615
3616
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3614

def document
  @document
end

#matched_token_page_indicesArray<Fixnum>

Return the 1-based page indices where those pages have one or more matched tokens. Corresponds to the JSON property matchedTokenPageIndices

Returns:

  • (Array<Fixnum>)


3620
3621
3622
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3620

def matched_token_page_indices
  @matched_token_page_indices
end

#qa_resultGoogle::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1QaResult

Additional result info for the question-answering feature. Corresponds to the JSON property qaResult



3625
3626
3627
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3625

def qa_result
  @qa_result
end

#search_text_snippetString

Contains snippets of text from the document full raw text that most closely match a search query's keywords, if available. All HTML tags in the original fields are stripped when returned in this field, and matching query keywords are enclosed in HTML bold tags. If the question-answering feature is enabled, this field will instead contain a snippet that answers the user's natural- language query. No HTML bold tags will be present, and highlights in the answer snippet can be found in QAResult.highlights. Corresponds to the JSON property searchTextSnippet

Returns:

  • (String)


3636
3637
3638
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3636

def search_text_snippet
  @search_text_snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3643
3644
3645
3646
3647
3648
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 3643

def update!(**args)
  @document = args[:document] if args.key?(:document)
  @matched_token_page_indices = args[:matched_token_page_indices] if args.key?(:matched_token_page_indices)
  @qa_result = args[:qa_result] if args.key?(:qa_result)
  @search_text_snippet = args[:search_text_snippet] if args.key?(:search_text_snippet)
end