Class: Fiona7::VeritySearchEngine
- Inherits:
-
SearchEngine
- Object
- SearchEngine
- Fiona7::VeritySearchEngine
- Defined in:
- lib/fiona7/verity_search_engine.rb
Defined Under Namespace
Classes: VeritySearchRequest
Instance Method Summary collapse
-
#initialize(*args) ⇒ VeritySearchEngine
constructor
A new instance of VeritySearchEngine.
- #objects ⇒ Object
- #results ⇒ Object
Methods inherited from SearchEngine
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
#objects ⇒ Object
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 |
#results ⇒ Object
23 24 25 |
# File 'lib/fiona7/verity_search_engine.rb', line 23 def results @results || fetch_results end |