Class: AWSCloudSearch::SearchRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_cloud_search/search_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bqObject

Returns the value of attribute bq.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def bq
  @bq
end

#qObject

Returns the value of attribute q.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def q
  @q
end

#rankObject

Returns the value of attribute rank.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def rank
  @rank
end

#results_typeObject

Returns the value of attribute results_type.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def results_type
  @results_type
end

#return_fieldsObject

Returns the value of attribute return_fields.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def return_fields
  @return_fields
end

#sizeObject

Returns the value of attribute size.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def size
  @size
end

#startObject

Returns the value of attribute start.



4
5
6
# File 'lib/aws_cloud_search/search_request.rb', line 4

def start
  @start
end

Instance Method Details

#to_hashObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/aws_cloud_search/search_request.rb', line 6

def to_hash
  hash = {}
  hash['q']     = @q unless @q.nil?
  hash['bq']    = @bq unless @bq.nil?
  hash['rank']  = @rank unless @rank.nil?
  hash['size']  = @size unless @size.nil?
  hash['start'] = @start unless @start.nil?
  hash['results-type']  = @results_type unless @results_type.nil?
  hash['return-fields'] = @return_fields.join(',') unless @return_fields.nil?
  hash
end