Class: Google::Apis::CloudsearchV1::SearchResult

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

Overview

Results containing indexed information for a document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SearchResult

Returns a new instance of SearchResult.



15038
15039
15040
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15038

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

Instance Attribute Details

#clustered_resultsArray<Google::Apis::CloudsearchV1::SearchResult>

If source is clustered, provide list of clustered results. There will only be one level of clustered results. If current source is not enabled for clustering, this field will be empty. Corresponds to the JSON property clusteredResults



15009
15010
15011
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15009

def clustered_results
  @clustered_results
end

#debug_infoGoogle::Apis::CloudsearchV1::ResultDebugInfo

Debugging information about the result. Corresponds to the JSON property debugInfo



15014
15015
15016
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15014

def debug_info
  @debug_info
end

#metadataGoogle::Apis::CloudsearchV1::Metadata

Metadata of a matched search result. Corresponds to the JSON property metadata



15019
15020
15021
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15019

def 
  @metadata
end

#snippetGoogle::Apis::CloudsearchV1::Snippet

Snippet of the search result, which summarizes the content of the resulting page. Corresponds to the JSON property snippet



15025
15026
15027
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15025

def snippet
  @snippet
end

#titleString

Title of the search result. Corresponds to the JSON property title

Returns:

  • (String)


15030
15031
15032
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15030

def title
  @title
end

#urlString

The URL of the search result. The URL contains a Google redirect to the actual item. This URL is signed and shouldn't be changed. Corresponds to the JSON property url

Returns:

  • (String)


15036
15037
15038
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15036

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15043
15044
15045
15046
15047
15048
15049
15050
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 15043

def update!(**args)
  @clustered_results = args[:clustered_results] if args.key?(:clustered_results)
  @debug_info = args[:debug_info] if args.key?(:debug_info)
  @metadata = args[:metadata] if args.key?(:metadata)
  @snippet = args[:snippet] if args.key?(:snippet)
  @title = args[:title] if args.key?(:title)
  @url = args[:url] if args.key?(:url)
end