Class: Google::Apis::CloudsearchV1::SearchRequest

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

Overview

The search API request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SearchRequest

Returns a new instance of SearchRequest



3657
3658
3659
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3657

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

Instance Attribute Details

#data_source_restrictionsArray<Google::Apis::CloudsearchV1::DataSourceRestriction>

The sources to use for querying. If not specified, all data sources from the current search application are used. Corresponds to the JSON property dataSourceRestrictions



3614
3615
3616
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3614

def data_source_restrictions
  @data_source_restrictions
end

#facet_optionsArray<Google::Apis::CloudsearchV1::FacetOptions>

Corresponds to the JSON property facetOptions



3619
3620
3621
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3619

def facet_options
  @facet_options
end

#page_sizeFixnum

Maximum number of search results to return in one page. Valid values are between 1 and 100, inclusive. Default value is 10. Corresponds to the JSON property pageSize

Returns:

  • (Fixnum)


3626
3627
3628
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3626

def page_size
  @page_size
end

#queryString

The raw query string. See supported search operators in the Cloud search Cheat Sheet Corresponds to the JSON property query

Returns:

  • (String)


3635
3636
3637
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3635

def query
  @query
end

#query_interpretation_optionsGoogle::Apis::CloudsearchV1::QueryInterpretationOptions

Options to interpret user query. Corresponds to the JSON property queryInterpretationOptions



3640
3641
3642
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3640

def query_interpretation_options
  @query_interpretation_options
end

#request_optionsGoogle::Apis::CloudsearchV1::RequestOptions

Shared request options for all RPC methods. Corresponds to the JSON property requestOptions



3645
3646
3647
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3645

def request_options
  @request_options
end

#sort_optionsGoogle::Apis::CloudsearchV1::SortOptions

The options for sorting the search results Corresponds to the JSON property sortOptions



3650
3651
3652
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3650

def sort_options
  @sort_options
end

#startFixnum

Starting index of the results. Corresponds to the JSON property start

Returns:

  • (Fixnum)


3655
3656
3657
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3655

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
# File 'generated/google/apis/cloudsearch_v1/classes.rb', line 3662

def update!(**args)
  @data_source_restrictions = args[:data_source_restrictions] if args.key?(:data_source_restrictions)
  @facet_options = args[:facet_options] if args.key?(:facet_options)
  @page_size = args[:page_size] if args.key?(:page_size)
  @query = args[:query] if args.key?(:query)
  @query_interpretation_options = args[:query_interpretation_options] if args.key?(:query_interpretation_options)
  @request_options = args[:request_options] if args.key?(:request_options)
  @sort_options = args[:sort_options] if args.key?(:sort_options)
  @start = args[:start] if args.key?(:start)
end