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

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

The search API request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SearchRequest

Returns a new instance of SearchRequest.



17545
17546
17547
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17545

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

Instance Attribute Details

#context_attributesArray<Google::Apis::CloudsearchV1::ContextAttribute>

Context attributes for the request which will be used to adjust ranking of search results. The maximum number of elements is 10. Corresponds to the JSON property contextAttributes



17499
17500
17501
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17499

def context_attributes
  @context_attributes
end

#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



17505
17506
17507
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17505

def data_source_restrictions
  @data_source_restrictions
end

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

Corresponds to the JSON property facetOptions



17510
17511
17512
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17510

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. Minimum value is 50 when results beyond 2000 are requested. Corresponds to the JSON property pageSize

Returns:

  • (Fixnum)


17517
17518
17519
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17517

def page_size
  @page_size
end

#queryString

The raw query string. See supported search operators in the Narrow your search with operators Corresponds to the JSON property query

Returns:

  • (String)


17523
17524
17525
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17523

def query
  @query
end

#query_interpretation_optionsGoogle::Apis::CloudsearchV1::QueryInterpretationOptions

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



17528
17529
17530
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17528

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



17533
17534
17535
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17533

def request_options
  @request_options
end

#sort_optionsGoogle::Apis::CloudsearchV1::SortOptions

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



17538
17539
17540
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17538

def sort_options
  @sort_options
end

#startFixnum

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

Returns:

  • (Fixnum)


17543
17544
17545
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17543

def start
  @start
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17550

def update!(**args)
  @context_attributes = args[:context_attributes] if args.key?(:context_attributes)
  @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