Class: Fiona7::VeritySearchEngine

Inherits:
SearchEngine show all
Defined in:
lib/fiona7/verity_search_engine.rb

Defined Under Namespace

Classes: VeritySearchRequest

Instance Method Summary collapse

Methods inherited from SearchEngine

#total

Constructor Details

#initialize(*args) ⇒ VeritySearchEngine

Returns a new instance of VeritySearchEngine.



13
14
15
16
17
18
19
20
21
# File 'lib/fiona7/verity_search_engine.rb', line 13

def initialize(*args)
  super
  # scrivito sdk likes to send a query with limit 0
  # just to fetch the total count of results
  # but verity does not like limit 0 very much
  if @limit == 0
    @limit = 1
  end
end

Instance Method Details

#objectsObject



27
28
29
30
31
32
# File 'lib/fiona7/verity_search_engine.rb', line 27

def objects
  return @objects if @objects

  @results || fetch_results
  fetch_objects
end

#resultsObject



23
24
25
# File 'lib/fiona7/verity_search_engine.rb', line 23

def results
  @results || fetch_results
end