Class: Summon::Search

Inherits:
Schema show all
Defined in:
lib/summon/schema/search.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Schema

inherited

Instance Attribute Details

#availability_pathObject (readonly)

Returns the value of attribute availability_path.



10
11
12
# File 'lib/summon/schema/search.rb', line 10

def availability_path
  @availability_path
end

#documentsObject (readonly)

Returns the value of attribute documents.



14
15
16
# File 'lib/summon/schema/search.rb', line 14

def documents
  @documents
end

#errorsObject (readonly)

Returns the value of attribute errors.



18
19
20
# File 'lib/summon/schema/search.rb', line 18

def errors
  @errors
end

#facetsObject (readonly)

Returns the value of attribute facets.



15
16
17
# File 'lib/summon/schema/search.rb', line 15

def facets
  @facets
end

#page_countObject (readonly)

Returns the value of attribute page_count.



4
5
6
# File 'lib/summon/schema/search.rb', line 4

def page_count
  @page_count
end

#queryObject (readonly)

Returns the value of attribute query.



11
12
13
# File 'lib/summon/schema/search.rb', line 11

def query
  @query
end

#query_timeObject (readonly)

Returns the value of attribute query_time.



7
8
9
# File 'lib/summon/schema/search.rb', line 7

def query_time
  @query_time
end

#range_facetsObject (readonly)

Returns the value of attribute range_facets.



16
17
18
# File 'lib/summon/schema/search.rb', line 16

def range_facets
  @range_facets
end

#recommendationsObject (readonly)

Returns the value of attribute recommendations.



12
13
14
# File 'lib/summon/schema/search.rb', line 12

def recommendations
  @recommendations
end

#record_countObject (readonly)

Returns the value of attribute record_count.



5
6
7
# File 'lib/summon/schema/search.rb', line 5

def record_count
  @record_count
end

#session_idObject (readonly)

Returns the value of attribute session_id.



3
4
5
# File 'lib/summon/schema/search.rb', line 3

def session_id
  @session_id
end

#suggestionsObject (readonly)

Returns the value of attribute suggestions.



13
14
15
# File 'lib/summon/schema/search.rb', line 13

def suggestions
  @suggestions
end

#total_request_timeObject (readonly)

Returns the value of attribute total_request_time.



8
9
10
# File 'lib/summon/schema/search.rb', line 8

def total_request_time
  @total_request_time
end

#versionObject (readonly)

Returns the value of attribute version.



2
3
4
# File 'lib/summon/schema/search.rb', line 2

def version
  @version
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/summon/schema/search.rb', line 20

def empty?
  documents.empty?
end

#suggestions?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/summon/schema/search.rb', line 32

def suggestions?
  !@suggestions.empty?
end

#to_s(options = {}) ⇒ Object



36
37
38
# File 'lib/summon/schema/search.rb', line 36

def to_s(options = {})
  "<Summon::Search>{records: #{record_count}, pages: #{page_count}, query_time: #{query_time}ms, request_time: #{total_request_time}ms}"
end